From 193c8d6cfb5dfc28b52a9d7ec863da69631180b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 Jul 2026 19:38:20 +0000 Subject: [PATCH 1/2] Update translations --- docs/ca/docs/hello_nextflow/01_hello_world.md | 111 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 80 +- .../ca/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/ca/docs/hello_nf-core/00_orientation.md | 34 +- docs/ca/docs/hello_nf-core/01_run_demo.md | 426 ++++++---- .../ca/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/ca/docs/hello_nf-core/03_use_module.md | 254 +++--- docs/ca/docs/hello_nf-core/04_make_module.md | 162 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/ca/docs/info/nxf_versions.md | 14 +- docs/ca/docs/nextflow_run/01_basics.md | 43 +- docs/ca/docs/nextflow_run/02_pipeline.md | 146 +++- docs/ca/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 11 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/ca/docs/nf4_science/imaging/01_basics.md | 35 +- .../nf4_science/imaging/02_run_molkart.md | 174 ++-- docs/ca/docs/nf4_science/imaging/03_inputs.md | 25 +- docs/ca/docs/nf4_science/imaging/04_config.md | 11 +- .../nf4_science/rnaseq/02_single-sample.md | 74 +- .../nf4_science/rnaseq/03_multi-sample.md | 236 +++++- docs/ca/docs/side_quests/debugging/index.md | 301 +++---- .../docs/side_quests/dev_environment/index.md | 9 +- .../essential_scripting_patterns/index.md | 537 +++++++++--- docs/ca/docs/side_quests/metadata/index.md | 267 ++++-- docs/ca/docs/side_quests/nf_test/index.md | 148 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 110 ++- .../side_quests/working_with_files/index.md | 306 +++++-- docs/de/docs/hello_nextflow/01_hello_world.md | 111 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 80 +- .../de/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/de/docs/hello_nf-core/00_orientation.md | 34 +- docs/de/docs/hello_nf-core/01_run_demo.md | 424 ++++++---- .../de/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/de/docs/hello_nf-core/03_use_module.md | 264 +++--- docs/de/docs/hello_nf-core/04_make_module.md | 162 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/de/docs/info/nxf_versions.md | 14 +- docs/de/docs/nextflow_run/01_basics.md | 47 +- docs/de/docs/nextflow_run/02_pipeline.md | 149 +++- docs/de/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 11 +- .../genomics/02_per_sample_variant_calling.md | 103 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/de/docs/nf4_science/imaging/01_basics.md | 49 +- .../nf4_science/imaging/02_run_molkart.md | 190 ++--- docs/de/docs/nf4_science/imaging/03_inputs.md | 27 +- docs/de/docs/nf4_science/imaging/04_config.md | 13 +- .../nf4_science/rnaseq/02_single-sample.md | 66 +- .../nf4_science/rnaseq/03_multi-sample.md | 236 +++++- docs/de/docs/side_quests/debugging/index.md | 297 +++---- .../docs/side_quests/dev_environment/index.md | 2 +- .../essential_scripting_patterns/index.md | 539 +++++++++--- docs/de/docs/side_quests/metadata/index.md | 271 ++++-- docs/de/docs/side_quests/nf_test/index.md | 161 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 112 ++- .../side_quests/working_with_files/index.md | 306 +++++-- docs/es/docs/hello_nextflow/01_hello_world.md | 111 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 51 +- .../hello_nextflow/05_hello_containers.md | 80 +- .../es/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/es/docs/hello_nf-core/00_orientation.md | 34 +- docs/es/docs/hello_nf-core/01_run_demo.md | 426 ++++++---- .../es/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/es/docs/hello_nf-core/03_use_module.md | 238 ++++-- docs/es/docs/hello_nf-core/04_make_module.md | 162 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/es/docs/info/nxf_versions.md | 14 +- docs/es/docs/nextflow_run/01_basics.md | 67 +- docs/es/docs/nextflow_run/02_pipeline.md | 146 +++- docs/es/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 11 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/es/docs/nf4_science/imaging/01_basics.md | 37 +- .../nf4_science/imaging/02_run_molkart.md | 184 ++-- docs/es/docs/nf4_science/imaging/03_inputs.md | 27 +- docs/es/docs/nf4_science/imaging/04_config.md | 11 +- .../nf4_science/rnaseq/02_single-sample.md | 108 ++- .../nf4_science/rnaseq/03_multi-sample.md | 260 +++++- docs/es/docs/side_quests/debugging/index.md | 304 +++---- .../docs/side_quests/dev_environment/index.md | 17 +- .../essential_scripting_patterns/index.md | 544 +++++++++--- docs/es/docs/side_quests/metadata/index.md | 269 ++++-- docs/es/docs/side_quests/nf_test/index.md | 163 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 112 ++- .../side_quests/working_with_files/index.md | 306 +++++-- docs/fr/docs/hello_nextflow/01_hello_world.md | 113 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 82 +- .../fr/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/fr/docs/hello_nf-core/00_orientation.md | 34 +- docs/fr/docs/hello_nf-core/01_run_demo.md | 430 ++++++---- .../fr/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/fr/docs/hello_nf-core/03_use_module.md | 238 ++++-- docs/fr/docs/hello_nf-core/04_make_module.md | 162 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/fr/docs/info/nxf_versions.md | 14 +- docs/fr/docs/nextflow_run/01_basics.md | 47 +- docs/fr/docs/nextflow_run/02_pipeline.md | 146 +++- docs/fr/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 15 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/fr/docs/nf4_science/imaging/01_basics.md | 41 +- .../nf4_science/imaging/02_run_molkart.md | 188 ++--- docs/fr/docs/nf4_science/imaging/03_inputs.md | 31 +- docs/fr/docs/nf4_science/imaging/04_config.md | 11 +- .../nf4_science/rnaseq/02_single-sample.md | 66 +- .../nf4_science/rnaseq/03_multi-sample.md | 236 +++++- docs/fr/docs/side_quests/debugging/index.md | 297 +++---- .../docs/side_quests/dev_environment/index.md | 12 +- .../essential_scripting_patterns/index.md | 562 +++++++++---- docs/fr/docs/side_quests/metadata/index.md | 269 ++++-- docs/fr/docs/side_quests/nf_test/index.md | 148 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 110 ++- .../side_quests/working_with_files/index.md | 306 +++++-- docs/hi/docs/hello_nextflow/01_hello_world.md | 111 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 82 +- .../hi/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/hi/docs/hello_nf-core/00_orientation.md | 44 +- docs/hi/docs/hello_nf-core/01_run_demo.md | 426 ++++++---- .../hi/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/hi/docs/hello_nf-core/03_use_module.md | 238 ++++-- docs/hi/docs/hello_nf-core/04_make_module.md | 162 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/hi/docs/info/nxf_versions.md | 14 +- docs/hi/docs/nextflow_run/01_basics.md | 47 +- docs/hi/docs/nextflow_run/02_pipeline.md | 146 +++- docs/hi/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 11 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/hi/docs/nf4_science/imaging/01_basics.md | 121 ++- .../nf4_science/imaging/02_run_molkart.md | 204 +++-- docs/hi/docs/nf4_science/imaging/03_inputs.md | 45 +- docs/hi/docs/nf4_science/imaging/04_config.md | 19 +- .../nf4_science/rnaseq/02_single-sample.md | 66 +- .../nf4_science/rnaseq/03_multi-sample.md | 236 +++++- docs/hi/docs/side_quests/debugging/index.md | 301 +++---- .../docs/side_quests/dev_environment/index.md | 6 +- .../essential_scripting_patterns/index.md | 537 +++++++++--- docs/hi/docs/side_quests/metadata/index.md | 267 ++++-- docs/hi/docs/side_quests/nf_test/index.md | 148 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 116 ++- .../side_quests/working_with_files/index.md | 315 ++++--- docs/it/docs/hello_nextflow/01_hello_world.md | 113 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 82 +- .../it/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/it/docs/hello_nf-core/00_orientation.md | 36 +- docs/it/docs/hello_nf-core/01_run_demo.md | 426 ++++++---- .../it/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/it/docs/hello_nf-core/03_use_module.md | 262 +++--- docs/it/docs/hello_nf-core/04_make_module.md | 164 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/it/docs/info/nxf_versions.md | 14 +- docs/it/docs/nextflow_run/01_basics.md | 47 +- docs/it/docs/nextflow_run/02_pipeline.md | 146 +++- docs/it/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 11 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/it/docs/nf4_science/imaging/01_basics.md | 107 ++- .../nf4_science/imaging/02_run_molkart.md | 234 +++-- docs/it/docs/nf4_science/imaging/03_inputs.md | 35 +- docs/it/docs/nf4_science/imaging/04_config.md | 13 +- .../nf4_science/rnaseq/02_single-sample.md | 66 +- .../nf4_science/rnaseq/03_multi-sample.md | 240 +++++- docs/it/docs/side_quests/debugging/index.md | 301 +++---- .../docs/side_quests/dev_environment/index.md | 6 +- .../essential_scripting_patterns/index.md | 543 +++++++++--- docs/it/docs/side_quests/metadata/index.md | 271 ++++-- docs/it/docs/side_quests/nf_test/index.md | 159 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 110 ++- .../side_quests/working_with_files/index.md | 306 +++++-- docs/ko/docs/hello_nextflow/01_hello_world.md | 113 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 80 +- .../ko/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/ko/docs/hello_nf-core/00_orientation.md | 34 +- docs/ko/docs/hello_nf-core/01_run_demo.md | 418 +++++---- .../ko/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/ko/docs/hello_nf-core/03_use_module.md | 242 +++--- docs/ko/docs/hello_nf-core/04_make_module.md | 162 ++-- .../docs/hello_nf-core/05_input_validation.md | 109 ++- docs/ko/docs/info/nxf_versions.md | 14 +- docs/ko/docs/nextflow_run/01_basics.md | 47 +- docs/ko/docs/nextflow_run/02_pipeline.md | 146 +++- docs/ko/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 11 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/ko/docs/nf4_science/imaging/01_basics.md | 35 +- .../nf4_science/imaging/02_run_molkart.md | 172 ++-- docs/ko/docs/nf4_science/imaging/03_inputs.md | 25 +- docs/ko/docs/nf4_science/imaging/04_config.md | 17 +- .../nf4_science/rnaseq/02_single-sample.md | 66 +- .../nf4_science/rnaseq/03_multi-sample.md | 236 +++++- docs/ko/docs/side_quests/debugging/index.md | 295 +++---- .../docs/side_quests/dev_environment/index.md | 4 +- .../essential_scripting_patterns/index.md | 539 +++++++++--- docs/ko/docs/side_quests/metadata/index.md | 269 ++++-- docs/ko/docs/side_quests/nf_test/index.md | 150 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 110 ++- .../side_quests/working_with_files/index.md | 311 ++++--- docs/pl/docs/hello_nextflow/01_hello_world.md | 113 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 80 +- .../pl/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/pl/docs/hello_nf-core/00_orientation.md | 34 +- docs/pl/docs/hello_nf-core/01_run_demo.md | 426 ++++++---- .../pl/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/pl/docs/hello_nf-core/03_use_module.md | 238 ++++-- docs/pl/docs/hello_nf-core/04_make_module.md | 162 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/pl/docs/info/nxf_versions.md | 14 +- docs/pl/docs/nextflow_run/01_basics.md | 49 +- docs/pl/docs/nextflow_run/02_pipeline.md | 146 +++- docs/pl/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 15 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/pl/docs/nf4_science/imaging/01_basics.md | 43 +- .../nf4_science/imaging/02_run_molkart.md | 188 ++--- docs/pl/docs/nf4_science/imaging/03_inputs.md | 27 +- docs/pl/docs/nf4_science/imaging/04_config.md | 11 +- .../nf4_science/rnaseq/02_single-sample.md | 68 +- .../nf4_science/rnaseq/03_multi-sample.md | 236 +++++- docs/pl/docs/side_quests/debugging/index.md | 295 +++---- .../docs/side_quests/dev_environment/index.md | 2 +- .../essential_scripting_patterns/index.md | 541 +++++++++--- docs/pl/docs/side_quests/metadata/index.md | 269 ++++-- docs/pl/docs/side_quests/nf_test/index.md | 163 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 17 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 6 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 110 ++- .../side_quests/working_with_files/index.md | 306 +++++-- docs/pt/docs/hello_nextflow/01_hello_world.md | 113 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 80 +- .../pt/docs/hello_nextflow/06_hello_config.md | 269 ++++-- docs/pt/docs/hello_nf-core/00_orientation.md | 34 +- docs/pt/docs/hello_nf-core/01_run_demo.md | 424 ++++++---- .../pt/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/pt/docs/hello_nf-core/03_use_module.md | 238 ++++-- docs/pt/docs/hello_nf-core/04_make_module.md | 162 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/pt/docs/info/nxf_versions.md | 14 +- docs/pt/docs/nextflow_run/01_basics.md | 47 +- docs/pt/docs/nextflow_run/02_pipeline.md | 146 +++- docs/pt/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 11 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/pt/docs/nf4_science/imaging/01_basics.md | 43 +- .../nf4_science/imaging/02_run_molkart.md | 182 ++-- docs/pt/docs/nf4_science/imaging/03_inputs.md | 29 +- docs/pt/docs/nf4_science/imaging/04_config.md | 13 +- .../nf4_science/rnaseq/02_single-sample.md | 66 +- .../nf4_science/rnaseq/03_multi-sample.md | 238 +++++- docs/pt/docs/side_quests/debugging/index.md | 303 +++---- .../docs/side_quests/dev_environment/index.md | 11 +- .../essential_scripting_patterns/index.md | 537 +++++++++--- docs/pt/docs/side_quests/metadata/index.md | 269 ++++-- docs/pt/docs/side_quests/nf_test/index.md | 165 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 110 ++- .../side_quests/working_with_files/index.md | 306 +++++-- docs/tr/docs/hello_nextflow/01_hello_world.md | 111 ++- .../docs/hello_nextflow/02_hello_channels.md | 133 ++- .../docs/hello_nextflow/03_hello_workflow.md | 99 ++- .../docs/hello_nextflow/04_hello_modules.md | 49 +- .../hello_nextflow/05_hello_containers.md | 80 +- .../tr/docs/hello_nextflow/06_hello_config.md | 265 ++++-- docs/tr/docs/hello_nf-core/00_orientation.md | 34 +- docs/tr/docs/hello_nf-core/01_run_demo.md | 424 ++++++---- .../tr/docs/hello_nf-core/02_rewrite_hello.md | 283 ++++--- docs/tr/docs/hello_nf-core/03_use_module.md | 244 +++--- docs/tr/docs/hello_nf-core/04_make_module.md | 158 ++-- .../docs/hello_nf-core/05_input_validation.md | 111 +-- docs/tr/docs/info/nxf_versions.md | 14 +- docs/tr/docs/nextflow_run/01_basics.md | 47 +- docs/tr/docs/nextflow_run/02_pipeline.md | 148 +++- docs/tr/docs/nextflow_run/03_config.md | 244 +++++- .../nf4_science/_template/02_single_sample.md | 11 +- .../genomics/02_per_sample_variant_calling.md | 101 ++- .../nf4_science/genomics/03_joint_calling.md | 50 +- docs/tr/docs/nf4_science/imaging/01_basics.md | 35 +- .../nf4_science/imaging/02_run_molkart.md | 174 ++-- docs/tr/docs/nf4_science/imaging/03_inputs.md | 25 +- docs/tr/docs/nf4_science/imaging/04_config.md | 11 +- .../nf4_science/rnaseq/02_single-sample.md | 66 +- .../nf4_science/rnaseq/03_multi-sample.md | 238 +++++- docs/tr/docs/side_quests/debugging/index.md | 295 +++---- .../docs/side_quests/dev_environment/index.md | 2 +- .../essential_scripting_patterns/index.md | 796 ++++++++++++------ docs/tr/docs/side_quests/metadata/index.md | 269 ++++-- docs/tr/docs/side_quests/nf_test/index.md | 148 ++-- .../plugin_development/01_plugin_basics.md | 13 +- .../plugin_development/02_create_project.md | 16 +- .../plugin_development/03_custom_functions.md | 16 +- .../plugin_development/04_build_and_test.md | 2 +- .../plugin_development/05_observers.md | 6 +- .../plugin_development/06_configuration.md | 6 +- .../side_quests/plugin_development/index.md | 6 + .../splitting_and_grouping/index.md | 108 +-- .../workflows_of_workflows/index.md | 108 ++- .../side_quests/working_with_files/index.md | 306 +++++-- 400 files changed, 34769 insertions(+), 16261 deletions(-) diff --git a/docs/ca/docs/hello_nextflow/01_hello_world.md b/docs/ca/docs/hello_nextflow/01_hello_world.md index 84f0c9b017..6cdea826f2 100644 --- a/docs/ca/docs/hello_nextflow/01_hello_world.md +++ b/docs/ca/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "Sortida de la comanda" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -La sortida del terminal hauria de semblar familiar. Externament, no ha canviat res. +La sortida del terminal ara acaba amb un resum `Outputs:` que llista les sortides publicades i el directori on s'han escrit. -No obstant això, comproveu el vostre explorador de fitxers: aquesta vegada, Nextflow ha creat un nou directori anomenat `results/`. +Comproveu el vostre explorador de fitxers: aquesta vegada, Nextflow també ha creat un nou directori anomenat `results/`. ??? abstract "Contingut del directori" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Aquesta vegada el resultat s'escriu sota el subdirectori especificat. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Aquesta vegada, si mireu els resultats, el fitxer és una còpia adequada en lloc de només un enllaç simbòlic. @@ -767,19 +785,19 @@ Al bloc del procés, feu el canvi de codi següent: === "Després" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "Abans" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` El símbol `$` i les claus (`{ }`) indiquen a Nextflow que això és un nom de variable que cal substituir pel valor d'entrada real (=interpolat). @@ -811,15 +829,15 @@ Al bloc del workflow, feu el canvi de codi següent: === "Després" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // emet una salutació - sayHello(params.input) + // emet una salutació + sayHello(params.input) ``` === "Abans" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // emet una salutació - sayHello() + // emet una salutació + sayHello() ``` Això indica a Nextflow que executi el procés `sayHello` amb el valor proporcionat mitjançant el paràmetre `--input`. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Si heu fet totes aquestes edicions correctament, hauríeu d'obtenir una altra execució exitosa. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "Si no ha funcionat" @@ -936,7 +966,8 @@ nextflow run hello-world.nf Això es va esmentar al principi del curs, però potser us ho vau perdre. Consulteu el material d'ajuda sobre [versions de Nextflow](../info/nxf_versions.md). - En resum, si esteu utilitzant Nextflow `25.10` llavors heu d'habilitar l'analitzador de llenguatge v2: + L'analitzador v2 és el predeterminat a partir de Nextflow 26.04, de manera que només veureu aquest error en versions anteriors. + En una versió anterior a la 26.04 heu d'habilitar l'analitzador de llenguatge v2: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Una vegada més, hauríeu de trobar la sortida actualitzada corresponent al vostre directori de resultats. @@ -1020,17 +1057,23 @@ Hi ha dos avantatges clau de fer això: Per utilitzar-lo, simplement afegiu `-resume` a la vostra comanda i executeu-la: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "Sortida de la comanda" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` La sortida de la consola hauria de semblar familiar, però hi ha una cosa que és una mica diferent en comparació amb abans. diff --git a/docs/ca/docs/hello_nextflow/02_hello_channels.md b/docs/ca/docs/hello_nextflow/02_hello_channels.md index 77563ee6c7..99f3224fa3 100644 --- a/docs/ca/docs/hello_nextflow/02_hello_channels.md +++ b/docs/ca/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` Com abans, trobareu el fitxer de sortida anomenat `output.txt` al directori `results/hello_channels` (tal com s'especifica al bloc `output` de l'script de workflow, mostrat més amunt). @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Si heu fet les dues edicions correctament, hauríeu d'obtenir una execució exitosa. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "Sortida de la comanda" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Com podeu veure, això mostra el contingut del canal a la consola. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "Sortida de la comanda" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Certament sembla que s'ha executat correctament. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Aquesta vegada veiem les tres execucions de procés i els seus subdirectoris de treball associats llistats a la sortida. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Tornant a la vista de resum, la sortida es resumeix en una línia de nou. @@ -605,8 +652,6 @@ Doneu una ullada al directori `results` per veure si totes les salutacions de so └── output.txt ``` -Sí! I cadascun té el contingut esperat. - ??? abstract "Contingut del fitxer" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "Sortida de la comanda" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -941,16 +986,25 @@ nextflow run hello-channels.nf ??? success "Sortida de la comanda" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Aquesta vegada funciona I ens dóna la visió addicional de com es veu el contingut del canal abans i després d'executar l'operador `flatten()`. @@ -1024,11 +1078,13 @@ Feu la següent edició a la declaració del paràmetre: === "Abans" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Parametres del pipeline */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` Això assumeix que el fitxer està col·locat amb el codi del workflow. @@ -1095,9 +1151,9 @@ nextflow run hello-channels.nf ??? failure "Sortida de la comanda" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1198,12 +1254,12 @@ nextflow run hello-channels.nf ??? failure "Sortida de la comanda" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1318,12 +1374,12 @@ nextflow run hello-channels.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1331,6 +1387,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` Aquesta vegada hauria d'executar-se sense error. diff --git a/docs/ca/docs/hello_nextflow/03_hello_workflow.md b/docs/ca/docs/hello_nextflow/03_hello_workflow.md index 07ade7e3d0..5b41e9b5dc 100644 --- a/docs/ca/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/ca/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` Com abans, trobareu els fitxers de sortida a la ubicació especificada al bloc `output`. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` Ara hi ha una línia extra a la sortida de la consola que correspon al nou procés que acabem d'afegir. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "Sortida de la comanda" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + La sortida del terminal ara també acaba amb un bloc de resum `Outputs:`. L'hem omès aquí per centrar-nos en les línies d'estat dels processos. + S'executa amb èxit, incloent el tercer pas. No obstant això, mireu el nombre de crides per a `collectGreetings()` a l'última línia. @@ -627,8 +651,8 @@ Ara doneu una ullada al contingut del fitxer de sortida final. ??? abstract "Contingut del fitxer" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` Oh no. El pas de recollida es va executar individualment en cada salutació, que NO és el que volíem. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ Finalment, podeu donar una ullada al contingut del fitxer de sortida per satisfe ??? abstract "Contingut del fitxer" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` S'executa amb èxit i produeix la sortida desitjada: ??? abstract "Contingut del fitxer" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` Si mireu al directori `results/hello_workflow/`, trobareu el nou fitxer d'informe, `trio-report.txt`. @@ -1273,5 +1326,5 @@ Quan proporcioneu múltiples entrades a un procés, què ha de ser cert? - [x] L'ordre de les entrades ha de coincidir amb l'ordre definit al bloc d'entrada - [ ] Només es poden proporcionar dues entrades alhora -Més informació: [3. Passeu més d'una entrada a un procés](#3-pass-more-than-one-input-to-a-process) +Més informació: [3. Passeu paràmetres addicionals a un procés](#3-pass-additional-parameters-to-a-process) diff --git a/docs/ca/docs/hello_nextflow/04_hello_modules.md b/docs/ca/docs/hello_nextflow/04_hello_modules.md index 90d4848827..35b01fa2c0 100644 --- a/docs/ca/docs/hello_nextflow/04_hello_modules.md +++ b/docs/ca/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` Com abans, trobareu els fitxers de sortida al directori especificat al bloc `output` (aquí, `results/hello_modules/`). @@ -172,7 +187,7 @@ Inserim això sobre el bloc `params` i l'omplim adequadament. * Paràmetres del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ Inserim això sobre el bloc `params` i l'omplim adequadament. * Paràmetres del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ Inseriu la declaració include sobre el bloc `params` i ompliu-la adequadament. * Paràmetres del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ Inseriu la declaració include sobre el bloc `params` i ompliu-la adequadament. * Paràmetres del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ Inseriu la declaració include sobre el bloc `params` i ompliu-la adequadament. * Paràmetres del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ Inseriu la declaració include sobre el bloc `params` i ompliu-la adequadament. * Paràmetres del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/ca/docs/hello_nextflow/05_hello_containers.md b/docs/ca/docs/hello_nextflow/05_hello_containers.md index 106f13d59b..80c84f4323 100644 --- a/docs/ca/docs/hello_nextflow/05_hello_containers.md +++ b/docs/ca/docs/hello_nextflow/05_hello_containers.md @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` Com abans, trobareu els fitxers de sortida al directori especificat al bloc `output` (`results/hello_containers/`). @@ -259,22 +273,22 @@ Ara que esteu dins del contenidor, podeu executar la comanda `cowpy` directament Per exemple, la documentació de l'eina diu que podem canviar el personatge ('cowacter') amb `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Sortida de la comanda" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "Sortida de la comanda (editada per claredat)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` Aquesta vegada sí que funciona! diff --git a/docs/ca/docs/hello_nextflow/06_hello_config.md b/docs/ca/docs/hello_nextflow/06_hello_config.md index 5f5638cf50..dd50580835 100644 --- a/docs/ca/docs/hello_nextflow/06_hello_config.md +++ b/docs/ca/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Com abans, trobareu els fitxers de sortida al directori especificat al bloc `output` (`results/hello_config/`). @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Això encara produeix la mateixa sortida que abans. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` Això crearà un nou conjunt de directoris sota `tux-run/` incloent `tux-run/work/` i `tux-run/results/`. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` El fitxer de sortida final hauria de contenir el caràcter stegosaurus dient les salutacions. @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Això publica les sortides a `custom-outdir-cli/` en lloc de `results/`: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` Això publica les sortides a `custom-outdir-config-2/rep2/`, amb el camí base especificat _i_ el subdirectori del nom del batch _i_ resultats agrupats per procés: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Això publica les sortides a `config-output-mode/`, i encara són totes còpies adequades, no enllaços simbòlics. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "Sortida de la comanda" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` Això hauria de funcionar sense problemes i produir les mateixes sortides que abans sota `custom-outdir-config/conda`. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Com podeu veure, això ens permet alternar entre configuracions molt convenientment en temps d'execució. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` Això utilitzarà Docker on sigui possible i produirà sortides sota `custom-outdir-config/test`, i aquesta vegada el caràcter és el duo còmic `dragonandcow`. diff --git a/docs/ca/docs/hello_nf-core/00_orientation.md b/docs/ca/docs/hello_nf-core/00_orientation.md index 6bedf26a98..98a6123705 100644 --- a/docs/ca/docs/hello_nf-core/00_orientation.md +++ b/docs/ca/docs/hello_nf-core/00_orientation.md @@ -22,25 +22,20 @@ Si esteu treballant en aquest curs pel vostre compte, familiaritzeu-vos amb els ### Requisits de versió -Aquesta formació està dissenyada per a **Nextflow 25.10.2** o posterior **amb l'analitzador de sintaxi v2 DESACTIVAT**. +Aquesta formació funciona amb **Nextflow 25.10.2** o posterior **amb l'analitzador de sintaxi v2**, que és el valor per defecte a partir de Nextflow 26.04. +Al nostre entorn de formació no cal fer res: s'executa Nextflow 26.04.4 amb l'analitzador v2. Si utilitzeu un entorn local o personalitzat, consulteu les [notes de versió](../info/nxf_versions.md). -#### Si utilitzeu el nostre entorn de formació: - -HEU d'executar la comanda següent abans de continuar: - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### Si utilitzeu un entorn local o personalitzat: - -Assegureu-vos que utilitzeu la configuració correcta tal com es documenta [aquí](../info/nxf_versions.md). - -La formació també requereix **nf-core tools 3.5.2**. +La formació també requereix **nf-core tools 4.0.2**. Si utilitzeu una versió diferent de les eines nf-core, podeu tenir dificultats per seguir el curs. Podeu comprovar quina versió està instal·lada al vostre entorn utilitzant la comanda `nf-core --version`. +!!! warning "Compatibilitat amb l'analitzador v2" + + Molts pipelines nf-core encara no admeten l'analitzador de sintaxi v2. + Si executeu un pipeline nf-core diferent dels utilitzats en aquest curs i trobeu errors, és possible que hàgiu de canviar a l'analitzador v1 establint `export NXF_SYNTAX_PARSER=v1`. + Consulteu les [notes de versió](../info/nxf_versions.md) per a més detalls. + ## Prepareu-vos per treballar Un cop el vostre codespace estigui en funcionament, hi ha dues coses que heu de fer abans d'endinsar-vos en la formació: establir el vostre directori de treball per a aquest curs específic i donar un cop d'ull als materials proporcionats. @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ Utilitzem seccions desplegables com aquesta per incloure la sortida esperada de - **El fitxer `greetings.csv`** és un CSV que conté algunes dades columnars mínimes que utilitzem per a proves. +- **El fitxer `custom.config`** és un exemple de fitxer de configuració de Nextflow utilitzat a la Part 1 per demostrar les sobreescriptures de recursos de processos i `ext.args`. + +- **El fitxer `malformed_samplesheet.csv`** és un full de mostres intencionadament incorrecte utilitzat a la Part 1 per demostrar la validació d'entrades. + +- **El fitxer `my_params.yml`** és un exemple de fitxer de paràmetres utilitzat a la Part 1 per demostrar com passar paràmetres booleans a un pipeline. + - **El directori `original-hello`** conté una còpia del codi font produït en treballar durant la sèrie completa de formació Hello Nextflow (amb Docker activat). - **El directori `solutions`** conté els scripts de workflow completats que resulten de cada pas del curs. @@ -112,7 +116,7 @@ Creieu que esteu preparats per començar? - [ ] Entenc l'objectiu d'aquest curs i els seus prerequisits - [ ] El meu entorn està en funcionament -- [ ] M'he assegurat que l'analitzador de sintaxi està establert a **v1** +- [ ] Estic utilitzant nf-core tools 4.0.2 (comproveu-ho amb `nf-core --version`) - [ ] He establert el meu directori de treball adequadament Si podeu marcar totes les caselles, esteu a punt per començar. diff --git a/docs/ca/docs/hello_nf-core/01_run_demo.md b/docs/ca/docs/hello_nf-core/01_run_demo.md index ba4fdbdb73..c198fea38b 100644 --- a/docs/ca/docs/hello_nf-core/01_run_demo.md +++ b/docs/ca/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ La pestanya `Introduction` proporciona una visió general del pipeline, incloent ![mapa de metro del pipeline](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. Exemple de línia de comandes @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow fa un `pull` del codi del pipeline, és a dir, descarrega el repositori complet a la vostra unitat local. @@ -106,40 +107,73 @@ nextflow list Podeu provar de recuperar alguns altres pipelines per veure com apareixen llistats quan en teniu més d'un. -#### 1.2.3. Trobar els vostres pipelines a `$NXF_HOME/assets/` +#### 1.2.3. Trobar on s'ha descarregat el pipeline Notareu que els fitxers no estan al vostre directori de treball actual. -Per defecte, Nextflow els desa a `$NXF_HOME/assets`. +Per defecte, Nextflow desa els pipelines recuperats a `$NXF_HOME/assets`. + +Per saber on es troba un pipeline específic, pregunteu-ho directament a Nextflow: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "Sortida de la comanda" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "Nota" +!!! info "Info" El camí complet pot diferir al vostre sistema si no esteu utilitzant el nostre entorn de formació. Nextflow manté el codi font descarregat intencionadament 'fora del camí' amb el principi que aquests pipelines s'haurien d'utilitzar més com a biblioteques que com a codi amb el qual interactuaríeu directament. +Internament, Nextflow emmagatzema cada pipeline recuperat com un repositori git a `$NXF_HOME/assets/.repos/`, i extreu el codi de cada revisió a un subdirectori `clones//`. +Com que `.repos` és un directori ocult, un simple `tree -L 2 $NXF_HOME/assets/` semblarà buit. + #### 1.2.4. Crear un enllaç simbòlic per accedir fàcilment al codi font No examinarem el codi en detall, però fem-hi una ullada ràpida per tenir una idea de com és l'organització general. -Per facilitar la navegació pel codi font del pipeline, creeu un enllaç simbòlic al directori d'assets: +Per facilitar la navegació pel codi font del pipeline, creeu un enllaç simbòlic que apunti a la còpia extreta del pipeline: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -Això crea una drecera perquè pugueu explorar el codi amb `tree -L 2 pipelines` o obrir fitxers directament. +Això crea una drecera perquè pugueu explorar el codi amb `tree -L 2 pipelines/nf-core/demo` o obrir fitxers directament. #### 1.2.5. Visió general de l'organització del codi @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` Com podeu veure, hi ha molt en marxa allà, però la majoria no us hauria de preocupar. @@ -211,7 +247,7 @@ Convenientment, cada pipeline nf-core ve amb un perfil de prova. Aquest és un conjunt mínim de paràmetres de configuració perquè el pipeline s'executi utilitzant un petit conjunt de dades de prova allotjat al repositori [nf-core/test-datasets](https://github.com/nf-core/test-datasets). És una manera excel·lent de provar ràpidament un pipeline a petita escala. -!!! note "Nota" +!!! tip "Consell" El sistema de perfils de configuració de Nextflow us permet canviar fàcilment entre diferents motors de contenidors o entorns d'execució. Per a més detalls, consulteu [Hello Nextflow Part 6: Configuration](../hello_nextflow/06_hello_config.md). @@ -220,10 +256,10 @@ Aquest és un conjunt mínim de paràmetres de configuració perquè el pipeline És una bona pràctica comprovar què especifica el perfil de prova d'un pipeline abans d'executar-lo. El perfil `test` per a `nf-core/demo` es troba al fitxer de configuració `conf/test.config`. -Podeu trobar-lo localment dins del codi font del pipeline que `nextflow pull` ha descarregat: +Podeu trobar-lo localment dins del codi font del pipeline que `nextflow pull` ha descarregat, mitjançant l'enllaç simbòlic `pipelines` creat a la secció 1.2.4: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` Aquí teniu el contingut d'aquest fitxer: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Dades d'entrada - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` Això s'anomena samplesheet, i és la forma més comuna d'entrada als pipelines nf-core. +No us preocupeu si no esteu familiaritzats amb els formats i tipus de dades, no és important per al que segueix. -!!! note "Nota" - - No us preocupeu si no esteu familiaritzats amb els formats i tipus de dades, no és important per al que segueix. - -Així que això confirma que tenim tot el que necessitem per provar el pipeline. +Ara tenim tot el que necessitem per provar el pipeline. ### 2.2. Executar el pipeline -Decidim utilitzar Docker per al sistema de contenidors i `demo-results` com a directori de sortida, i estem preparats per executar la comanda de prova: +Tal com s'ha indicat anteriorment, podem utilitzar l'exemple de comanda de prova gairebé tal com és; només hem d'especificar quin sistema d'empaquetament de programari volem utilitzar i quin nom donar al directori de sortida. +Aquí utilitzarem Docker per al sistema de contenidors i `demo-results`, respectivament. + +Amb això, podem executar la comanda de prova: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ Si la vostra sortida coincideix amb això, felicitats! Acabeu d'executar el vost Notareu que hi ha molta més sortida a la consola que quan executeu un pipeline Nextflow bàsic. Hi ha una capçalera que inclou un resum de la versió del pipeline, entrades i sortides, i alguns elements de configuració. -!!! note "Nota" +!!! info "Info" La vostra sortida mostrarà diferents marques de temps, noms d'execució i camins de fitxer, però l'estructura general i l'execució del procés haurien de ser similars. Fixeu-vos en la línia prop de la part superior de la sortida: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` Això us indica quina revisió del pipeline s'ha utilitzat. @@ -379,7 +417,7 @@ Com que no hem especificat cap versió, Nextflow ha utilitzat el darrer commit a Per a execucions reproduïbles, hauríeu de fixar una versió específica amb el flag `-r`: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` Això garanteix que s'utilitzi sempre el mateix codi del pipeline, independentment de nous commits o versions. @@ -388,14 +426,15 @@ En aquesta formació ometem `-r` per simplicitat, però en producció sempre hau Passant a la sortida d'execució, donem una ullada a les línies que ens diuen quins processos s'han executat: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Això ens diu que s'han executat tres processos, corresponents a les tres eines mostrades a la pàgina de documentació del pipeline al lloc web nf-core: FASTQC, SEQTK_TRIM i MULTIQC. +Això ens diu que s'han executat quatre processos, corresponents a les quatre eines mostrades a la pàgina de documentació del pipeline al lloc web nf-core: `FASTQC`, `SEQTK_TRIM`, `MULTIQC` i `COWPY`. Els noms complets dels processos tal com es mostren aquí, com ara `NFCORE_DEMO:DEMO:MULTIQC`, són més llargs del que potser heu vist al material introductori Hello Nextflow. Aquests inclouen els noms dels seus workflows pare i reflecteixen la modularitat del codi del pipeline. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` Això pot semblar molt. -Per aprendre més sobre les sortides del pipeline `nf-core/demo`, consulteu la seva [pàgina de documentació](https://nf-co.re/demo/1.1.0/docs/output/). +Per aprendre més sobre les sortides del pipeline `nf-core/demo`, consulteu la seva [pàgina de documentació](https://nf-co.re/demo/1.2.0/docs/output/). En aquesta etapa, el que és important observar és que els resultats estan organitzats per mòdul, i hi ha addicionalment un directori anomenat `pipeline_info` que conté diversos informes amb marca de temps sobre l'execució del pipeline. @@ -443,7 +485,7 @@ Per exemple, el fitxer `execution_timeline_*` us mostra quins processos s'han ex ![informe de línia de temps d'execució](./img/execution_timeline.png) -!!! note "Nota" +!!! info "Info" Aquí les tasques no s'han executat en paral·lel perquè estem executant en una màquina minimalista a Github Codespaces. Per veure-les executar-se en paral·lel, proveu d'augmentar l'assignació de CPU del vostre codespace i els límits de recursos a la configuració de prova. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,29 +596,103 @@ En pipelines Nextflow simples, `--help` només funciona si el desenvolupador l'h Tal com es tracta a [Hello Config](../hello_nextflow/06_hello_config.md), podeu establir valors de paràmetres a la línia de comandes amb `--nom_parametre` o recollir un conjunt de paràmetres en un fitxer YAML i passar-lo amb `-params-file`. Tots dos enfocaments funcionen de la mateixa manera amb els pipelines nf-core. -Per exemple, per ometre el pas de retallada: +Per exemple, per ometre el pas de retallada, volem establir el paràmetre booleà `skip_trim` a `true`. +Al vostre directori de treball hi ha un fitxer de paràmetres anomenat `my_params.yml` amb aquest valor ja configurat: + +```yaml title="my_params.yml" +skip_trim: true +``` + +Passeu-lo amb `-params-file`: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "Sortida de la comanda" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` El procés `SEQTK_TRIM` ja no apareix a la sortida. -!!! info "Info" +!!! warning "Advertència: limitacions importants sobre les entrades de paràmetres" + + **Establir paràmetres booleans a la línia de comandes** + + A partir de la versió 26.04 de Nextflow, tots els valors subministrats a la línia de comandes es tracten com a strings. + Per a un paràmetre booleà com `skip_trim`, passar-lo com a flag simple (`--skip_trim`) o com `--skip_trim true` s'avalua com el **string** `"true"`, cosa que fa fallar la validació de l'esquema: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + Per establir un paràmetre booleà a un valor genuí `true`/`false`, utilitzeu un `-params-file` tal com es mostra més amunt, o establiu-lo en un fitxer de configuració. + Els paràmetres de tipus string, integer i file-path no es veuen afectats i es poden continuar establint directament a la línia de comandes. + Aquest curs utilitza aquest patró per a tots els paràmetres booleans. + + **Utilitzar fitxers de configuració personalitzats** Tot i que tècnicament és possible establir paràmetres del pipeline en un fitxer de configuració personalitzat passat amb `-c`, és possible que no sobreescrigui els valors per defecte ja establerts al `nextflow.config` propi del pipeline, depenent de les regles de precedència de configuració de Nextflow. Utilitzar `--nom_parametre` a la línia de comandes o `-params-file` és més fiable, ja que aquests sempre tenen prioritat. - **Com a regla general:** si apareix a la sortida de `--help`, establiu-lo mitjançant la línia de comandes o un fitxer de paràmetres en lloc d'un fitxer de configuració. + Com a regla general: si apareix a la sortida de `--help`, establiu-lo mitjançant la línia de comandes o un fitxer de paràmetres en lloc d'un fitxer de configuració. #### 3.1.3. Validació de paràmetres @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` El pipeline continua executant-se, però l'avís us alerta immediatament que `--foobar` no és un paràmetre reconegut. -Això detecta errors tipogràfics com `--outDir` en lloc de `--outdir` abans que malgasteu temps de còmput preguntant-vos per què la sortida ha anat al lloc equivocat. +Això vol cridar la vostra atenció sobre errors tipogràfics que no trenquen l'execució, com ara `--outDir` en lloc de `--outdir`, cosa que us pot ajudar a evitar malgastar temps i recursos de còmput. ##### 3.1.3.2. Valors de paràmetres no vàlids @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` El pipeline s'atura abans que s'executi cap procés, estalviant-vos una execució fallida o incorrecta. -Els paràmetres booleans s'han de passar com a flags (`--skip_trim`) sense cap valor, o establir-se a `true`/`false` en un fitxer de paràmetres. +Tal com s'indica a la secció 3.1.2, els paràmetres booleans s'han d'establir a un valor genuí `true`/`false` en un fitxer de paràmetres en lloc de passar-los a la línia de comandes, ja que els valors de la línia de comandes es tracten com a strings. #### 3.1.4. Validació d'entrada @@ -637,7 +756,7 @@ També ho tractem amb més detall a [Part 5: Input Validation](05_input_validati El pipeline `nf-core/demo` espera un fitxer CSV amb les columnes `sample`, `fastq_1` i `fastq_2`. Això es defineix en un fitxer d'esquema (`assets/schema_input.json`) que especifica l'estructura esperada, els tipus de columnes i les restriccions. -??? abstract "assets/schema_input.json" +??? abstract "Fitxer d'esquema per a les entrades" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Això es defineix en un fitxer d'esquema (`assets/schema_input.json`) que especi L'esquema especifica que `sample` i `fastq_1` són obligatoris, mentre que `fastq_2` és opcional (admetent tant dades paired-end com single-end). Els camins de fitxer es validen per existència i patró d'extensió. -##### 3.1.4.1. Crear un samplesheet no vàlid - -Creeu un samplesheet amb una columna que falta i un camí de fitxer inexistent: +Per demostrar-ho, al vostre directori de treball hi ha un samplesheet mal format anomenat `malformed_samplesheet.csv`: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` A aquest samplesheet li falta la columna obligatòria `fastq_1` i té un camí de fitxer inexistent a `fastq_2`. -Tots dos problemes produiran errors de validació al pas següent. - -##### 3.1.4.2. Executar el pipeline de demostració amb el samplesheet no vàlid -Executeu el pipeline de demostració utilitzant `malformed_samplesheet.csv` com a entrada. +Executeu el pipeline de demostració utilitzant `malformed_samplesheet.csv` com a entrada: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -725,14 +840,27 @@ Els pipelines nf-core inclouen configuració per defecte a `nextflow.config` i a Abans de sobreescriure res, és útil saber on es troben els valors per defecte. Ja heu vist a la secció 2.1 que el codi font del pipeline es troba a `$NXF_HOME/assets`. -Llisteu els fitxers de configuració per veure què hi ha disponible: +Utilitzant l'enllaç simbòlic `pipelines` de la secció 1.2.4, llisteu els fitxers de configuració per veure què hi ha disponible: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ Si voleu modificar qualsevol dels paràmetres especificats en aquests fitxers, n En canvi, creeu el vostre propi fitxer de configuració i passeu-lo amb `-c`. Els valors que especifiqueu sobreescriuran els valors per defecte establerts en aquells altres fitxers. -Fem alguns exercicis per practicar-ho. +Practiquem-ho. -#### 3.2.1. Canviar l'assignació de recursos per a un procés +#### 3.2.1. Personalitzar els recursos dels processos i els arguments de les eines -El pipeline de demostració assigna recursos utilitzant etiquetes definides a `base.config`. -Per exemple, `FASTQC` utilitza l'etiqueta `process_medium`, que assigna 6 CPUs i 36 GB de memòria. +Els mòduls nf-core admeten dos tipus comuns de sobreescriptura de configuració: **assignació de recursos** (CPUs, memòria, temps) i **arguments d'eines** mitjançant `ext.args`. -El perfil de prova limita els recursos mitjançant `resourceLimits`, però també podeu sobreescriure els recursos per a processos específics. +Moltes eines de línia de comandes tenen arguments que no s'utilitzen prou freqüentment com per exposar-los com a paràmetres del pipeline. +La convenció `ext.args` us permet passar aquests arguments a l'eina subjacent mitjançant un fitxer de configuració. -Creeu un fitxer anomenat `custom.config`: +El fitxer `custom.config` proporcionat al vostre directori de treball demostra tots dos tipus de sobreescriptura: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -Executeu el pipeline amb la vostra configuració personalitzada: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "Sortida de la comanda" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -El flag `-c` afegeix la vostra configuració a sobre de la configuració integrada del pipeline. - -#### 3.2.2. Establir valors d'arguments d'eines amb `ext.args` - -Moltes eines de línia de comandes tenen arguments que no són obligatoris i, per tant, no es configuren com a paràmetres del pipeline tret que s'utilitzin molt freqüentment. -Per a aquests arguments d'eines, els mòduls nf-core utilitzen una convenció de Nextflow anomenada `ext.args` per passar arguments a l'eina subjacent mitjançant un fitxer de configuració. - -Per exemple, afegim un argument de retallada al mòdul `SEQTK_TRIM` utilitzant `ext.args`. - -##### 3.2.2.1. Actualitzar la configuració personalitzada - -Actualitzeu el vostre `custom.config`: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -Això indica a `seqtk trimfq` que retalli 5 bases del principi de cada lectura a més de la retallada per qualitat. +El primer bloc sobreescriu l'assignació de recursos de `FASTQC`. +Per defecte, `FASTQC` utilitza l'etiqueta `process_medium` de `base.config`, que assigna 6 CPUs i 36 GB de memòria; aquí ho limitem a 2 CPUs i 4 GB. -##### 3.2.2.2. Executar el pipeline +El segon bloc passa un argument addicional a `SEQTK_TRIM` mitjançant `ext.args`. +El flag `-b 5` indica a `seqtk trimfq` que retalli 5 bases del principi de cada lectura a més de la retallada per qualitat. -Executeu el pipeline de nou amb aquesta configuració per veure l'efecte: +Executeu el pipeline amb aquesta configuració: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "Sortida de la comanda" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Per verificar que l'argument s'ha aplicat, trobeu el hash del directori de treball de `SEQTK_TRIM` a la sortida de l'execució (per exemple, `work/ab/cd1234...`) i comproveu el fitxer `.command.sh` que hi ha dins: +El flag `-c` afegeix la vostra configuració a sobre de la configuració integrada del pipeline. + +Per verificar que la sobreescriptura de `ext.args` ha tingut efecte, trobeu el hash del directori de treball de `SEQTK_TRIM` a la sortida de l'execució (per exemple, `work/17/428668...`) i comproveu el fitxer `.command.sh` que hi ha dins: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "Sortida de la comanda" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` -Hauríeu de veure `-b 5` a la comanda `seqtk trimfq`, confirmant que la sobreescriptura de `ext.args` ha tingut efecte. +Hauríeu de veure `-b 5` a la comanda `seqtk trimfq`. -##### 3.2.2.3. Sobreescriure valors per defecte - -Alguns mòduls ja tenen `ext.args` establert per defecte. -Per exemple, el mòdul `FASTQC` està configurat amb `ext.args = '--quiet'` per defecte (definit a `conf/modules.config`). +Una cosa important a saber sobre `ext.args`: si un mòdul ja té un valor per defecte establert, el vostre valor el **reemplaçarà completament** en lloc d'afegir-s'hi. +Per exemple, `FASTQC` té `ext.args = '--quiet'` establert per defecte a `conf/modules.config`: ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -Si proporcioneu un valor per a `ext.args` mitjançant un fitxer de configuració personalitzat, aquest valor reemplaçarà completament el valor per defecte establert per a aquell procés. - -Així, per exemple, si el valor per defecte era `'--quiet'` i establiu `ext.args = '--kmers 8'`, el flag `--quiet` ja no s'aplicarà. +Si establiu `ext.args = '--kmers 8'` per a `FASTQC`, el flag `--quiet` ja no s'aplicarà. Per mantenir tots dos, establiu `ext.args = '--quiet --kmers 8'`. -Això significa que sou responsables de comprovar quina és la configuració per defecte de les eines a les quals voleu proporcionar valors d'arguments amb `ext.args`. +Sempre hauríeu de comprovar la configuració per defecte d'un mòdul abans de sobreescriure `ext.args`. ### Conclusió @@ -878,4 +976,6 @@ Sabeu com obtenir ajuda d'un pipeline nf-core, establir paràmetres i entendre c ### Què segueix? -Feu una pausa! Quan estigueu preparats, passeu a la Part 2, on creareu el vostre propi pipeline compatible amb nf-core des de zero. +Si simplement voleu executar pipelines nf-core, ja heu acabat! + +Si voleu aprendre a desenvolupar els vostres propis pipelines seguint els estàndards nf-core, feu una pausa i passeu a la Part 2 quan estigueu preparats. Aprendreu a crear el vostre propi pipeline compatible amb nf-core utilitzant les eines basades en la plantilla nf-core. diff --git a/docs/ca/docs/hello_nf-core/02_rewrite_hello.md b/docs/ca/docs/hello_nf-core/02_rewrite_hello.md index 005a4ddee0..73fbfdbc9a 100644 --- a/docs/ca/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/ca/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Si no esteu familiaritzats amb el pipeline Hello o us caldria un recordatori, co - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "Nota" - - Assegureu-vos que esteu al directori `hello-nf-core` al vostre terminal. - --- ## 1. Examinar l'estructura del codi del pipeline @@ -30,6 +26,7 @@ El projecte nf-core aplica directrius estrictes sobre com s'estructuren els pipe Abans d'abordar el nostre projecte de creació de pipeline, hem d'entendre aquesta estructura i organització. Així doncs, donem una ullada a com s'organitza el codi del pipeline al repositori `nf-core/demo`, utilitzant l'enllaç simbòlic `pipelines` que vam crear a la Part 1. +Assegureu-vos que esteu al directori `hello-nf-core` al vostre terminal. Com a recordatori, podeu utilitzar `tree` o l'explorador de fitxers per trobar i obrir el directori `nf-core/demo`. @@ -82,7 +79,7 @@ Aquí teniu com es veuen les relacions entre els components de codi rellevants: El workflow sense nom a `main.nf` s'anomena script _entrypoint_. Actua com a embolcall per a dos tipus de workflows niats: el workflow `DEMO` que conté la lògica d'anàlisi real, ubicat a `workflows/demo.nf`, i un conjunt de workflows de manteniment ubicats sota `subworkflows/`. El workflow `demo.nf` crida **mòduls** ubicats sota `modules/`; aquests contenen els **processos** que realitzaran els passos d'anàlisi reals. -!!! note "Nota" +!!! info "Info" Els subworkflows no es limiten a funcions de manteniment, i poden fer ús de mòduls de processos. @@ -107,7 +104,7 @@ Cobrirem les diferències rellevants a la següent part d'aquest curs, quan abor El workflow `demo.nf` crida **mòduls** ubicats sota `modules/`, que revisarem a continuació. -!!! note "Nota" +!!! info "Info" Alguns workflows d'anàlisi nf-core mostren nivells addicionals de niament cridant subworkflows de nivell inferior. Això s'utilitza principalment per agrupar dos o més mòduls que s'utilitzen habitualment junts en segments de pipeline fàcilment reutilitzables. @@ -266,13 +263,20 @@ Un cop es tanqui la TUI, hauríeu de veure la següent sortida a la consola. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -No hi ha cap confirmació explícita a la sortida de la consola que la creació del pipeline hagi funcionat, però hauríeu de veure un nou directori anomenat `core-hello`. +Un cop la TUI hagi acabat, l'eina informa que ha creat el pipeline i ha generat la seva configuració de contenidor: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +Ara hauríeu de veure un nou directori anomenat `core-hello`. Visualitzeu el contingut del nou directori per veure quanta feina us heu estalviat utilitzant la plantilla. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "Contingut del directori" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` Són molts fitxers! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +Les línies `WARN: Unrecognized config option 'validation.*'` provenen de la versió del plugin nf-schema fixada a la plantilla recentment creada. +Són inofensives i no afecten l'execució. + Això us mostra que tot el cablejat bàsic està en el seu lloc. Així doncs, on són les sortides? N'hi ha cap? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -435,7 +446,7 @@ Donem-hi una ullada més detallada. Això serveix com a marcador de posició per al nostre workflow d'anàlisi, amb alguna funcionalitat nf-core ja en el seu lloc. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -454,14 +465,16 @@ workflow HELLO { take: ch_samplesheet // canal: samplesheet llegit des de --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -478,19 +491,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // canal: [ path(versions.yml) ] - } /* @@ -503,15 +513,15 @@ workflow HELLO { En comparació amb un workflow bàsic de Nextflow com el desenvolupat a [Hello Nextflow](../hello_nextflow/index.md), notareu algunes coses que són noves aquí (línies destacades anteriorment): - El bloc workflow té un nom -- Les entrades del workflow es declaren utilitzant la paraula clau `take:` i la construcció del canal es mou cap al workflow pare +- Les entrades del workflow es declaren utilitzant la paraula clau `take:` (aquí un canal de samplesheet i un directori de sortida), i la construcció del canal es mou cap al workflow pare - El contingut del workflow es col·loca dins d'un bloc `main:` - Les sortides es declaren utilitzant la paraula clau `emit:` Aquestes són funcionalitats opcionals de Nextflow que fan que el workflow sigui **composable**, és a dir, que es pot cridar des de dins d'un altre workflow. -??? note "El bloc `Channel.topic`" +??? note "El bloc `channel.topic`" - Potser haureu notat el bloc `def topic_versions = Channel.topic("versions")` que comença a la línia 17. + Potser haureu notat el bloc `def topic_versions = channel.topic("versions")` que comença a la línia 28. Aquest és codi de manteniment estàndard que recull informació de versions de programari de tots els mòduls automàticament. nf-core està desplegant aquest mecanisme a tots els pipelines el 2026, de manera que el veureu a tots els nous pipelines d'ara endavant. La Part 4 d'aquest curs explica com funciona en detall. @@ -575,15 +585,15 @@ nextflow run original-hello/hello.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` Si funciona, esteu a punt per començar a modificar el codi. @@ -704,7 +714,7 @@ Mentre hi som, també podem comentar la línia `params.greeting = 'greetings.csv params.character = 'turkey' ``` -!!! note "Nota" +!!! info "Info" Si teniu instal·lada l'extensió del servidor de llenguatge Nextflow, el verificador de sintaxi il·luminarà el vostre codi amb línies ondulades vermelles. Això és perquè si poseu una declaració `take:`, també heu de tenir un `main:`. @@ -851,7 +861,7 @@ Hi ha dues observacions importants a fer aquí: - La sintaxi per cridar el workflow importat és essencialment la mateixa que la sintaxi per cridar mòduls. - Tot el que està relacionat amb portar les entrades al workflow (paràmetre d'entrada i construcció del canal) ara es declara en aquest workflow pare. -!!! note "Nota" +!!! info "Info" Anomenar el fitxer de workflow entrypoint `main.nf` és una convenció, no un requisit. @@ -878,19 +888,19 @@ Si heu fet tots els canvis correctament, això hauria de completar-se. ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -Això significa que hem actualitzat amb èxit el nostre workflow HELLO per ser composable. +Això significa que hem actualitzat amb èxit el nostre workflow `HELLO` per ser composable. ### Conclusió @@ -932,14 +942,16 @@ workflow HELLO { take: ch_samplesheet // canal: samplesheet llegit des de --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -956,19 +968,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // canal: [ path(versions.yml) ] - } /* @@ -978,8 +987,8 @@ workflow HELLO { */ ``` -Les línies destacades defineixen l'estructura del workflow composable: `workflow HELLO {`, `take:`, `main:` i `emit:`. -El gran bloc entre les línies 17–34 és més substancial: gestiona la captura de versions de programari utilitzant topic channels, un mecanisme que nf-core està desplegant a tots els pipelines el 2026. +Aquesta és l'estructura del workflow composable: un bloc `workflow HELLO {` amb nom que inclou `take:`, `main:` i `emit:`. +El bloc sota `// Collate and save software versions` és més substancial: gestiona la captura de versions de programari utilitzant topic channels, un mecanisme que nf-core està desplegant a tots els pipelines el 2026. Ho explicarem a la Part 4; de moment, tracteu-lo com a codi estàndard que podeu deixar sense modificar. Necessitem afegir el codi rellevant de la versió composable del workflow original que vam desenvolupar a la secció 2. @@ -991,7 +1000,7 @@ Abordarem això en les següents etapes: 3. Afegir la lògica del workflow al bloc `main` 4. Actualitzar el bloc `emit` -!!! note "Nota" +!!! info "Info" Ignorarem el bloc de captura de versions per a aquesta primera passada. La Part 4 explica com funciona. @@ -1079,9 +1088,10 @@ Dues observacions més interessants aquí: El projecte nf-core té molta funcionalitat preconstruïda al voltant del concepte del samplesheet, que normalment és un fitxer CSV que conté dades en columnes. Com que això és essencialment el que és el nostre fitxer `greetings.csv`, mantindrem la declaració `take` actual tal com està, i simplement actualitzarem el nom del canal d'entrada al següent pas. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // canal: samplesheet llegit des de --input + outdir ``` El maneig de l'entrada es farà abans d'aquest workflow (no en aquest fitxer de codi). @@ -1111,20 +1121,21 @@ Com a recordatori, aquest és el codi rellevant al workflow original, que no va Necessitem copiar el codi que ve després de `main:` a la nova versió del workflow. Ja hi ha algun codi allà que té a veure amb capturar les versions de les eines que executa el workflow. Ho deixarem estar per ara (tractarem les versions de les eines més endavant). -Mantindrem la inicialització `ch_versions = channel.empty()` a la part superior, després inserirem la nostra lògica de workflow, mantenint el codi de recopilació de versions al final. +Mantindrem la inicialització `def ch_versions = channel.empty()` a la part superior, després inserirem la nostra lògica de workflow, mantenint el codi de recopilació de versions al final. Aquest ordre té sentit perquè en un pipeline real, els processos emetrien informació de versió que s'afegiria al canal `ch_versions` mentre s'executa el workflow. === "Després" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // canal: samplesheet llegit des de --input + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // emet una salutació sayHello(greeting_ch) @@ -1141,7 +1152,7 @@ Aquest ordre té sentit perquè en un pipeline real, els processos emetrien info // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1158,37 +1169,36 @@ Aquest ordre té sentit perquè en un pipeline real, els processos emetrien info "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // canal: [ path(versions.yml) ] - } ``` === "Abans" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // canal: samplesheet llegit des de --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1205,36 +1215,31 @@ Aquest ordre té sentit perquè en un pipeline real, els processos emetrien info "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // canal: [ path(versions.yml) ] - } ``` -Notareu que també hem afegit una línia en blanc abans de `main:` per fer el codi més llegible. - Això es veu genial, però encara necessitem actualitzar el nom del canal que estem passant al procés `sayHello()` de `greeting_ch` a `ch_samplesheet` tal com es mostra a continuació, per coincidir amb el que està escrit sota la paraula clau `take:`. === "Després" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // emet una salutació (actualitzat per utilitzar la convenció nf-core per a samplesheets) sayHello(ch_samplesheet) ``` === "Abans" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // emet una salutació sayHello(greeting_ch) ``` @@ -1247,7 +1252,7 @@ Finalment, necessitem actualitzar el bloc `emit` per incloure la declaració de === "Després" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // canal: [ path(versions.yml) ] @@ -1255,12 +1260,12 @@ Finalment, necessitem actualitzar el bloc `emit` per incloure la declaració de === "Abans" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // canal: [ path(versions.yml) ] ``` -Això conclou les modificacions que necessitem fer al workflow HELLO en si. +Això conclou les modificacions que necessitem fer al workflow `HELLO` en si. En aquest punt, hem aconseguit l'estructura general del codi que ens vam proposar implementar. ### Conclusió @@ -1324,7 +1329,8 @@ workflow CORE_HELLO { // WORKFLOW: Run pipeline // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1361,7 +1367,6 @@ workflow { // SUBWORKFLOW: Run completion tasks // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1377,7 +1382,7 @@ El projecte nf-core fa un ús intensiu de subworkflows niats, així que aquesta El que importa aquí és que hi ha dos workflows definits: -- `CORE_HELLO` és un embolcall prim per executar el workflow HELLO que acabem d'acabar d'adaptar a `core-hello/workflows/hello.nf`. +- `CORE_HELLO` és un embolcall prim per executar el workflow `HELLO` que acabem d'acabar d'adaptar a `core-hello/workflows/hello.nf`. - Un workflow sense nom que crida `CORE_HELLO` així com dos altres subworkflows, `PIPELINE_INITIALISATION` i `PIPELINE_COMPLETION`. Aquí hi ha un diagrama de com es relacionen entre ells: @@ -1422,9 +1427,9 @@ Si obrim aquest fitxer i desplacem cap avall, arribem a aquest fragment de codi: versions = ch_versions ``` -Aquesta és la factoria de canals que analitza el samplesheet i el passa en una forma que està llesta per ser consumida pel workflow HELLO. +Aquesta és la factoria de canals que analitza el samplesheet i el passa en una forma que està llesta per ser consumida pel workflow `HELLO`. -!!! note "Nota" +!!! info "Info" La sintaxi anterior és una mica diferent del que hem utilitzat anteriorment, però bàsicament això: @@ -1533,7 +1538,7 @@ Ara podem actualitzar el fitxer `test.config` de la següent manera: === "Després" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1595,13 +1600,53 @@ I mentre hi som, ajustem els límits de recursos per defecte per assegurar que a Això completa les modificacions de codi que necessitem fer. -### 5.4. Executar el pipeline amb el perfil de test +### 5.4. Desactivar la validació de paràmetres + +Hem substituït l'anàlisi del samplesheet de la plantilla per la nostra pròpia construcció de canal simple, però la plantilla encara inclou un `nextflow_schema.json` i `assets/schema_input.json` que descriuen un samplesheet basat en fastq. +Com que encara no hem adaptat aquests esquemes al nostre format `greetings.csv`, necessitem desactivar la validació de paràmetres per ara (ho configurarem correctament més endavant). + +Obriu `core-hello/nextflow.config` i establiu `validate_params` a `false`: + +=== "Després" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "Abans" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +Ho establim al fitxer de configuració en lloc de a la línia de comandes perquè a partir de la versió 26.04 de Nextflow, tots els valors subministrats a la línia de comandes es tipifiquen com a strings. +Com a resultat, els paràmetres Boolean s'han d'establir en un fitxer de configuració o un `-params-file` per prendre un valor genuí `true`/`false`. + +Per exemple, utilitzar `--validate_params false` aquí s'avaluaria com el **string** `"false"`, cosa que deixaria la validació activada. + +!!! tip "Línies de compatibilitat del parser v2 a `nextflow.config`" + + Parlant de la sintaxi v2, potser noteu aquestes dues línies just a sota del bloc `params` al fitxer de configuració: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + Aquestes són necessàries per a la compatibilitat amb el parser de sintaxi v2. + + - Amb la sintaxi v2, les variables `params.*` no es poden referenciar directament dins de les directives `publishDir` als mòduls de processos, de manera que `outputDir` es defineix aquí com a variable de configuració de nivell superior a la qual poden accedir aquestes directives. + + - `workflow.output.mode` estableix el mode de publicació per defecte per al bloc de sortida del workflow v2. + + Tots dos es generen automàticament per la plantilla del pipeline nf-core i no cal modificar-los. + +### 5.5. Executar el pipeline amb el perfil de test Ha estat molt, però finalment podem provar d'executar el pipeline! -Tingueu en compte que hem d'afegir `--validate_params false` a la línia de comandes perquè encara no hem configurat la validació (això vindrà més endavant). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` Si heu fet totes les modificacions correctament, hauria de completar-se. @@ -1609,9 +1654,9 @@ Si heu fet totes les modificacions correctament, hauria de completar-se. ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1623,10 +1668,10 @@ Si heu fet totes les modificacions correctament, hauria de completar-se. Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1637,17 +1682,17 @@ Si heu fet totes les modificacions correctament, hauria de completar-se. !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -Com podeu veure, això va produir el resum típic d'nf-core a l'inici gràcies al subworkflow d'inicialització, i les línies per a cada mòdul ara mostren els noms complets PIPELINE:WORKFLOW:module. +Com podeu veure, això va produir el resum típic d'nf-core a l'inici gràcies al subworkflow d'inicialització, i les línies per a cada mòdul ara mostren els noms complets `PIPELINE:WORKFLOW:module`. -### 5.5. Trobar les sortides del pipeline +### 5.6. Trobar les sortides del pipeline La pregunta ara és: on són les sortides del pipeline? I la resposta és força interessant: ara hi ha dos llocs diferents per buscar els resultats. @@ -1663,17 +1708,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1683,7 +1728,7 @@ Aquesta vegada veieu totes les tasques que es van executar com s'esperava. ![informe de línia de temps d'execució per al pipeline Hello](./img/execution_timeline_hello.png) -!!! note "Nota" +!!! info "Info" Una vegada més les tasques no es van executar en paral·lel perquè estem executant en una màquina minimalista a Github Codespaces. Per veure-les executar-se en paral·lel, proveu d'augmentar l'assignació de CPU del vostre codespace i els límits de recursos a la configuració de test. diff --git a/docs/ca/docs/hello_nf-core/03_use_module.md b/docs/ca/docs/hello_nf-core/03_use_module.md index 09e44849fc..6dd1c27612 100644 --- a/docs/ca/docs/hello_nf-core/03_use_module.md +++ b/docs/ca/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ Per demostrar com funciona això, substituirem el mòdul personalitzat `collectG Podeu comprovar que s'executa correctament executant la comanda següent: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ Navegueu a la pàgina de mòduls al vostre navegador web i utilitzeu la barra de Com podeu veure, hi ha força resultats, molts d'ells mòduls dissenyats per concatenar tipus de fitxers molt específics. Entre ells, hauríeu de veure un anomenat `find_concatenate` que és de propòsit general. -!!! note "Convenció de nomenclatura de mòduls" +!!! info "Convenció de nomenclatura de mòduls" El guió baix (`_`) s'utilitza com a substitut del caràcter barra (`/`) als noms de mòduls. @@ -120,9 +120,11 @@ Això mostra documentació sobre el mòdul, incloent les seves entrades, sortide | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ Això mostra documentació sobre el mòdul, incloent les seves entrades, sortide Aquesta és exactament la mateixa informació que podeu trobar al lloc web. +Podeu ignorar el missatge `INFO Reinstalling modules found in 'modules.json' but missing from directory`; l'emet nf-core/tools 4.0.2 per a qualsevol mòdul que consulteu amb `info`, estigui o no instal·lat, i no té cap efecte ja que la comanda `info` no escriu cap fitxer. + ### 1.4. Instal·lar el mòdul find/concatenate Ara que hem trobat el mòdul que volem, hem d'afegir-lo al codi font del nostre pipeline. @@ -193,15 +197,13 @@ Ara que hem trobat el mòdul que volem, hem d'afegir-lo al codi font del nostre La bona notícia és que el projecte nf-core inclou eines per facilitar aquesta part. Específicament, la comanda `nf-core modules install` permet automatitzar la recuperació del codi i fer-lo disponible al vostre projecte en un sol pas. -Navegueu al directori del vostre pipeline i executeu la comanda d'instal·lació: +Assegureu-vos que el vostre directori de treball actual és l'arrel del projecte de pipeline `core-hello` i executeu la comanda d'instal·lació: ```bash cd core-hello nf-core modules install find/concatenate ``` -L'eina procedirà a instal·lar el mòdul. - ??? success "Sortida de la comanda" ```console @@ -212,26 +214,20 @@ L'eina procedirà a instal·lar el mòdul. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -La comanda automàticament: - -- Descarrega els fitxers del mòdul a `modules/nf-core/find/concatenate/` -- Actualitza `modules.json` per fer seguiment del mòdul instal·lat -- Us proporciona la declaració `include` correcta per utilitzar al vostre workflow - -!!! tip "Consell" - - Assegureu-vos sempre que el vostre directori de treball actual és l'arrel del vostre projecte de pipeline abans d'executar la comanda d'instal·lació del mòdul. +La comanda descarrega els fitxers del mòdul a `modules/nf-core/find/concatenate/` i actualitza `modules.json` per fer seguiment del mòdul instal·lat. +Podeu ignorar el `NotADirectoryError` al final; es produeix perquè nf-core/tools 4.0.2 espera que cada mòdul local resideixi al seu propi directori (`modules/local//main.nf`), mentre que `core-hello` encara utilitza mòduls locals d'un sol fitxer en aquesta etapa. +No obstant això, el mòdul `find/concatenate` s'instal·la correctament i `modules.json` s'actualitza com s'espera. +Convertirem `cowpy` a l'estructura de directoris a la Part 4. -Comprovem que el mòdul s'ha instal·lat correctament: +Comprovem que els fitxers del mòdul estan al seu lloc: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -També podeu verificar la instal·lació demanant a la utilitat nf-core que llisti els mòduls instal·lats localment: +També podeu confirmar la instal·lació inspeccionant `modules.json`, que ara llista `find/concatenate` sota el repositori nf-core/modules. + +??? abstract "Contingut del fitxer" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +Això confirma que el mòdul `find/concatenate` ara forma part del codi font del vostre projecte. +No obstant això, per utilitzar realment el nou mòdul, hem d'importar-lo al nostre pipeline. + +Finalment, també podeu utilitzar la comanda `nf-core modules list local` per comprovar quins mòduls es fan seguiment actualment al vostre pipeline. ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "Sortida de la comanda" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -Això confirma que el mòdul `find/concatenate` ara forma part del codi font del vostre projecte. - -No obstant això, per utilitzar realment el nou mòdul, hem d'importar-lo al nostre pipeline. +Això mostra `find/concatenate` a la taula resultant juntament amb el seu repositori, SHA de versió, missatge i data. ### 1.5. Actualitzar les importacions de mòduls @@ -302,7 +354,7 @@ Obriu `core-hello/workflows/hello.nf` i feu la substitució següent: === "Després" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ Obriu `core-hello/workflows/hello.nf` i feu la substitució següent: include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "Abans" @@ -345,7 +397,7 @@ En aquest punt, podríeu estar temptats de començar a editar codi, però val la Tractarem això com una secció separada perquè implica un nou mecanisme que encara no hem cobert: els mapes de metadades. -!!! note "Nota" +!!! info "Info" Opcionalment podeu eliminar el fitxer `collectGreetings.nf`: @@ -373,7 +425,7 @@ Això ens permetrà determinar si podem tractar el nou mòdul com un reemplaçam Idealment això és quelcom que hauríeu de fer _abans_ fins i tot d'instal·lar el mòdul, però bé, més val tard que mai. (Per cert, hi ha una comanda `uninstall` per desfer-se dels mòduls que decidiu que ja no voleu.) -!!! note "Nota" +!!! info "Info" El procés FIND_CONCATENATE inclou una gestió força intel·ligent de diferents tipus de compressió, extensions de fitxer i altres aspectes que no són estrictament rellevants per al que intentem mostrar-vos aquí, així que ignorarem la major part i ens centrarem només en les parts que són importants. @@ -512,7 +564,7 @@ Com s'ha esmentat anteriorment, la configuració d'entrada `tuple val(meta), pat Esperem que pugueu començar a veure com d'útil pot ser això. No només us permet nomenar sortides basant-vos en metadades, sinó que també podeu fer coses com utilitzar-les per aplicar diferents valors de paràmetres, i en combinació amb operadors específics, fins i tot podeu agrupar, ordenar o filtrar dades mentre flueixen pel pipeline. -!!! note "Més informació sobre metadades" +!!! info "Més informació sobre metadades" Per a una introducció completa sobre com treballar amb metadades als workflows Nextflow, incloent com llegir metadades des de fulls de mostres i utilitzar-les per personalitzar el processament, consulteu la missió secundària [Metadades als workflows](../side_quests/metadata/index.md). @@ -543,7 +595,7 @@ Ara que sabeu tot sobre els metamaps (o prou per als propòsits d'aquest curs, a Per claredat, dividirem això i cobrirem cada pas per separat. -!!! note "Nota" +!!! info "Info" Tots els canvis mostrats a continuació es fan a la lògica del workflow al bloc `main` del fitxer de workflow `core-hello/workflows/hello.nf`. @@ -570,11 +622,11 @@ Afegim aquestes línies després de la crida a `convertToUpper`, eliminant la cr === "Després" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // emet una salutacio + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // emet una salutació (actualitzat per utilitzar la convenció nf-core per a fulls de mostres) sayHello(ch_samplesheet) - // converteix la salutacio a majuscules + // converteix la salutació a majúscules convertToUpper(sayHello.out) // crea un mapa de metadades amb el nom del lot com a ID @@ -586,11 +638,11 @@ Afegim aquestes línies després de la crida a `convertToUpper`, eliminant la cr === "Abans" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // emet una salutacio + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // emet una salutació (actualitzat per utilitzar la convenció nf-core per a fulls de mostres) sayHello(ch_samplesheet) - // converteix la salutacio a majuscules + // converteix la salutació a majúscules convertToUpper(sayHello.out) // recull totes les salutacions en un fitxer @@ -608,11 +660,11 @@ A continuació, transformeu el canal de fitxers en un canal de tuples que contin === "Després" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // emet una salutacio + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // emet una salutació (actualitzat per utilitzar la convenció nf-core per a fulls de mostres) sayHello(ch_samplesheet) - // converteix la salutacio a majuscules + // converteix la salutació a majúscules convertToUpper(sayHello.out) // crea un mapa de metadades amb el nom del lot com a ID @@ -627,11 +679,11 @@ A continuació, transformeu el canal de fitxers en un canal de tuples que contin === "Abans" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // emet una salutacio + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // emet una salutació (actualitzat per utilitzar la convenció nf-core per a fulls de mostres) sayHello(ch_samplesheet) - // converteix la salutacio a majuscules + // converteix la salutació a majúscules convertToUpper(sayHello.out) // crea un mapa de metadades amb el nom del lot com a ID @@ -654,11 +706,11 @@ Ara cridem `FIND_CONCATENATE` sobre el canal acabat de crear: === "Després" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // emet una salutacio + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // emet una salutació (actualitzat per utilitzar la convenció nf-core per a fulls de mostres) sayHello(ch_samplesheet) - // converteix la salutacio a majuscules + // converteix la salutació a majúscules convertToUpper(sayHello.out) // crea un mapa de metadades amb el nom del lot com a ID @@ -676,11 +728,11 @@ Ara cridem `FIND_CONCATENATE` sobre el canal acabat de crear: === "Abans" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // emet una salutacio + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // emet una salutació (actualitzat per utilitzar la convenció nf-core per a fulls de mostres) sayHello(ch_samplesheet) - // converteix la salutacio a majuscules + // converteix la salutació a majúscules convertToUpper(sayHello.out) // crea un mapa de metadades amb el nom del lot com a ID @@ -704,11 +756,11 @@ Com que `cowpy` encara no accepta tuples de metadades (ho arreglarem a la següe === "Després" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // emet una salutacio + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // emet una salutació (actualitzat per utilitzar la convenció nf-core per a fulls de mostres) sayHello(ch_samplesheet) - // converteix la salutacio a majuscules + // converteix la salutació a majúscules convertToUpper(sayHello.out) // crea un mapa de metadades amb el nom del lot com a ID @@ -729,11 +781,11 @@ Com que `cowpy` encara no accepta tuples de metadades (ho arreglarem a la següe === "Abans" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // emet una salutacio + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // emet una salutació (actualitzat per utilitzar la convenció nf-core per a fulls de mostres) sayHello(ch_samplesheet) - // converteix la salutacio a majuscules + // converteix la salutació a majúscules convertToUpper(sayHello.out) // crea un mapa de metadades amb el nom del lot com a ID @@ -753,7 +805,7 @@ L'operació `#!groovy .map { meta, file -> file }` extreu el fitxer de la tupla Llavors només cal passar `ch_for_cowpy` a `cowpy` en lloc de `collectGreetings.out.outfile` en aquesta última línia. -!!! note "Nota" +!!! info "Info" A la següent part del curs, actualitzarem `cowpy` per treballar directament amb tuples de metadades, així que aquest pas d'extracció ja no serà necessari. @@ -762,7 +814,7 @@ Llavors només cal passar `ch_for_cowpy` a `cowpy` en lloc de `collectGreetings. Provem que el workflow funciona amb el mòdul `find/concatenate` acabat d'integrar: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` Això hauria d'executar-se raonablement ràpid. @@ -770,40 +822,40 @@ Això hauria d'executar-se raonablement ràpid. ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` Observeu que `FIND_CONCATENATE` ara apareix a la llista d'execució de processos en lloc de `collectGreetings`. diff --git a/docs/ca/docs/hello_nf-core/04_make_module.md b/docs/ca/docs/hello_nf-core/04_make_module.md index a923a23790..56f4f9fb0d 100644 --- a/docs/ca/docs/hello_nf-core/04_make_module.md +++ b/docs/ca/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ Després d'això, et mostrarem com utilitzar la creació de mòduls basada en pl Pots comprovar que s'executa correctament executant la següent comanda: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ Obre el fitxer del mòdul `cowpy.nf` (sota `core-hello/modules/local/`) i modifi === "Després" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Generate ASCII art with cowpy (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "Abans" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Generate ASCII art with cowpy (https://github.com/jeffbuttars/cowpy) process cowpy { ``` En aquest cas, posar-ho en majúscules és completament directe. -Si el nom del procés estigués compost per diverses paraules, per exemple si tinguéssim un procés anomenat MyCowpyTool originalment en camel case, la convenció nf-core seria utilitzar guions baixos per separar-les, resultant en MY_COWPY_TOOL. +Si el nom del procés estigués compost per diverses paraules, per exemple si tinguéssim un procés anomenat `MyCowpyTool` originalment en camel case, la convenció nf-core seria utilitzar guions baixos per separar-les, resultant en `MY_COWPY_TOOL`. #### 1.1.2. Actualitzar la declaració d'importació del mòdul @@ -164,7 +164,7 @@ Així que ara actualitzem les dues referències al procés al bloc workflow de ` // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ Així que ara actualitzem les dues referències al procés al bloc workflow de ` // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ Assegura't de fer **ambdós** canvis, altrament obtindràs un error quan executi Executem el workflow per comprovar que tot funciona correctament després d'aquests canvis. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ Torna al fitxer del mòdul `cowpy.nf` i modifica'l per acceptar tuples de metada === "Després" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ Torna al fitxer del mòdul `cowpy.nf` i modifica'l per acceptar tuples de metada === "Abans" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ Tècnicament això no és necessari, però és una bona pràctica referir-se a s Executem el workflow per comprovar que tot funciona correctament després d'aquests canvis. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Pots veure que hem fet tres canvis. Com a resultat, la interfície del mòdul ara és més simple: només espera les entrades essencials de metadades i fitxers. -!!! note "Nota" +!!! info "Info" L'operador `?:` sovint s'anomena 'operador Elvis' perquè sembla una cara d'Elvis Presley de costat, amb el caràcter `?` simbolitzant l'ona del seu cabell. @@ -623,15 +623,15 @@ Comprovem que el workflow encara funciona com s'espera, especificant un caràcte Executa aquesta comanda utilitzant `kosh`, una de les opcions més... enigmàtiques: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "Sortida de la comanda" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ Per resumir els beneficis d'aquest enfocament: - **Portabilitat**: Els mòduls es poden reutilitzar sense opcions d'eina codificades - **Sense canvis al workflow**: Afegir o canviar opcions d'eina no requereix actualitzar el codi del workflow -!!! note "Nota" +!!! info "Info" El sistema `ext.args` té capacitats addicionals potents no cobertes aquí, incloent canviar valors d'arguments dinàmicament basant-se en metadades. Consulta les [especificacions de mòduls nf-core](https://nf-co.re/docs/guidelines/components/modules) per a més detalls. @@ -841,15 +841,15 @@ En cas que et preguntis, el closure `ext.prefix` té accés a la peça correcta Comprovem que el workflow encara funciona com s'espera. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ Això és tot! Vegem què passa si executem el pipeline ara. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ Ara el `core-hello-results` també conté les sortides del mòdul `COWPY`. Pots veure que Nextflow ha creat aquesta jerarquia de directoris basant-se en els noms del workflow i del mòdul. -!!! note "Nota" +!!! info "Info" Potser notes `hello_software_versions.yml` a `pipeline_info/`. Actualment només conté informació de versions de `FIND_CONCATENATE`, perquè `COWPY` encara no informa de la seva versió. @@ -1098,9 +1098,9 @@ Dit això, pots decidir que vols organitzar les teves entrades de manera diferen Per sobreescriure la directiva `publishDir` per defecte, simplement pots afegir les teves pròpies directives al fitxer `conf/modules.config`. -Per exemple, podries sobreescriure el valor per defecte per a un sol procés utilitzant el selector `withName:`, com en aquest exemple on afegim una directiva `publishDir` personalitzada per al procés 'COWPY'. +Per exemple, podries sobreescriure el valor per defecte per a un sol procés utilitzant el selector `withName:`, com en aquest exemple on afegim una directiva `publishDir` personalitzada per al procés `COWPY`. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ No cal fer cap canvi al bloc script — la versió es declara estàticament al b #### 1.6.2. Executar el pipeline i inspeccionar l'informe de versions ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -La col·lecció del costat del workflow — el bloc `Channel.topic("versions")` que vas veure al workflow de marcador de posició a la Part 2 — se subscriu al tema i escriu aquest informe combinat automàticament. +La col·lecció del costat del workflow — el bloc `channel.topic("versions")` que vas veure al workflow de marcador de posició a la Part 2 — se subscriu al tema i escriu aquest informe combinat automàticament. -!!! note "Compatibilitat amb versions anteriors" +!!! info "Compatibilitat amb versions anteriors" La branca `versions_file` al bloc del topic channel del workflow existeix per gestionar mòduls que encara no s'han actualitzat per utilitzar `topic: versions` i encara escriuen un fitxer `versions.yml` al bloc script amb `emit: versions`. Ambdós estils estan suportats simultàniament durant la transició. @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Patró 1: Tuples de metadades ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ El codi per defecte ofereix alternar entre Docker i Singularity, però simplific === "Abans" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Entorn Conda -Per a l'entorn Conda, el codi del mòdul especifica `conda "${moduleDir}/environment.yml"` el que significa que hauria d'estar configurat al fitxer `environment.yml`. +Per a l'entorn Conda, el codi del mòdul especifica `#!groovy conda "${moduleDir}/environment.yml"` el que significa que hauria d'estar configurat al fitxer `environment.yml`. L'eina de creació de mòduls ens va advertir que no podia trobar el paquet `cowpy` a Bioconda (el canal principal per a eines bioinformàtiques). No obstant això, `cowpy` està disponible a conda-forge, així que pots completar l'`environment.yml` així: @@ -1428,7 +1431,7 @@ Actualitza els blocs d'entrada i sortida: === "Després" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Actualitza els blocs d'entrada i sortida: === "Abans" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` Això especifica: @@ -1453,6 +1456,7 @@ Això especifica: - El nom del paràmetre del fitxer d'entrada (`input_file` en lloc de `input` genèric) - El nom del fitxer de sortida utilitzant el patró de prefix configurable (`#!groovy ${prefix}.txt` en lloc del comodí `*`) - Un nom emit descriptiu (`cowpy_output` en lloc de `output` genèric) +- Una cadena de versió estàtica (`#!groovy val("1.1.5")`) en lloc del `#!groovy eval("cowpy --version")` de la plantilla, coincidint amb el mòdul manual de la secció 1.6 (l'eina `cowpy` no exposa un flag `--version`) Si estàs utilitzant el servidor de llenguatge Nextflow per validar la sintaxi, la part `#!groovy ${prefix}` es marcarà com un error en aquesta etapa perquè encara no l'hem afegit al bloc script. Fem-ho ara. @@ -1515,7 +1519,7 @@ No et preocupis massa si això sembla misteriós; ho incloem per completesa per === "Abans" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1574,15 +1578,15 @@ Tot el que necessitem fer per provar aquesta nova versió del mòdul `COWPY` és Executem el pipeline per provar-lo. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortida de la comanda" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1609,10 +1613,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/ca/docs/hello_nf-core/05_input_validation.md b/docs/ca/docs/hello_nf-core/05_input_validation.md index 2b565126de..5c6ff023b1 100644 --- a/docs/ca/docs/hello_nf-core/05_input_validation.md +++ b/docs/ca/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ En aquesta cinquena part del curs de formació Hello nf-core, us mostrem com uti Podeu comprovar que s'executa correctament executant la comanda següent: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema és el successor del plugin nf-validation obsolet i utilitza l'estànd ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ Ara apliquem aquests principis a la pràctica, començant amb la validació de p Comencem afegint validació de paràmetres al nostre pipeline. Això valida indicadors de línia de comandes com `--input`, `--outdir` i `--batch`. -### 1.1. Configurar la validació per ometre la validació de fitxers d'entrada +### 1.1. Habilitar la validació i ometre la validació de fitxers d'entrada La plantilla de pipeline nf-core ve amb nf-schema ja instal·lat i configurat: - El plugin nf-schema s'instal·la mitjançant el bloc `plugins{}` a `nextflow.config` -- La validació de paràmetres està habilitada per defecte mitjançant `params.validate_params = true` +- La validació de paràmetres es controla mitjançant `params.validate_params` - La validació es realitza pel subworkflow `UTILS_NFSCHEMA_PLUGIN` durant la inicialització del pipeline -El comportament de validació es controla mitjançant l'àmbit `validation{}` a `nextflow.config`. +A les Parts 3 i 4 vam establir `validate_params = false` perquè el pipeline pogués executar-se abans de configurar cap esquema. +Ara que estem preparats per afegir validació, el primer pas és activar-la. -Com que treballarem primer en la validació de paràmetres (aquesta secció) i no configurarem l'esquema de dades d'entrada fins a la secció 2, necessitem dir temporalment a nf-schema que ometi la validació dels continguts del fitxer del paràmetre `input`. +Obriu `nextflow.config` i trobeu el paràmetre `validate_params` (al voltant de la línia 37), i establiu-lo a `true`: -Obriu `nextflow.config` i trobeu el bloc `validation` (al voltant de la línia 247). Afegiu `ignoreParams` per ometre la validació de fitxers d'entrada: +=== "Després" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "Abans" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +El comportament de validació en si es controla mitjançant l'àmbit `validation{}` a `nextflow.config`. + +Com que treballarem primer en la validació de paràmetres (aquesta secció) i no configurarem l'esquema de dades d'entrada fins a la secció 2, també necessitem dir temporalment a nf-schema que ometi la validació dels continguts del fitxer del paràmetre `input`. + +Trobeu el bloc `validation` (al voltant de la línia 252) i afegiu `ignoreParams` per ometre la validació de fitxers d'entrada: === "Després" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ Obriu `nextflow.config` i trobeu el bloc `validation` (al voltant de la línia 2 === "Abans" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ Aquesta configuració indica a nf-schema que: - **`ignoreParams`**: Ometi la validació dels continguts del fitxer del paràmetre `input` (temporal; ho reactivarem a la secció 2) - **`monochromeLogs`**: Desactivi la sortida en color als missatges de validació quan s'estableix a `true` (controlat per `params.monochrome_logs`) -!!! note "Per què ignorar el paràmetre input?" +!!! info "Per què ignorar el paràmetre input?" El paràmetre `input` a `nextflow_schema.json` té `"schema": "assets/schema_input.json"` que indica a nf-schema que validi els *continguts* del fitxer CSV d'entrada contra aquest esquema. Com que encara no hem configurat aquest esquema, ignorem temporalment aquesta validació. @@ -263,7 +280,7 @@ Hauríeu de veure alguna cosa així: | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -Hauríeu de veure que el paràmetre `batch` s'ha afegit a l'esquema amb el camp "required" ara mostrant `["input", "outdir", "batch"]`. +Hauríeu de veure que el paràmetre `batch` s'ha afegit a l'esquema amb el camp `required` ara mostrant `["input", "outdir", "batch"]`. ### 1.5. Provar la validació de paràmetres @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ Obriu `nextflow.config` i elimineu la línia `ignoreParams` del bloc `validation === "Després" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ Obriu `nextflow.config` i elimineu la línia `ignoreParams` del bloc `validation === "Abans" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ Verifiquem que la nostra validació funciona provant entrades vàlides i no vàl #### 2.7.1. Provar amb entrada vàlida Primer, confirmeu que el pipeline s'executa correctament amb entrada vàlida. -Noteu que ja no necessitem `--validate_params false` ja que la validació funciona! +Amb `validate_params = true` i l'esquema d'entrada configurat, tant la validació de paràmetres com la de dades d'entrada s'executen de debò. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/ca/docs/info/nxf_versions.md b/docs/ca/docs/info/nxf_versions.md index f0e2a74481..49ed208a54 100644 --- a/docs/ca/docs/info/nxf_versions.md +++ b/docs/ca/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: A partir de la versió 3.0 del portal de formació, tots els nostres cursos de formació són compatibles amb la versió 25.10.2 de Nextflow o posterior, tret que s'especifiqui el contrari a la pàgina d'índex del curs. (Això no inclou materials obsolets o arxivats que poden no incloure un avís de versió). -La versió de Nextflow carregada per defecte al nostre entorn de formació és **Nextflow 25.10.4**. +La versió de Nextflow carregada per defecte al nostre entorn de formació és **Nextflow 26.04.4**. Com que els cursos ara utilitzen entrades tipades a nivell de workflow així com directives de sortida a nivell de workflow, requereixen l'ús de l'analitzador de sintaxi V2, **tret que s'especifiqui el contrari**. +L'analitzador V2 és el valor per defecte a partir de Nextflow 26.04, de manera que amb la versió que carreguem no cal habilitar-lo manualment. Si teniu previst utilitzar l'entorn que proporcionem a través de [Github Codespaces](../envsetup/01_setup.md) o [devcontainers locals](../envsetup/03_devcontainer.md), no cal que feu res tret que s'indiqui específicament a les instruccions del curs. -No obstant això, si teniu previst treballar amb les formacions al vostre propi entorn ([Instal·lació manual](../envsetup/02_local.md)), haureu d'assegurar-vos d'utilitzar Nextflow versió 25.10.2 o posterior amb l'analitzador de sintaxi v2 habilitat. +No obstant això, si teniu previst treballar amb les formacions al vostre propi entorn ([Instal·lació manual](../envsetup/02_local.md)), haureu d'assegurar-vos d'utilitzar Nextflow versió 25.10.2 o posterior, i d'habilitar l'analitzador de sintaxi v2 si feu servir una versió anterior a la 26.04. ## Versions anteriors dels materials de formació @@ -40,7 +41,7 @@ Tot el codi modern de Nextflow utilitza DSL2. L'analitzador v1 és l'original, més permissiu. L'analitzador v2 és més estricte i habilita noves funcionalitats del llenguatge com el tipat estàtic (entrades i sortides tipades) i directives de sortida a nivell de workflow. L'analitzador v2 també proporciona millors missatges d'error i detecta més errors en temps d'anàlisi en lloc de temps d'execució. -L'analitzador v2 es convertirà en el predeterminat a Nextflow 26.04. +L'analitzador v2 és el predeterminat a partir de Nextflow 26.04. En resum: DSL2 és el llenguatge que escriviu; la versió de l'analitzador de sintaxi determina com d'estrictament s'interpreta aquest llenguatge i quines funcionalitats avançades estan disponibles. @@ -52,21 +53,22 @@ Per a més informació sobre com actualitzar la vostra versió de Nextflow, cons ### Habilitar l'analitzador de sintaxi v2 +A partir de Nextflow 26.04, l'analitzador v2 és el predeterminat, de manera que els passos següents només són necessaris en versions anteriors a la 26.04. + Per **habilitar** l'analitzador de sintaxi v2 per a la vostra sessió actual, executeu la següent comanda al vostre terminal: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Per fer-ho permanent (pendent que v2 es converteixi en el predeterminat a Nextflow 26.04), afegiu la comanda export al vostre perfil de shell (`~/.bashrc`, `~/.zshrc`, etc.): +Per fer-ho permanent, afegiu la comanda export al vostre perfil de shell (`~/.bashrc`, `~/.zshrc`, etc.): ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -Tingueu en compte que la variable d'entorn `NXF_SYNTAX_PARSER=v2` és un requisit temporal. -A partir de Nextflow 26.04, l'analitzador v2 es convertirà en el predeterminat i aquesta configuració ja no serà necessària. +Tingueu en compte que en versions de Nextflow anteriors a la 26.04, la variable d'entorn `NXF_SYNTAX_PARSER=v2` és necessària per accedir a les funcionalitats v2 utilitzades en aquests cursos. ### Deshabilitar l'analitzador de sintaxi v2 diff --git a/docs/ca/docs/nextflow_run/01_basics.md b/docs/ca/docs/nextflow_run/01_basics.md index 12a66b0b4a..a56bd3c84a 100644 --- a/docs/ca/docs/nextflow_run/01_basics.md +++ b/docs/ca/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "Sortida de la comanda" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Si la sortida de la vostra consola s'assembla a això, felicitats, acabeu d'executar el vostre primer workflow de Nextflow! @@ -115,13 +121,14 @@ Si la sortida de la vostra consola s'assembla a això, felicitats, acabeu d'exec Això es va esmentar al començament del curs, però potser us ho heu perdut. Consulteu el material d'ajuda sobre [versions de Nextflow](../info/nxf_versions.md). - En resum, si utilitzeu Nextflow `25.10` necessiteu habilitar l'analitzador de llenguatge v2: + L'analitzador v2 és el predeterminat a partir de Nextflow 26.04, de manera que només veureu això en versions anteriors. + En una versió anterior a la 26.04 necessiteu habilitar l'analitzador de llenguatge v2: ```bash export NXF_SYNTAX_PARSER=v2 ``` -La sortida més important aquí és l'última línia, que està ressaltada a la sortida anterior: +La part més important aquí és la línia ressaltada: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` Hauríeu de veure que les vostres sortides ara es publiquen a un directori anomenat `hello_results` en lloc de `results`: @@ -206,7 +219,7 @@ Això pot sonar confús, així que vegem com es veu a la pràctica. Tornant a la sortida de consola del workflow que hem executat abans, teníem aquesta línia: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` Veieu com la línia comença amb `[a3/1e1535]`? @@ -261,7 +274,7 @@ Vegem què hi ha dins. Hi ha dos conjunts de directoris a `work/`, de les dues execucions diferents del pipeline que hem fet. Cada execució de tasca obté el seu propi directori aïllat per treballar. -En aquest cas el pipeline ha fet el mateix les dues vegades, així que el contingut de cada directori de tasca és idèntic +En aquest cas el pipeline ha fet el mateix les dues vegades, així que el contingut de cada directori de tasca és idèntic. Hauríeu de reconèixer immediatament el fitxer `output.txt`, que de fet és la sortida original del procés `sayHello` que es va publicar al directori `results`. Si l'obriu, trobareu la salutació `Hello World!` de nou. @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "Sortida de la comanda" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` La sortida de consola hauria de semblar familiar, però hi ha una cosa que és una mica diferent en comparació amb abans. @@ -794,7 +813,7 @@ Aprèn més: [2.4. Tornar a executar el workflow amb diferents salutacions](#24- Què indica aquesta sortida de consola? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] La tasca ha fallat i s'ha omès diff --git a/docs/ca/docs/nextflow_run/02_pipeline.md b/docs/ca/docs/nextflow_run/02_pipeline.md index 267923f7e0..3e6eef5414 100644 --- a/docs/ca/docs/nextflow_run/02_pipeline.md +++ b/docs/ca/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Emocionantment, això sembla indicar que es van fer '3 de 3' crides per al procés, cosa que és encoratjadora, ja que hi havia tres files de dades al CSV que vam proporcionar com a entrada. @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "Sortida de la comanda" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Aquesta vegada veiem les tres execucions de procés i els seus subdirectoris de treball associats llistats a la sortida. @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "Sortida de la comanda" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` Veus que com es va prometre, es van executar múltiples passos com a part del workflow; els dos primers (`sayHello` i `convertToUpper`) presumiblement es van executar a cada salutació individual, i el tercer (`collectGreetings`) s'haurà executat només una vegada, a les sortides de les tres crides de `convertToUpper`. @@ -670,13 +706,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "Sortida de la comanda" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` Hauries de veure noves sortides finals nomenades amb el teu nom de lot personalitzat. @@ -921,13 +975,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` Notaràs que les execucions de procés es van emmagatzemar totes amb èxit a la memòria cau, és a dir que Nextflow va reconèixer que ja havia fet el treball sol·licitat, encara que el codi s'ha dividit i el fitxer de workflow principal s'ha reanomenat. @@ -1075,20 +1147,20 @@ Veus que el sistema de fitxers dins del contenidor és diferent del sistema de f Des de dins del contenidor, pots executar la comanda `cowpy` directament. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "Sortida de la comanda" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` Això produeix art ASCII del personatge de vaca per defecte (o 'cowacter') amb una bombolla de parla que conté el text que vam especificar. @@ -1097,22 +1169,22 @@ Ara que has provat l'ús bàsic, pots provar de donar-li alguns paràmetres. Per exemple, la documentació de l'eina diu que podem establir el personatge amb `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Sortida de la comanda" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1298,15 +1370,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` Els tres primers passos es van emmagatzemar a la memòria cau ja que ja els hem executat abans, però el procés `cowpy` és nou així que aquest realment s'executa. diff --git a/docs/ca/docs/nextflow_run/03_config.md b/docs/ca/docs/nextflow_run/03_config.md index c6f33015c4..a4bee16052 100644 --- a/docs/ca/docs/nextflow_run/03_config.md +++ b/docs/ca/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` Això encara produeix la mateixa sortida que anteriorment. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` Això crearà un nou conjunt de directoris sota `tux-run/` incloent `tux-run/work/` i `tux-run/results/`. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` El fitxer de sortida final hauria de contenir el caràcter stegosaurus dient les salutacions. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` Això encara produeix la mateixa sortida que anteriorment, excepte que aquesta vegada trobem les nostres sortides sota `results_config/outdir/`. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` Això encara produeix la mateixa sortida que anteriorment, excepte que aquesta vegada trobem les nostres sortides sota `results_config/pnames/`, i estan agrupades per procés. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` Això encara produeix la mateixa sortida que anteriorment, excepte que aquesta vegada trobem les nostres sortides sota `results_config/outmode/`. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "Sortida de la comanda" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` Això hauria de funcionar sense problemes i produir les mateixes sortides que anteriorment sota `results_config/conda`. @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` Com podeu veure, això ens permet alternar entre configuracions molt convenientment en temps d'execució. @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` Això utilitzarà Docker on sigui possible i produirà sortides sota `results_config/test`, i aquesta vegada el caràcter és el duo còmic `dragonandcow`. @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/ca/docs/nf4_science/_template/02_single_sample.md b/docs/ca/docs/nf4_science/_template/02_single_sample.md index 5d04a4f25d..17b27924cf 100644 --- a/docs/ca/docs/nf4_science/_template/02_single_sample.md +++ b/docs/ca/docs/nf4_science/_template/02_single_sample.md @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/ca/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/ca/docs/nf4_science/genomics/02_per_sample_variant_calling.md index 403bd24cb7..1b9b0d1e24 100644 --- a/docs/ca/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/ca/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` Podeu comprovar que el fitxer d'índex s'ha generat correctament mirant al directori de treball o al directori de resultats. @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` Ara, si mirem la sortida de la consola, veiem els dos processos llistats. @@ -891,13 +911,32 @@ Cosa curiosa: això _pot funcionar_, O _pot fallar_. Per exemple, aquí hi ha un ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Si la vostra execució del workflow va tenir èxit, executeu-la de nou fins que obtingueu un error com aquest: @@ -905,9 +944,9 @@ Si la vostra execució del workflow va tenir èxit, executeu-la de nou fins que ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ Aquesta vegada (i cada vegada) tot hauria de funcionar correctament: ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` El directori de resultats ara conté tant fitxers BAM com BAI per a cada mostra (de la tupla), juntament amb les sortides VCF: @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Això hauria de produir el mateix resultat que abans. El nostre workflow simple de detecció de variants ara té totes les característiques bàsiques que volíem. diff --git a/docs/ca/docs/nf4_science/genomics/03_joint_calling.md b/docs/ca/docs/nf4_science/genomics/03_joint_calling.md index b0d2f1080d..437979bc4b 100644 --- a/docs/ca/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/ca/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` La sortida de Nextflow sembla la mateixa que abans, però els fitxers `.g.vcf` i els seus fitxers d'índex ara estan organitzats en subdirectoris. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` Els dos primers passos estan en memòria cau de l'execució anterior, i el nou pas `GATK_JOINTGENOTYPING` s'executa una vegada sobre les entrades recollides de totes tres mostres. diff --git a/docs/ca/docs/nf4_science/imaging/01_basics.md b/docs/ca/docs/nf4_science/imaging/01_basics.md index a440785f69..a19431adbf 100644 --- a/docs/ca/docs/nf4_science/imaging/01_basics.md +++ b/docs/ca/docs/nf4_science/imaging/01_basics.md @@ -20,12 +20,12 @@ nextflow run hello-world.nf --greeting 'Hello World!' La sortida de la consola hauria de semblar-se a això: ```console title="Output" linenums="1" - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Felicitats, acabeu d'executar el vostre primer workflow de Nextflow! @@ -33,7 +33,7 @@ Felicitats, acabeu d'executar el vostre primer workflow de Nextflow! La sortida més important aquí és l'última línia (línia 6): ```console title="Output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Això ens indica que el procés `sayHello` s'ha executat correctament una vegada (`1 of 1 ✔`). @@ -84,19 +84,19 @@ Això pot sonar confús, així que vegem com es veu a la pràctica. Tornant a la sortida de consola del workflow que hem executat anteriorment, teníem aquesta línia: ```console title="Excerpt of command output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` -Veieu com la línia comença amb `[a3/7be2fa]`? +Veieu com la línia comença amb `[71/8143bd]`? Aquesta és una forma truncada del camí del directori de tasca per a aquesta crida de procés, i us indica on trobar la sortida de la crida del procés `sayHello` dins del camí del directori `work/`. -Podeu trobar el camí complet escrivint la comanda següent (substituint `a3/7be2fa` pel que veieu al vostre propi terminal) i prement la tecla de tabulació per autocompletar el camí o afegint un asterisc: +Podeu trobar el camí complet escrivint la comanda següent (substituint `71/8143bd` pel que veieu al vostre propi terminal) i prement la tecla de tabulació per autocompletar el camí o afegint un asterisc: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -Això hauria de produir el camí complet del directori: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +Això hauria de produir el camí complet del directori: `work/71/8143bd5ed3420e23c5f0dc1a05056d` Vegem què hi ha allà dins. @@ -116,8 +116,8 @@ Els noms exactes dels subdirectoris seran diferents al vostre sistema. ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -136,7 +136,7 @@ Si l'obriu, trobareu la salutació `Hello World!` de nou.
Contingut del fitxer output.txt -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,10 +159,9 @@ El fitxer `.command.sh` és especialment útil perquè us mostra la comanda prin
Contingut del fitxer -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
@@ -357,14 +356,14 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Busqueu la part `cached:` que s'ha afegit a la línia d'estat del procés (línia 5), que significa que Nextflow ha reconegut que ja ha fet aquest treball i simplement ha reutilitzat el resultat de l'execució anterior correcta. +Busqueu la part `cached:` que s'ha afegit a la línia d'estat del procés, que significa que Nextflow ha reconegut que ja ha fet aquest treball i simplement ha reutilitzat el resultat de l'execució anterior correcta. També podeu veure que el hash del subdirectori de treball és el mateix que a l'execució anterior. Nextflow literalment us està assenyalant l'execució anterior i dient "Ja ho vaig fer allà." diff --git a/docs/ca/docs/nf4_science/imaging/02_run_molkart.md b/docs/ca/docs/nf4_science/imaging/02_run_molkart.md index a389c8ff3a..0c943d25a8 100644 --- a/docs/ca/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/ca/docs/nf4_science/imaging/02_run_molkart.md @@ -70,26 +70,34 @@ Això crea un directori `molkart/` que conté el codi font complet del pipeline. Abans d'executar el pipeline complet, aprenguem per què els contenidors són essencials per als pipelines nf-core. -Provem d'executar el pipeline utilitzant el conjunt de dades de prova i els paràmetres de la configuració de prova de molkart: - -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +Subministrarem els paràmetres del pipeline mitjançant un fitxer de paràmetres. +Un fitxer de paràmetres és un fitxer YAML que llista cada paràmetre i el seu valor, la qual cosa manté els valors tipats (com ara enters) intactes i manté la línia de comandes curta. + +Ja hi ha un fitxer `params.yaml` al directori de treball: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` -Desglossem aquests paràmetres: +Aquests paràmetres són: + +- `input`: Camí al full de mostres que conté les metadades de la mostra +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: Paràmetres per a l'emplenament del patró de graella +- `clahe_pyramid_tile`: Mida del nucli per a la millora del contrast +- `segmentation_method`: Quin(s) algorisme(s) utilitzar per a la segmentació cel·lular +- `outdir`: On desar els resultats + +Provem d'executar el pipeline utilitzant aquests paràmetres: -- `--input`: Camí al full de mostres que conté les metadades de la mostra -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: Paràmetres per a l'emplenament del patró de graella -- `--clahe_pyramid_tile`: Mida del nucli per a la millora del contrast -- `--segmentation_method`: Quin(s) algorisme(s) utilitzar per a la segmentació cel·lular -- `--outdir`: On desar els resultats +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "Aquesta comanda fallarà - és intencionat!" @@ -172,17 +180,10 @@ process { } ``` -Ara executeu el pipeline de nou amb la mateixa comanda: +Ara executeu el pipeline de nou, aquesta vegada executant els tres mètodes de segmentació perquè puguem comparar-los més endavant: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` Aquesta vegada, Nextflow: @@ -209,12 +210,13 @@ Mentre s'executa el pipeline, veureu una sortida similar a aquesta: ??? success "Sortida de la comanda" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ Mentre s'executa el pipeline, veureu una sortida similar a aquesta: |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ Mentre s'executa el pipeline, veureu una sortida similar a aquesta: https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,10 +300,10 @@ La línia executor `executor > local (22)` us indica: Cada línia de procés mostra: -- **Hash** (`[1a/2b3c4d]`): Identificador del directori de treball (com abans) +- **Hash** (`[b4/e57ff1]`): Identificador del directori de treball (com abans) - **Nom del procés**: Camí complet del mòdul i nom del procés - **Identificador d'entrada**: Nom de la mostra entre parèntesis -- **Progrés**: Percentatge complet i recompte (p. ex., `1 of 1 ✔`) +- **Progrés**: Recompte de tasques i estat de compleció (p. ex., `1 of 1 ✔`) ### Conclusió @@ -447,7 +444,7 @@ Igual que amb el nostre exemple Hello World, tot el treball real passa al direct ### 4.1. Comprendre l'estructura del directori de treball El directori de treball conté un subdirectori per a cada tasca que es va executar. -Per a aquest pipeline amb 12 tasques, hi haurà 12 subdirectoris de treball. +Per a aquesta execució del pipeline amb 22 tasques, hi haurà 22 subdirectoris de treball. Llisteu el directori de treball: @@ -517,30 +514,29 @@ Això és essencial per a pipelines de llarga durada on les fallades poden ocór Executeu la mateixa comanda de nou, però afegiu `-resume`: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -Hauríeu de veure una sortida com: +Hauríeu de veure una sortida com: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -Observeu `cached: 2` o `cached: 1` per a cada procés - no s'ha tornat a executar res! +Observeu l'anotació `cached: N` a cada procés de preprocessament i segmentació - aquestes tasques s'han reutilitzat en lloc de tornar-se a executar. ### 5.3. Quan resume és útil diff --git a/docs/ca/docs/nf4_science/imaging/03_inputs.md b/docs/ca/docs/nf4_science/imaging/03_inputs.md index 6ad6c27a42..8e1c3992a3 100644 --- a/docs/ca/docs/nf4_science/imaging/03_inputs.md +++ b/docs/ca/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Ara aprendrem dues millors aproximacions per gestionar les entrades: **fitxers d ### 1.1. El problema amb les línies de comandes llargues -Recordeu la nostra comanda de la Part 2: +A la Part 2 ja vam utilitzar un fitxer de paràmetres per mantenir la comanda curta i preservar els valors introduïts (com ara els paràmetres enters de preprocessament) intactes: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -Això funciona, però és difícil de reproduir, compartir o modificar. +Passar molts paràmetres individualment a la línia de comandes és difícil de reproduir, compartir o modificar. Què passa si necessiteu executar la mateixa anàlisi de nou el mes que ve? Què passa si un col·laborador vol utilitzar exactament la vostra configuració? +Un fitxer de paràmetres resol aquest problema. -### 1.2. Solució: Utilitzeu un fitxer de paràmetres +### 1.2. El fitxer de paràmetres -Creeu un fitxer anomenat `params.yaml`: +Aquí teniu el fitxer `params.yaml` que hem estat utilitzant: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -Ara la vostra comanda es converteix en: +Cada paràmetre s'escriu com un parell `clau: valor`. +Escriure els enters sense cometes (per exemple `mindagap_tilesize: 90`) preserva el seu tipus enter, que la validació de paràmetres del pipeline requereix. + +La vostra comanda es converteix en: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -Això és tot! El fitxer de paràmetres documenta la vostra configuració exacta i facilita la reexecució o compartició. +El fitxer de paràmetres documenta la vostra configuració exacta i facilita la reexecució o compartició. ### 1.3. Sobreescrivint paràmetres diff --git a/docs/ca/docs/nf4_science/imaging/04_config.md b/docs/ca/docs/nf4_science/imaging/04_config.md index a230e9d713..ee3c85ebf5 100644 --- a/docs/ca/docs/nf4_science/imaging/04_config.md +++ b/docs/ca/docs/nf4_science/imaging/04_config.md @@ -131,15 +131,16 @@ Com que estem utilitzant `-resume`, Nextflow comprovarà si alguna cosa ha canvi Si els paràmetres, entrades i codi són els mateixos, totes les tasques es recuperaran de la memòria cau i el pipeline es completarà gairebé instantàniament. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -Observa que tots els processos mostren `cached: 2` o `cached: 1` - no s'ha tornat a executar res! +Observa l'anotació `cached: N` a cada procés - les tasques de preprocessament i segmentació emmagatzemades en memòria cau no s'han tornat a executar. ### 2.4. Perfils de prova diff --git a/docs/ca/docs/nf4_science/rnaseq/02_single-sample.md b/docs/ca/docs/nf4_science/rnaseq/02_single-sample.md index 246a085af3..158b09dd63 100644 --- a/docs/ca/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/ca/docs/nf4_science/rnaseq/02_single-sample.md @@ -194,7 +194,7 @@ A `rnaseq.nf`, sota la secció `Pipeline parameters`, declareu un parametre anom * Pipeline parameters */ params { - // Primary input + // Entrada principal input: Path } ``` @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` Això hauria d'executar-se molt ràpidament si heu treballat la Part 1 i ja heu descarregat el contenidor. @@ -542,7 +552,7 @@ Aneu endavant i ompliu la definició del procés per vosaltres mateixos utilitza #!/usr/bin/env nextflow /* - * Trim adapters and run post-trimming QC + * Retalla adaptadors i executa QC post-retallat */ process TRIM_GALORE { @@ -596,7 +606,7 @@ Actualitzeu `rnaseq.nf` per importar el nou mòdul: === "Després" ```groovy title="rnaseq.nf" linenums="3" hl_lines="3" - // Module INCLUDE statements + // Declaracions INCLUDE de mòduls include { FASTQC } from './modules/fastqc.nf' include { TRIM_GALORE } from './modules/trim_galore.nf' ``` @@ -604,7 +614,7 @@ Actualitzeu `rnaseq.nf` per importar el nou mòdul: === "Abans" ```groovy title="rnaseq.nf" linenums="3" - // Module INCLUDE statements + // Declaracions INCLUDE de mòduls include { FASTQC } from './modules/fastqc.nf' ``` @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` Això també hauria d'executar-se molt ràpidament, ja que estem executant sobre un fitxer d'entrada tan petit. @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` Podeu trobar les sortides d'alineament al directori de resultats. diff --git a/docs/ca/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/ca/docs/nf4_science/rnaseq/03_multi-sample.md index 34b9363a95..ccf5f1d940 100644 --- a/docs/ca/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/ca/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` Aquesta vegada cada pas s'executa 6 vegades, una per cada mostra al fitxer CSV. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` S'ha afegit una sola crida a MULTIQC després de les crides de procés en memòria cau. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` Ara tenim dues versions lleugerament divergents del nostre workflow, una per a dades de lectura single-end i una per a dades paired-end. diff --git a/docs/ca/docs/side_quests/debugging/index.md b/docs/ca/docs/side_quests/debugging/index.md index 53af06dc79..9a64f13d04 100644 --- a/docs/ca/docs/side_quests/debugging/index.md +++ b/docs/ca/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. Ús de paraules clau o directives de procés incorrectes @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. Ús de noms de variables incorrectes @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ Si obteniu un error 'No such variable', podeu corregir-lo bé definint la variab val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // Defineix variables en codi Groovy abans del script @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Ús incorrecte de variables Bash @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Variables Groovy vs Bash" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` Manteniu els vostres canals d'entrada definits dins del bloc workflow, i en general seguiu qualsevol altra recomanació que faci l'extensió. @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -889,7 +889,7 @@ El missatge d'error indica clarament que la crida esperava 1 argument però en v process PROCESS_FILES { input: - val sample_name // El procés espera només 1 entrada + val sample_name // El procés espera només 1 canal d'entrada output: path "${sample_name}_output.txt" @@ -926,7 +926,7 @@ Per a aquest exemple específic, el procés espera un únic canal i no requereix process PROCESS_FILES { input: - val sample_name // El procés espera només 1 entrada + val sample_name // El procés espera només 1 canal d'entrada output: path "${sample_name}_output.txt" @@ -955,7 +955,7 @@ Per a aquest exemple específic, el procés espera un únic canal i no requereix process PROCESS_FILES { input: - val sample_name // El procés espera només 1 entrada + val sample_name // El procés espera només 1 canal d'entrada output: path "${sample_name}_output.txt" @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` Més habitualment que en aquest exemple, podríeu afegir entrades addicionals a un procés i oblidar actualitzar la crida del workflow en conseqüència, cosa que pot portar a aquest tipus d'error. Afortunadament, aquest és un dels errors més fàcils d'entendre i corregir, ja que el missatge d'error és força clar sobre la discrepància. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "Sortida de la comanda" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` Aquest workflow es completa sense error, però només processa una única mostra! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` Ara hauríeu de veure les tres mostres processades en lloc d'una sola. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "Sortida de la comanda" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. Tècniques de depuració de canals @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. Programari que falta @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "Sortida de la comanda" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "Nota" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker Examinem `bad_resources.nf`: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // ERROR: Límit de temps poc realista input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -Si us assegureu de llegir els vostres missatges d'error, fallades com aquesta no us haurien de desconcertar durant massa temps. Però assegureu-vos d'entendre els requisits de recursos de les comandes que esteu executant per poder configurar les vostres directives de recursos adequadament. +Amb l'executor `local` l'error és menys explícit que ho seria en un planificador: obteniu `process hasn't exited` i `WARN: Killing running tasks` en lloc d'un missatge que anomeni el límit de temps. La connexió a fer és que Nextflow mata una tasca quan supera els recursos que li heu assignat, de manera que quan un procés s'acaba sense un error a nivell de script, comproveu les seves directives de recursos. Aquí el culpable és la directiva `time`, que és massa baixa per a la feina que fa el procés. Assegureu-vos d'entendre els requisits de recursos de les comandes que esteu executant per poder configurar les vostres directives de recursos adequadament. ### 3.4. Tècniques de depuració de processos @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### Comproveu el codi @@ -2249,16 +2237,20 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - Aquest error críptic indica un problema d'anàlisi al voltant de les línies 11-12 al bloc `params{}`. L'analitzador v2 detecta problemes estructurals aviat. + L'analitzador apunta a la línia 25 (`script:`), però el veritable culpable és just a sobre: la coma final després de la declaració `output:` a la línia 23 fa que l'analitzador esperi una altra sortida, de manera que falla quan arriba a `script:`. Aquest és el primer d'una sèrie d'errors de sintaxi a resoldre. Apliqueu el mètode de depuració de quatre fases que heu après: @@ -2300,7 +2292,7 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. ``` ??? solution "Solució" - El `buggy_workflow.nf` conté 9 o 10 errors diferents (depenent de com es comptin) que cobreixen totes les categories principals de depuració. Aquí teniu un desglossament sistemàtic de cada error i com corregir-lo. + El `buggy_workflow.nf` conté 10 errors diferents que cobreixen totes les categories principals de depuració. Aquí teniu un desglossament sistemàtic de cada error i com corregir-lo, en l'ordre en què els trobareu realment a Nextflow 26.04. El compilador resol el workflow en dues passades: primer analitza la sintaxi, i després comprova estàticament que totes les variables estiguin definides. Així doncs, primer resoleu els errors de sintaxi, després un conjunt d'errors de variables no definides, i finalment comencen els errors en temps d'execució. Comencem amb els errors de sintaxi: @@ -2315,6 +2307,8 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. path "${sample_id}_result.txt" ``` + Un cop eliminada la coma, l'analitzador arriba al final del fitxer buscant la clau que hauria de tancar `processFiles` i informa de `Unexpected input: ''`. + **Error 2: Error de sintaxi - Clau de tancament que falta** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. } // Afegiu la clau de tancament que falta ``` + Ara la sintaxi s'analitza correctament, de manera que s'executa el comprovador de tipus estàtic. Informa de totes les variables no definides alhora, abans que s'executi el workflow: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + Aquestes quatre línies corresponen a tres errors diferents, els Errors 3, 4 i 5 a continuació. L'últim, `i`, és una variable Bash que el comprovador de tipus no pot distingir d'una variable Nextflow, de manera que apareix aquí en temps de compilació en lloc de com a fallada en temps d'execució. Corregiu els tres abans de tornar a executar. + **Error 3: Error de nom de variable** ```groovy linenums="26" echo "Processing: ${sample}" // ERROR: hauria de ser sample_id @@ -2348,14 +2353,23 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // ERROR: sample_ids no definida ``` - **Correcció:** Useu el canal correcte i extraieu els IDs de mostra + **Correcció:** Useu el canal correcte ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - En aquest punt el workflow s'executarà, però seguirem obtenint errors (p. ex. `Path value cannot be null` a `processFiles`), causats per una estructura de canal incorrecta. + **Error 5: Error d'escapament de variable Bash** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // ERROR: $i sembla una variable Nextflow no definida + ``` + **Correcció:** Escapeu la variable bash perquè Nextflow la deixi per al shell + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + Un cop resolts aquests errors, el workflow es compila i comença a executar-se. El primer error en temps d'execució prové de `processFiles`, que espera una tupla però rep un valor simple: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **Error 5: Error d'estructura de canal - Sortida de map incorrecta** + **Error 6: Error d'estructura de canal - Sortida de map incorrecta** ```groovy linenums="83" .map { row -> row.sample_id } // ERROR: processFiles espera una tupla ``` @@ -2364,29 +2378,18 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - Però això trencarà la nostra crida per executar `heavyProcess()` anterior, de manera que haurem d'usar un map per passar només els IDs de mostra a aquell procés: + Això corregeix `processFiles`, però `input_ch` ara emet una tupla de dos elements, i `heavyProcess` segueix rebent la tupla sencera quan espera un valor únic. La tupla es renderitza al script com `[sample_005, /path/sample_005.fastq.gz]`, cosa que trenca la comanda Bash amb un error de sintaxi i un estat de sortida 2. - **Error 6: Estructura de canal incorrecta per a heavyProcess** + **Error 7: Estructura de canal incorrecta per a heavyProcess** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // ERROR: input_ch ara té 2 elements per emissió - heavyProcess només necessita 1 (el primer) + heavy_ch = heavyProcess(input_ch) // ERROR: input_ch ara emet una tupla de 2 elements; heavyProcess només necessita el primer element ``` - **Correcció:** Useu el canal correcte i extraieu els IDs de mostra + **Correcció:** Passeu només els IDs de mostra ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - Ara avancem una mica més però rebem un error sobre `No such variable: i`, perquè no hem escapat una variable Bash. - - **Error 7: Error d'escapament de variable Bash** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // ERROR: $i no escapada - ``` - **Correcció:** Escapeu la variable bash - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - Ara obtenim `Process exceeded running time limit (1ms)`, de manera que corregim el límit de temps d'execució per al procés rellevant: + Ara `heavyProcess` s'executa, però arriba al seu límit de temps. A l'executor `local` el missatge és `process hasn't exited` (juntament amb un missatge `WARN: Killing running tasks`) en lloc d'un temps d'espera explícit, de manera que connecteu la tasca eliminada amb la seva directiva `time`: **Error 8: Error de configuració de recursos** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. time '100 s' ``` - A continuació tenim un error `Missing output file(s)` a resoldre: + A continuació tenim un error `Missing output file(s)` a resoldre, perquè el script escriu `${sample_id}.txt` però la declaració de sortida espera `${sample_id}_heavy.txt`: **Error 9: Discrepància en el nom del fitxer de sortida** ```groovy linenums="49" @@ -2408,9 +2411,9 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. done > ${sample_id}_heavy.txt ``` - Els dos primers processos s'han executat, però no el tercer. + El workflow ara es completa sense errors, però la sortida `files` és buida: `handleFiles` no s'ha executat mai. El seu canal d'entrada, `channel.fromPath("*.txt")`, no coincideix amb cap fitxer al directori d'execució, de manera que el procés simplement s'omet en lloc de fallar clarament. - **Error 10: Discrepància en el nom del fitxer de sortida** + **Error 10: Origen de canal incorrecte** ```groovy linenums="88" file_ch = channel.fromPath("*.txt") // Error: intentant prendre l'entrada del pwd en lloc d'un procés handleFiles(file_ch) @@ -2420,7 +2423,7 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. file_ch = handleFiles(heavy_ch) ``` - Amb això, tot el workflow hauria d'executar-se. + Amb això, tot el workflow s'executa de principi a fi i les tres sortides estan poblades. **Workflow corregit complet:** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ Ara és el moment de posar en pràctica l'enfocament sistemàtic de depuració. script: """ # Simula un càlcul pesat - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/ca/docs/side_quests/dev_environment/index.md b/docs/ca/docs/side_quests/dev_environment/index.md index ad880b35ca..ee0dadf69d 100644 --- a/docs/ca/docs/side_quests/dev_environment/index.md +++ b/docs/ca/docs/side_quests/dev_environment/index.md @@ -5,6 +5,7 @@ :material-information-outline:{ .ai-translation-notice-icon } Traducció assistida per IA - [més informació i suggeriments](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) + Els Entorns de Desenvolupament Integrats (IDE) moderns poden transformar radicalment la vostra experiència de desenvolupament amb Nextflow. Aquesta missió secundària se centra específicament en aprofitar VS Code i la seva extensió de Nextflow per escriure codi més ràpidament, detectar errors d'hora i navegar per workflows complexos de manera eficient. !!! note "Això no és un tutorial tradicional" @@ -77,7 +78,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "Sobre els fitxers d'exemple" @@ -334,7 +335,7 @@ Ara explorem la navegació en un workflow més complex utilitzant `complex_workf ### 4.2. Navegació per símbols -Amb `complex_workflow.nf` encara obert, podeu obtenir una visió general de tots els símbols del fitxer escrivint `@` a la barra de cerca a la part superior de VSCode (la drecera de teclat és `Ctrl/Cmd+Shift+O`, però pot no funcionar a Codespaces). Això obre el panell de navegació per símbols, que llista tots els símbols del fitxer actual: +Amb `complex_workflow.nf` encara obert, podeu obtenir una visió general de tots els símbols del fitxer escrivint `@` a la barra de cerca a la part superior de VS Code (la drecera de teclat és `Ctrl/Cmd+Shift+O`, però pot no funcionar a Codespaces). Això obre el panell de navegació per símbols, que llista tots els símbols del fitxer actual: ![Navegació per símbols](../img/symbols.png) @@ -368,7 +369,7 @@ L'extensió de Nextflow de VS Code pot visualitzar el vostre workflow com un Gra ![Previsualització del DAG](../img/dag_preview.png) -Això és només el workflow d'entrada, però també podeu previsualitzar el DAG per als workflows interns fent clic al botó "Preview DAG" sobre el workflow `RNASEQ_PIPELINE {` més amunt: +Aquest és només el workflow d'entrada, però també podeu previsualitzar el DAG per als workflows interns fent clic al botó "Preview DAG" sobre el workflow `RNASEQ_PIPELINE {` més amunt: ![Previsualització del DAG del workflow intern](../img/dag_preview_inner.png) @@ -548,7 +549,7 @@ Si el vostre projecte és un repositori git (com ho és aquest), VS Code mostra: - Vistes de diferències en línia - Capacitats de commit i push -Obriu el panell de Control de Codi Font utilitzant el botó de control de codi font (![Icona de control de codi font](../img/source_control_icon.png)) (`Ctrl+Shift+G` o `Cmd+Shift+G` si esteu treballant amb VSCode localment) per veure els canvis de git i fer commits directament a l'editor. +Obriu el panell de Control de Codi Font utilitzant el botó de control de codi font (![Icona de control de codi font](../img/source_control_icon.png)) (`Ctrl+Shift+G` o `Cmd+Shift+G` si esteu treballant amb VS Code localment) per veure els canvis de git i preparar commits directament a l'editor. ![Panell de Control de Codi Font](../img/source_control.png) diff --git a/docs/ca/docs/side_quests/essential_scripting_patterns/index.md b/docs/ca/docs/side_quests/essential_scripting_patterns/index.md index dd701f8eae..3a6c90e614 100644 --- a/docs/ca/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/ca/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, Usarem aquest conjunt de dades realista per explorar tècniques de programació pràctiques que trobareu en workflows de bioinformàtica reals. - - - - #### Llista de verificació de preparació Creieu que esteu preparats per submergir-vos? @@ -112,9 +108,19 @@ Comenceu amb un workflow senzill que simplement llegeix el fitxer CSV (ja ho hem ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Afegir l'Operador Map @@ -148,7 +162,7 @@ Aquí teniu l'aspecte d'aquesta operació map: === "Després" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ Aquí teniu l'aspecte d'aquesta operació map: === "Abans" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ Ara escriurem lògica de **scripting** dins de la nostra closure per transformar === "Després" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ Ara escriurem lògica de **scripting** dins de la nostra closure per transformar === "Abans" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ Feu el canvi següent: === "Després" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ Feu el canvi següent: === "Abans" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ Afegim una línia per crear una versió simplificada de les nostres metadades qu === "Després" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ Afegim una línia per crear una versió simplificada de les nostres metadades qu === "Abans" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Això mostra tant les metadades completes mostrades per l'operació `view()` com el subconjunt extret que hem imprès amb `println`. @@ -392,7 +412,7 @@ Generem una estructura de canal que comprengui una tupla de 2 elements: el map d === "Després" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -411,7 +431,7 @@ Generem una estructura de canal que comprengui una tupla de 2 elements: el map d === "Abans" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -487,9 +507,9 @@ nextflow run collect.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -503,7 +523,7 @@ Ara vegem el mètode `collect` en una List en acció. Modifiqueu `collect.nf` pe === "Després" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - agrupa múltiples emissions del canal en una @@ -521,7 +541,7 @@ Ara vegem el mètode `collect` en una List en acció. Modifiqueu `collect.nf` pe === "Abans" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - agrupa múltiples emissions del canal en una @@ -545,9 +565,9 @@ nextflow run collect.nf ??? success "Sortida de la comanda" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -616,9 +636,9 @@ nextflow run collect.nf ??? success "Sortida de la comanda" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -675,7 +695,7 @@ Feu el canvi següent al vostre workflow `main.nf` existent: === "Després" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // Scripting per a la transformació de dades def sample_meta = [ @@ -702,7 +722,7 @@ Feu el canvi següent al vostre workflow `main.nf` existent: === "Abans" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // Scripting per a la transformació de dades def sample_meta = [ @@ -745,13 +765,19 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Això mostra les metadades enriquides a partir dels noms de fitxers. @@ -798,8 +824,9 @@ Després modifiqueu el bloc `workflow` per connectar el canal `ch_samples` al pr === "Després" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -826,13 +853,23 @@ Després modifiqueu el bloc `workflow` per connectar el canal `ch_samples` al pr } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "Abans" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -855,9 +892,18 @@ Després modifiqueu el bloc `workflow` per connectar el canal `ch_samples` al pr ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -870,28 +916,41 @@ nextflow run main.nf ??? failure "Sortida de la comanda" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` Podeu veure que el procés intenta executar `fastp` amb un valor `null` per al segon fitxer d'entrada, cosa que fa que falli. Això és perquè el nostre conjunt de dades conté lectures d'un sol extrem, però el procés està codificat per esperar lectures de dos extrems (dos fitxers d'entrada alhora). @@ -955,18 +1014,24 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Sembla bé! Si comprovem les comandes reals que s'han executat (personalitzeu-ho per al vostre hash de tasca): ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Podem veure que Nextflow ha triat correctament la comanda adequada per a lectures d'un sol extrem: @@ -978,7 +1043,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Un altre ús comú de la lògica de script dinàmica es pot veure al [mòdul de Genòmica de Nextflow for Science](../../nf4_science/genomics/03_joint_calling.md). En aquell mòdul, el procés GATK que s'invoca pot prendre múltiples fitxers d'entrada, però cadascun ha d'anar prefixat amb `-V` per formar una línia de comanda correcta. El procés usa scripting per transformar una col·lecció de fitxers d'entrada (`all_gvcfs`) en els arguments de comanda correctes: @@ -1025,11 +1090,12 @@ Incloeu el procés al vostre `main.nf` i afegiu-lo al workflow: === "Després" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1056,15 +1122,25 @@ Incloeu el procés al vostre `main.nf` i afegiu-lo al workflow: ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Abans" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1090,17 +1166,44 @@ Incloeu el procés al vostre `main.nf` i afegiu-lo al workflow: } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` Ara executeu el workflow i comproveu els informes generats a `results/reports/`. Haurien de contenir informació bàsica sobre cada mostra. - +```bash +nextflow run main.nf +``` ??? success "Sortida de la comanda" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` Però, i si volem afegir informació sobre quan i on s'ha produït el processament? Modifiquem el procés per usar variables de **shell** i una mica de substitució de comandes per incloure l'usuari actual, el nom d'amfitrió i la data a l'informe: @@ -1133,11 +1236,18 @@ Si executeu això, notareu un error -- Nextflow intenta interpretar `#!groovy ${ ??? failure "Sortida de la comanda" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Cal escapar-la perquè Bash la pugui gestionar. @@ -1197,7 +1307,7 @@ Per il·lustrar com queda això amb el nostre workflow existent, feu la modifica === "Després" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1224,22 +1334,33 @@ Per il·lustrar com queda això amb el nostre workflow existent, feu la modifica } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Abans" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1266,6 +1387,15 @@ Per il·lustrar com queda això amb el nostre workflow existent, feu la modifica ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1291,13 +1421,22 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` La sortida hauria de mostrar ambdós processos completant-se amb èxit. El workflow ara és molt més net i fàcil de mantenir, amb tota la lògica complexa de processament de metadades encapsulada a la funció `separateMetadata`. @@ -1361,26 +1500,35 @@ nextflow run main.nf -ansi-log false ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` Podeu comprovar la comanda `docker` exacta que s'ha executat per veure l'assignació de CPUs per a qualsevol tasca donada: ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` Hauríeu de veure alguna cosa com: ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` En aquest exemple hem triat un exemple que ha sol·licitat 2 CPUs (`--cpu-shares 2048`), perquè era una mostra d'alta profunditat, però hauríeu de veure assignacions de CPUs diferents depenent de la profunditat de la mostra. Proveu-ho també per a les altres tasques. @@ -1434,7 +1582,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` Això indica que el procés ha estat eliminat per superar els límits de memòria. @@ -1522,7 +1670,7 @@ Incloeu el nou mòdul de `modules/trimgalore.nf`: === "Després" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1540,7 +1688,7 @@ Incloeu el nou mòdul de `modules/trimgalore.nf`: === "Abans" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1558,14 +1706,26 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` Aquí hem usat expressions condicionals petites però potents dins de l'operador `.branch{}` per enrutar mostres basant-nos en les seves metadades. Les mostres humanes amb alta cobertura passen per `FASTP`, mentre que totes les altres mostres passen per `TRIMGALORE`. @@ -1585,7 +1745,7 @@ Afegiu el següent abans de l'operació branch: === "Després" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1605,7 +1765,7 @@ Afegiu el següent abans de l'operació branch: === "Abans" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1626,21 +1786,31 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -Com que hem triat un filtre que exclou algunes mostres, s'han executat menys tasques. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +En aquest cas les tres mostres satisfan el filtre, de manera que totes continuen pel pipeline. +Un llindar més estricte exclouria les mostres de baixa profunditat i reduiria el nombre de tasques que s'executen. L'expressió del filtre `meta.id && meta.organism && meta.depth >= 25000000` combina truthiness amb comparacions explícites: @@ -1710,13 +1880,13 @@ nextflow run main.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` Això falla amb una NullPointerException. @@ -1766,7 +1936,27 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` Sense fallada! El workflow ara gestiona el camp mancant de manera elegant. Quan `row.run_id` és `null`, l'operador `?.` evita la crida a `.toUpperCase()`, i `run_id` es converteix en `null` en lloc de causar una excepció. @@ -1810,7 +2000,7 @@ Afegiu també un operador `view()` al workflow per veure els resultats: === "Després" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1819,7 +2009,7 @@ Afegiu també un operador `view()` al workflow per veure els resultats: === "Abans" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1872,7 +2062,7 @@ Creeu una funció de validació abans del vostre bloc de workflow, crideu-la des === "Després" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1890,6 +2080,7 @@ Creeu una funció de validació abans del vostre bloc de workflow, crideu-la des } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1903,6 +2094,7 @@ Creeu una funció de validació abans del vostre bloc de workflow, crideu-la des ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1915,9 +2107,9 @@ nextflow run main.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1934,9 +2126,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1950,7 +2142,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "Sortida de la comanda" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Aquesta vegada s'executa amb èxit. @@ -1989,14 +2201,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 + + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2027,7 +2249,7 @@ Afegiu el gestor d'esdeveniments al vostre fitxer `main.nf`, dins de la definici === "Després" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2043,15 +2265,21 @@ Afegiu el gestor d'esdeveniments al vostre fitxer `main.nf`, dins de la definici println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "Abans" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2066,29 +2294,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Fem-lo més útil afegint lògica condicional: === "Després" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2111,12 +2354,15 @@ Fem-lo més útil afegint lògica condicional: println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "Abans" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2132,34 +2378,53 @@ Fem-lo més útil afegint lògica condicional: println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` Ara obtenim un resum encara més informatiu, incloent un missatge d'èxit/fallada i el directori de sortida si s'especifica: - +```bash +nextflow run main.nf +``` ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` També podeu escriure el resum en un fitxer usant operacions de fitxer: diff --git a/docs/ca/docs/side_quests/metadata/index.md b/docs/ca/docs/side_quests/metadata/index.md index 55daf5440f..7817f44690 100644 --- a/docs/ca/docs/side_quests/metadata/index.md +++ b/docs/ca/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Com podeu veure, l'operador ha construït un mapa de parells clau-valor per a cada fila del fitxer CSV, amb les capçaleres de columna com a claus per als valors corresponents. @@ -265,9 +271,9 @@ Per exemple, podríem accedir a l'identificador del fitxer amb `id` o a la ruta I aquí teniu el que podeu esperar veure a la sortida: ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Això mostra que podem accedir als valors de la columna `character` per a cada fila. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Com podeu veure, `COWPY` s'ha executat sobre cada fitxer utilitzant el personatge correcte per a cadascun. @@ -654,12 +679,25 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` La sortida és els mateixos set fitxers `cowpy-*.txt` que abans, ara produïts amb una crida més senzilla a `COWPY`. @@ -744,7 +782,7 @@ Reestructurem l'operació `map` per produir una tupla `[meta, file]`: === "Abans" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -770,9 +808,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -781,6 +819,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Ara, cada element del canal és una tupla de dos elements: primer el meta map i segon el fitxer. @@ -792,7 +836,7 @@ Ara, cada element del canal és una tupla de dos elements: primer el meta map i ] ``` -Si més endavant afegim una columna `language` al full de dades, estarà disponible com a `meta.language` sense necessitat de fer cap canvi a la definició d'entrada del procés. +Si més endavant afegim una columna `language` al full de dades i la incloem a l'operació `map` (p. ex. `language: row.language`), estarà disponible com a `meta.language` sense necessitat de fer cap canvi a la definició d'entrada del procés. #### 1.5.3. Actualitzeu el procés `COWPY` per utilitzar el meta map @@ -891,12 +935,25 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` El directori de resultats ara conté els fitxers d'art ASCII. @@ -1044,20 +1101,33 @@ nextflow run main.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` Ara tenim una predicció d'idioma per a cada fitxer del conjunt de dades. @@ -1206,19 +1276,32 @@ nextflow run main.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` Sí, això és correcte! @@ -1322,19 +1405,32 @@ nextflow run main.nf -resume ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` El meta map ara conté quatre camps: `id`, `character`, `lang` i `lang_group`. @@ -1445,13 +1541,26 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` El directori de resultats ara està organitzat per família lingüística, amb cada fitxer anomenat segons l'idioma detectat: @@ -1509,18 +1618,19 @@ Quan Nextflow substitueix `#!groovy ${meta.character}` a la comanda, l'eina `COW ??? failure "Sortida de la comanda" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1540,7 +1650,7 @@ Quan Nextflow substitueix `#!groovy ${meta.character}` a la comanda, l'eina `COW cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1564,28 +1674,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -La clau `character` no es crea mai al meta map. -Quan el script del procés avalua `#!groovy ${meta.character}`, la clau absent retorna `null`, i Nextflow literalment substitueix la cadena `null` a la comanda: +L'operació `map` escriu explícitament `#!groovy character: row.character`, de manera que la clau `character` es crea igualment al meta map, però accedir a una columna que no existeix a la fila analitzada retorna `null`, de manera que el seu valor passa a ser `null`. +Quan el script del procés avalua `#!groovy ${meta.character}`, Nextflow literalment substitueix la cadena `null` a la comanda: ??? failure "Sortida de la comanda" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1610,7 +1721,7 @@ Quan el script del procés avalua `#!groovy ${meta.character}`, la clau absent r TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/ca/docs/side_quests/nf_test/index.md b/docs/ca/docs/side_quests/nf_test/index.md index d93eac588f..3016efa855 100644 --- a/docs/ca/docs/side_quests/nf_test/index.md +++ b/docs/ca/docs/side_quests/nf_test/index.md @@ -19,7 +19,7 @@ Les proves us permeten comprovar sistemàticament que cada part del vostre pipel Hi ha molts tipus diferents de proves que podem escriure: -1. **Proves a nivell de mòdul**: Per a processos individuals +1. **Proves a nivell de procés**: Per a processos individuals 2. **Proves a nivell de workflow**: Per a un workflow individual 3. **Proves a nivell de pipeline**: Per al pipeline en conjunt 4. **Proves de rendiment**: Per a la velocitat i l'eficiència del pipeline @@ -27,16 +27,16 @@ Hi ha molts tipus diferents de proves que podem escriure: Provar processos individuals és anàleg a les proves unitàries en altres llenguatges. Provar el workflow o tot el pipeline és anàleg al que s'anomenen proves d'integració en altres llenguatges, on provem les interaccions dels components. -[**nf-test**](https://www.nf-test.com/) és una eina que us permet escriure proves a nivell de mòdul, workflow i pipeline. En resum, us permet comprovar sistemàticament que cada part individual del pipeline funciona com s'espera, _de manera aïllada_. +[**nf-test**](https://www.nf-test.com/) és una eina que us permet escriure proves a nivell de procés, workflow i pipeline. En resum, us permet comprovar sistemàticament que cada part individual del pipeline funciona com s'espera, _de manera aïllada_. ### Objectius d'aprenentatge -En aquesta missió secundària, aprendreu a utilitzar nf-test per escriure una prova a nivell de workflow per al pipeline, així com proves a nivell de mòdul per als tres processos que invoca. +En aquesta missió secundària, aprendreu a utilitzar nf-test per escriure una prova a nivell de workflow per al pipeline, així com proves a nivell de procés per als dos processos que invoca. Al final d'aquesta missió secundària, podreu utilitzar les tècniques següents de manera efectiva: - Inicialitzar nf-test al vostre projecte -- Generar proves a nivell de mòdul i de workflow +- Generar proves a nivell de procés i de workflow - Afegir tipus comuns d'assertions - Entendre quan utilitzar snapshots en lloc d'assertions de contingut - Executar proves per a tot un projecte @@ -50,6 +50,16 @@ Abans d'abordar aquesta missió secundària, hauríeu de: - Haver completat el tutorial [Hello Nextflow](../../hello_nextflow/index.md) o un curs equivalent per a principiants. - Estar còmodes amb els conceptes i mecanismes bàsics de Nextflow (processos, canals, operadors, treball amb fitxers, metadades) +!!! warning "Requisit de versió de nf-test" + + Les proves a nivell de procés requereixen **nf-test 0.9.3 o posterior**. Les versions anteriors (inclosa la 0.9.2) generen codi de bastida de proves incompatible amb l'analitzador sintàctic estricte que Nextflow utilitza per defecte a partir de la versió 26.04, cosa que provoca un error `Script compilation failed` en lloc del resultat de prova esperat. + + Comproveu la vostra versió amb `nf-test version`. Si necessiteu actualitzar: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. Primers passos @@ -81,7 +91,8 @@ Trobareu un fitxer de workflow principal i un fitxer CSV anomenat `greetings.csv ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` Per a una descripció detallada dels fitxers, consulteu l'[escalfament de Hello Nextflow](../../hello_nextflow/00_orientation.md). @@ -111,21 +122,23 @@ Podeu veure el codi complet del workflow a continuació. ??? example "Codi del workflow" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * Paràmetres del pipeline - */ + * Paràmetres del pipeline + */ params.input_file = "greetings.csv" /* - * Utilitza echo per imprimir 'Hello World!' a la sortida estàndard - */ + * Utilitza echo per imprimir 'Hello World!' a la sortida estàndard + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -134,15 +147,15 @@ Podeu veure el codi complet del workflow a continuació. } /* - * Utilitza una utilitat de substitució de text per convertir la salutació a majúscules - */ + * Utilitza una utilitat de substitució de text per convertir la salutació a majúscules + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -183,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` FELICITATS! Acabeu d'executar una prova! @@ -435,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` Èxit! El pipeline s'executa correctament i la prova passa. Executeu-lo tantes vegades com vulgueu i sempre obtindreu el mateix resultat! @@ -460,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -534,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` Èxit! El pipeline s'executa correctament i la prova passa. Ara hem començat a provar els detalls del pipeline, a més de l'estat general. @@ -619,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` Èxit! Les proves passen perquè el pipeline s'ha completat correctament, el nombre correcte de processos s'ha executat i els fitxers de sortida s'han creat. Això també us hauria de mostrar com d'útil és proporcionar noms informatius per a les vostres proves. @@ -730,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -800,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -808,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` Èxit! La prova passa perquè el procés `sayHello` s'ha executat correctament i la sortida s'ha creat. @@ -858,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` Èxit! La prova passa perquè el procés `sayHello` s'ha executat correctament i la sortida coincideix amb el snapshot. @@ -951,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. Proveu el procés `convertToUpper` @@ -998,10 +1040,10 @@ Aquesta és una prova similar a la del procés `sayHello`, però prova el procé Ara hem de proporcionar un únic fitxer d'entrada al procés convertToUpper, que inclou algun text que volem convertir a majúscules. Hi ha moltes maneres de fer-ho: - Podríem crear un fitxer dedicat per a la prova -- Podríem reutilitzar el fitxer data/greetings.csv existent +- Podríem reutilitzar el fitxer greetings.csv existent - Podríem crear-lo sobre la marxa dins de la prova -De moment, reutilitzem el fitxer data/greetings.csv existent utilitzant l'exemple que hem usat amb la prova a nivell de pipeline. Com abans, podem anomenar la prova per reflectir millor el que estem provant, però aquesta vegada deixem que faci un 'snapshot' del contingut en lloc de comprovar cadenes específiques (com hem fet amb l'altre procés). +De moment, reutilitzem el fitxer greetings.csv existent utilitzant l'exemple que hem usat amb la prova a nivell de pipeline. Com abans, podem anomenar la prova per reflectir millor el que estem provant, però aquesta vegada deixem que faci un 'snapshot' del contingut en lloc de comprovar cadenes específiques (com hem fet amb l'altre procés). === "Després" @@ -1070,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1078,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` Tingueu en compte que hem creat un fitxer de snapshot per al procés `convertToUpper` a `tests/main.converttoupper.nf.test.snap`. Si tornem a executar la prova, hauríem de veure que nf-test passa de nou. @@ -1097,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### Conclusió @@ -1139,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` Mireu això! Hem executat 4 proves, 1 per a cada procés i 2 per a tot el pipeline amb una única comanda. Imagineu com de poderós és això en una base de codi gran! @@ -1193,7 +1235,7 @@ Consulteu la [documentació de nf-test](https://www.nf-test.com/) per a funciona - Afegir assertions més exhaustives a les vostres proves - Escriure proves per a casos límit i condicions d'error - Configurar la integració contínua per executar les proves automàticament -- Aprendre sobre altres tipus de proves com les proves de workflow i de mòdul +- Aprendre sobre altres tipus de proves com les proves de workflow, de rendiment i d'estrès - Explorar tècniques de validació de contingut més avançades **Recordeu:** Les proves són documentació viva de com hauria de comportar-se el vostre codi. Com més proves escriviu, i com més específiques siguin les vostres assertions, més segurs podeu estar de la fiabilitat del vostre pipeline. diff --git a/docs/ca/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/ca/docs/side_quests/plugin_development/01_plugin_basics.md index 944de6f082..b62c0d6462 100644 --- a/docs/ca/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/ca/docs/side_quests/plugin_development/01_plugin_basics.md @@ -511,7 +511,7 @@ Actualitzeu `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -534,7 +534,7 @@ El plugin produeix diversos missatges INFO i WARN durant l'execució. Aquests són normals per a un exemple petit que s'executa en una màquina local: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -600,7 +600,7 @@ Afegiu un bloc `co2footprint` a `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -614,7 +614,7 @@ Afegiu un bloc `co2footprint` a `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -635,11 +635,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: L'avís de zona ha desaparegut. El plugin ara utilitza la intensitat de carboni específica de GB (163.92 gCO₂eq/kWh) en lloc del valor global de reserva (480.0 gCO₂eq/kWh). -!!! note "Nota" - - També podeu veure un missatge `WARN: Unrecognized config option 'co2footprint.location'`. - Això és cosmètic i es pot ignorar sense problemes; el plugin llegeix el valor correctament igualment. - A la Part 6, creareu un àmbit de configuració per al vostre propi plugin. Aquest plugin funciona completament mitjançant el mecanisme d'observador, connectant-se als esdeveniments del cicle de vida del workflow per recollir mètriques de recursos i generar el seu informe quan el pipeline finalitza. diff --git a/docs/ca/docs/side_quests/plugin_development/02_create_project.md b/docs/ca/docs/side_quests/plugin_development/02_create_project.md index 6c4b7d29b9..e62f94337d 100644 --- a/docs/ca/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/ca/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ Hauríeu de veure: ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ La més important és el bloc `nextflowPlugin`: ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ Actualitzeu-lo perquè coincideixi amb la versió de Nextflow instal·lada per g ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ Actualitzeu-lo perquè coincideixi amb la versió de Nextflow instal·lada per g ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **Els avisos són esperats.** diff --git a/docs/ca/docs/side_quests/plugin_development/03_custom_functions.md b/docs/ca/docs/side_quests/plugin_development/03_custom_functions.md index be328c4077..f0b65972f9 100644 --- a/docs/ca/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/ca/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/ca/docs/side_quests/plugin_development/04_build_and_test.md b/docs/ca/docs/side_quests/plugin_development/04_build_and_test.md index c00ac4624c..f6e8c5ea17 100644 --- a/docs/ca/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/ca/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **On són els resultats de les proves?** Gradle amaga la sortida detallada quan totes les proves passen. diff --git a/docs/ca/docs/side_quests/plugin_development/05_observers.md b/docs/ca/docs/side_quests/plugin_development/05_observers.md index e1481f1563..475249db7b 100644 --- a/docs/ca/docs/side_quests/plugin_development/05_observers.md +++ b/docs/ca/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "Sortida" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/ca/docs/side_quests/plugin_development/06_configuration.md b/docs/ca/docs/side_quests/plugin_development/06_configuration.md index 9d264d9af1..abcf8f5a81 100644 --- a/docs/ca/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/ca/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ La construcció falla: ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` A Groovy (i Java), cal _declarar_ una variable abans d'utilitzar-la. diff --git a/docs/ca/docs/side_quests/plugin_development/index.md b/docs/ca/docs/side_quests/plugin_development/index.md index 28cdf9795a..c5c14d0eaa 100644 --- a/docs/ca/docs/side_quests/plugin_development/index.md +++ b/docs/ca/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ No cal experiència prèvia amb Java ni Groovy. **Directori de treball:** `side-quests/plugin_development` +#### Obriu l'espai de codi de formació + +Si encara no ho heu fet, assegureu-vos d'obrir l'entorn de formació tal com es descriu a la [Configuració de l'entorn](../../envsetup/index.md). + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Objectius d'aprenentatge Al final d'aquesta formació, sereu capaços de: diff --git a/docs/ca/docs/side_quests/splitting_and_grouping/index.md b/docs/ca/docs/side_quests/splitting_and_grouping/index.md index b43686eb48..840b72e16c 100644 --- a/docs/ca/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/ca/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ Apliqueu aquests canvis a `main.nf`: === "Després" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ A continuació, considerarem la situació en què voleu unir per múltiples camp ### 3.2. Unir per múltiples camps -Tenim 2 rèpliques per a la mostra A, però només 1 per a les mostres B i C. En aquest cas hem pogut unir-les efectivament utilitzant el camp `id`, però, què passaria si estiguessin desincronitzades? Podríem barrejar les mostres normals i tumorals de rèpliques diferents! +Tenim 2 rèpliques per al pacient A, però només 1 per als pacients B i C. En aquest cas hem pogut unir-les efectivament utilitzant el camp `id`, però, què passaria si estiguessin desincronitzades? Podríem barrejar les mostres normals i tumorals de rèpliques diferents! Per evitar-ho, podem unir per múltiples camps. En realitat hi ha múltiples maneres d'aconseguir-ho, però ens centrarem en crear una nova clau d'unió que inclogui tant l'`id` de la mostra com el número de `replicate`. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + Com que la closure ara embolcalla cada ruta amb `file()`, les entrades de fitxer apareixen com a rutes absolutes resoltes en lloc dels noms de fitxer simples del full de mostres. + Utilitzar una closure amb nom ens permet reutilitzar la mateixa transformació en múltiples llocs, reduint el risc d'errors i fent el codi més llegible i mantenible. ### 3.5. Reduir la duplicació de dades @@ -723,21 +725,21 @@ Tenim moltes dades duplicades al nostre workflow. Cada element de les mostres un ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ En aquesta secció, heu après: ## 5. Agregar mostres amb `groupTuple` -A les seccions anteriors, hem après a dividir les dades d'un fitxer d'entrada i filtrar per camps específics (en el nostre cas mostres normals i tumorals). Però això només cobreix un únic tipus d'unió. I si volem agrupar mostres per un atribut específic? Per exemple, en lloc d'unir parells normal-tumor coincidents, potser volem processar totes les mostres de "sampleA" juntes independentment del seu tipus. Aquest patró és comú en workflows de bioinformàtica on potser voleu processar mostres relacionades per separat per raons d'eficiència abans de comparar o combinar els resultats al final. +A les seccions anteriors, hem après a dividir les dades d'un fitxer d'entrada i filtrar per camps específics (en el nostre cas mostres normals i tumorals). Però això només cobreix un únic tipus d'unió. I si volem agrupar mostres per un atribut específic? Per exemple, en lloc d'unir parells normal-tumor coincidents, potser volem processar totes les mostres de "patientA" juntes independentment del seu tipus. Aquest patró és comú en workflows de bioinformàtica on potser voleu processar mostres relacionades per separat per raons d'eficiència abans de comparar o combinar els resultats al final. Nextflow inclou mètodes integrats per fer-ho, el principal que veurem és `groupTuple`. @@ -1008,7 +1014,7 @@ El primer pas és similar al que hem fet a la secció anterior. Hem d'aïllar la ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Dominar aquestes operacions de canal us permetrà construir pipelines flexibles 2. **Dividir dades en canals separats:** Hem utilitzat `filter` per dividir les dades en fluxos independents basant-nos en el camp `type` ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Unir mostres coincidents:** Hem utilitzat `join` per recombinar mostres relacionades basant-nos en els camps `id` i `repeat` @@ -1199,31 +1205,31 @@ Dominar aquestes operacions de canal us permetrà construir pipelines flexibles - Unir dos canals per clau (primer element de la tupla) ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Extreure la clau d'unió i unir per aquest valor ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - Unir per múltiples camps utilitzant subMap + - Unir per múltiples camps utilitzant `subMap` ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Distribuir per intervals:** Hem utilitzat `combine` per crear productes cartesians de mostres amb intervals genòmics per al processament paral·lel. ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Agregar per claus d'agrupació:** Hem utilitzat `groupTuple` per agrupar pel primer element de cada tupla, recollint així les mostres que comparteixen els camps `id` i `interval` i fusionant les rèpliques tècniques. diff --git a/docs/ca/docs/side_quests/workflows_of_workflows/index.md b/docs/ca/docs/side_quests/workflows_of_workflows/index.md index 184830f4d1..85866f2873 100644 --- a/docs/ca/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/ca/docs/side_quests/workflows_of_workflows/index.md @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` Per fer-lo composable amb altres workflows, cal canviar algunes coses. ### 1.2. Feu el workflow composable -Per fer un workflow composable, cal canviar quatre coses: -el workflow rep un nom, les entrades es mouen a un bloc `take:`, les sortides es mouen a un bloc `emit:`, -i els blocs autònoms `publish:`/`output {}` s'eliminen (pertanyen al entry workflow). +Per fer un workflow composable, cal canviar tres coses: +el workflow rep un nom, les entrades es mouen a un bloc `take:` i les sortides es mouen a un bloc `emit:` +(substituint els blocs autònoms `publish:`/`output {}`, que pertanyen al entry workflow). Anem veient aquests canvis un per un. @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "Contingut del directori" @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` Per fer-lo composable amb `GREETING_WORKFLOW`, cal aplicar els mateixos tres canvis de la secció 1.2. @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "Contingut del directori" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "Contingut del fitxer" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` El pipeline funciona de principi a fi: la salutació s'ha convertit a majúscules i s'ha invertit. diff --git a/docs/ca/docs/side_quests/working_with_files/index.md b/docs/ca/docs/side_quests/working_with_files/index.md index e1a9bb8c31..be23bf37e5 100644 --- a/docs/ca/docs/side_quests/working_with_files/index.md +++ b/docs/ca/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Com podeu veure, Nextflow ha imprès la ruta de cadena exactament tal com l'hem escrit. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Aquesta vegada, veieu la ruta absoluta completa en lloc de la ruta relativa que hem proporcionat com a entrada. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Podeu veure els diversos atributs del fitxer impresos a la consola. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Això mostra que som capaços d'operar sobre el fitxer correctament dins d'un procés. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Aquesta és la part important: @@ -543,12 +568,13 @@ nextflow run main.nf ??? failure "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -576,9 +602,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Això mostra molts detalls sobre l'error perquè el procés està configurat per mostrar informació de depuració, tal com s'ha indicat anteriorment. @@ -692,9 +718,9 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -702,9 +728,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Funciona! Podeu veure que molt poc ha canviat. @@ -813,16 +845,11 @@ Una manera ingènua de fer-ho seria combinar el mètode `file()` amb [`channel.o ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` Això funciona, però és poc elegant. -!!! tip "Quan utilitzar `file()` vs `channel.fromPath()`" - - - Utilitzeu `file()` quan necessiteu un únic objecte Path per a la manipulació directa (comprovar si un fitxer existeix, llegir els seus atributs o passar-lo a una única invocació de procés) - - Utilitzeu `channel.fromPath()` quan necessiteu un canal que pugui contenir múltiples fitxers, especialment amb patrons glob, o quan els fitxers fluiran a través de múltiples processos - Aquí és on entra [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath): una fàbrica de canals convenient que agrupa tota la funcionalitat que necessitem per generar un canal a partir d'una o més cadenes de fitxers estàtiques, així com patrons glob. ### 3.1. Afegir la fàbrica de canals @@ -877,11 +904,17 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Com podeu veure, la ruta del fitxer s'està carregant com un objecte de tipus `Path` al canal. @@ -889,6 +922,11 @@ Això és similar al que hauria fet `file()`, excepte que ara tenim un canal al L'ús de `channel.fromPath()` és una manera convenient de crear un nou canal poblat per una llista de fitxers. +!!! tip "Quan utilitzar `file()` vs `channel.fromPath()`" + + - Utilitzeu `file()` quan necessiteu un únic objecte Path per a la manipulació directa (comprovar si un fitxer existeix, llegir els seus atributs o passar-lo a una única invocació de procés) + - Utilitzeu `channel.fromPath()` quan necessiteu un canal que pugui contenir múltiples fitxers, especialment amb patrons glob, o quan els fitxers fluiran a través de múltiples processos + ### 3.2. Veure els atributs dels fitxers al canal En el nostre primer intent d'utilitzar la fàbrica de canals, hem simplificat el codi i simplement hem imprès el nom del fitxer. @@ -934,12 +972,12 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -947,6 +985,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` I aquí ho teniu, els mateixos resultats que abans però ara tenim el fitxer en un canal, de manera que podem afegir-ne més. @@ -1003,12 +1047,12 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1024,6 +1068,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Com podeu veure, ara tenim dos objectes Path al nostre canal, la qual cosa mostra que Nextflow ha fet l'expansió de noms de fitxer correctament, i ha carregat i processat tots dos fitxers com s'esperava. @@ -1108,19 +1158,25 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Cada element del canal és ara una tupla que conté el `simpleName` i l'objecte de fitxer original. @@ -1164,19 +1220,25 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ara la tupla per a cada element del nostre canal conté la llista de metadades (_p. ex._ `[patientA, rep1, normal, R1, 001]`) i l'objecte de fitxer original. @@ -1265,19 +1327,25 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ara les metadades estan clarament etiquetades (_p. ex._ `[id:patientA, replicate:1, type:normal, readNum:2]`) de manera que és molt més fàcil saber què és cada cosa. @@ -1337,10 +1405,10 @@ Actualitzem el workflow `main.nf` en conseqüència: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Comentem el map per ara, hi tornarem! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1355,13 +1423,13 @@ Actualitzem el workflow `main.nf` en conseqüència: === "Abans" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // Carrega fitxers amb channel.fromFilePairs + // Carrega fitxers amb channel.fromPath ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1383,12 +1451,11 @@ nextflow run main.nf ??? failure "Sortida de la comanda" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1398,9 +1465,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Vaja, aquesta vegada l'execució ha fallat! @@ -1451,11 +1518,17 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ara el workflow s'executa amb èxit! @@ -1476,10 +1549,10 @@ Descomenteu l'operació map al workflow i feu les edicions següents: // Carrega fitxers amb channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1496,10 +1569,10 @@ Descomenteu l'operació map al workflow i feu les edicions següents: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Comentem el map per ara, hi tornarem! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1526,11 +1599,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` I aquí ho teniu: tenim el map de metadades (`[id:patientA, replicate:1, type:normal]`) a la primera posició de la tupla de sortida, seguit de la tupla de fitxers aparellats, tal com s'havia previst. @@ -1642,10 +1721,10 @@ Al workflow principal, substituïu l'operador `.view()` per `#!groovy .set { ch_ // Carrega fitxers amb channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1664,10 +1743,10 @@ Al workflow principal, substituïu l'operador `.view()` per `#!groovy .set { ch_ // Carrega fitxers amb channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1686,11 +1765,17 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Això confirma que ara podem fer referència al canal pel seu nom. @@ -1714,10 +1799,10 @@ Al workflow principal, feu els canvis de codi següents: // Carrega fitxers amb channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1747,10 +1832,10 @@ Al workflow principal, feu els canvis de codi següents: // Carrega fitxers amb channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1784,12 +1869,19 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` Les sortides es publiquen a un directori `results`, així que feu una ullada allà. @@ -1849,12 +1941,26 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` El directori de resultats ara hauria de contenir resultats per a totes les dades disponibles. @@ -1885,7 +1991,7 @@ Feu el canvi següent al bloc `output {}`: === "Després" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1893,7 +1999,7 @@ Feu el canvi següent al bloc `output {}`: === "Abans" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1911,12 +2017,26 @@ nextflow run main.nf ??? success "Sortida de la comanda" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` Comproveu el directori de resultats ara: @@ -2069,7 +2189,7 @@ L'aplicació d'aquestes tècniques en el vostre propi treball us permetrà const 5. **Simplificació amb channel.fromFilePairs:** Hem utilitzat `channel.fromFilePairs()` per aparellar automàticament fitxers relacionats i extreure metadades dels IDs dels parells de fitxers. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Ús d'operacions de fitxers en processos:** Hem integrat operacions de fitxers en processos Nextflow amb una gestió correcta de l'entrada, utilitzant el bloc `output {}` per organitzar les sortides basant-se en metadades. @@ -2079,10 +2199,10 @@ L'aplicació d'aquestes tècniques en el vostre propi treball us permetrà const ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], diff --git a/docs/de/docs/hello_nextflow/01_hello_world.md b/docs/de/docs/hello_nextflow/01_hello_world.md index 4e5166f9e4..ce566579a5 100644 --- a/docs/de/docs/hello_nextflow/01_hello_world.md +++ b/docs/de/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "Befehlsausgabe" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -Die Terminalausgabe sollte vertraut aussehen. Äußerlich hat sich nichts geändert. +Die Terminalausgabe endet jetzt mit einer `Outputs:`-Zusammenfassung, die die veröffentlichten Ausgaben und das Verzeichnis auflistet, in das sie geschrieben wurden. -Überprüfe jedoch deinen Datei-Explorer: Diesmal hat Nextflow ein neues Verzeichnis namens `results/` erstellt. +Überprüfe deinen Datei-Explorer: Diesmal hat Nextflow außerdem ein neues Verzeichnis namens `results/` erstellt. ??? abstract "Verzeichnisinhalt" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Diesmal wird das Ergebnis unter dem angegebenen Unterverzeichnis geschrieben. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Diesmal ist die Datei, wenn du dir die Ergebnisse ansiehst, eine echte Kopie anstatt nur ein Symlink. @@ -767,19 +785,19 @@ Nimm im Prozess-Block die folgende Code-Änderung vor: === "Danach" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "Vorher" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` Das `$`-Symbol und die geschweiften Klammern (`{ }`) sagen Nextflow, dass dies ein Variablenname ist, der durch den tatsächlichen Eingabewert ersetzt werden muss (=interpoliert). @@ -811,15 +829,15 @@ Nimm im Workflow-Block die folgende Code-Änderung vor: === "Danach" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // Eine Begrüßung ausgeben - sayHello(params.input) + // Eine Begrüßung ausgeben + sayHello(params.input) ``` === "Vorher" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // Eine Begrüßung ausgeben - sayHello() + // Eine Begrüßung ausgeben + sayHello() ``` Dies sagt Nextflow, den `sayHello`-Prozess mit dem Wert auszuführen, der über den `--input`-Parameter bereitgestellt wird. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Wenn du all diese Änderungen korrekt vorgenommen hast, solltest du eine weitere erfolgreiche Ausführung erhalten. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "Falls es nicht funktioniert hat" @@ -936,7 +966,8 @@ nextflow run hello-world.nf Dies wurde zu Beginn des Kurses erwähnt, aber vielleicht hast du es verpasst. Schau dir das Hilfsmaterial zu [Nextflow-Versionen](../info/nxf_versions.md) an. - Kurz gesagt, wenn du Nextflow `25.10` verwendest, musst du den v2-Sprach-Parser aktivieren: + Der v2-Parser ist ab Nextflow 26.04 der Standard, daher tritt dieses Problem nur bei älteren Versionen auf. + Bei einer Version vor 26.04 musst du den v2-Sprach-Parser aktivieren: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Noch einmal solltest du die entsprechende aktualisierte Ausgabe in deinem Ergebnisverzeichnis finden. @@ -1020,17 +1057,23 @@ Es gibt zwei Hauptvorteile dabei: Um es zu verwenden, füge einfach `-resume` zu deinem Befehl hinzu und führe ihn aus: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "Befehlsausgabe" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Die Konsolenausgabe sollte vertraut aussehen, aber es gibt eine Sache, die etwas anders ist als zuvor. diff --git a/docs/de/docs/hello_nextflow/02_hello_channels.md b/docs/de/docs/hello_nextflow/02_hello_channels.md index 76e547cda6..2fc8708043 100644 --- a/docs/de/docs/hello_nextflow/02_hello_channels.md +++ b/docs/de/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` Wie zuvor findest du die Ausgabedatei `output.txt` im Verzeichnis `results/hello_channels` (wie im `output`-Block des Workflow-Skripts oben angegeben). @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Wenn du beide Änderungen korrekt vorgenommen hast, solltest du eine erfolgreiche Ausführung erhalten. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "Befehlsausgabe" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Wie du sehen kannst, gibt dies die Channel-Inhalte in der Konsole aus. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "Befehlsausgabe" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Es scheint tatsächlich gut gelaufen zu sein. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Diesmal sehen wir alle drei Prozess-Ausführungen und ihre zugehörigen Work-Unterverzeichnisse in der Ausgabe aufgelistet. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Zurück in der Zusammenfassungsansicht wird die Ausgabe wieder auf einer Zeile zusammengefasst. @@ -605,8 +652,6 @@ Schau in das `results`-Verzeichnis, um zu sehen, ob alle Ausgabebegrüßungen da └── output.txt ``` -Ja! Und sie haben jeweils die erwarteten Inhalte. - ??? abstract "Dateiinhalt" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "Befehlsausgabe" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -941,16 +986,25 @@ nextflow run hello-channels.nf ??? success "Befehlsausgabe" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Diesmal funktioniert es UND gibt uns den zusätzlichen Einblick, wie die Inhalte des Channels vor und nach der Ausführung des `flatten()`-Operators aussehen. @@ -1024,11 +1078,13 @@ Nimm die folgende Änderung an der Parameterdeklaration vor: === "Vorher" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Pipeline-Parameter */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` Dies setzt voraus, dass die Datei am selben Ort wie der Workflow-Code liegt. @@ -1095,9 +1151,9 @@ nextflow run hello-channels.nf ??? failure "Befehlsausgabe" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1198,12 +1254,12 @@ nextflow run hello-channels.nf ??? failure "Befehlsausgabe" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1318,12 +1374,12 @@ nextflow run hello-channels.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1331,6 +1387,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` Diesmal sollte es ohne Fehler laufen. diff --git a/docs/de/docs/hello_nextflow/03_hello_workflow.md b/docs/de/docs/hello_nextflow/03_hello_workflow.md index 35f977638a..b94bd34323 100644 --- a/docs/de/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/de/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` Wie zuvor findest du die Ausgabedateien an dem im `output`-Block angegebenen Ort. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` In der Konsolenausgabe gibt es jetzt eine zusätzliche Zeile, die dem neuen Process entspricht, den wir gerade hinzugefügt haben. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "Befehlsausgabe" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + Die Terminalausgabe endet jetzt auch mit einem `Outputs:`-Zusammenfassungsblock. Wir haben ihn hier weggelassen, um uns auf die Prozessstatuszeilen zu konzentrieren. + Es läuft erfolgreich, einschließlich des dritten Schritts. Schau dir jedoch die Anzahl der Aufrufe für `collectGreetings()` in der letzten Zeile an. @@ -627,8 +651,8 @@ Schau dir jetzt den Inhalt der endgültigen Ausgabedatei an. ??? abstract "Dateiinhalt" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` Oh nein. Der Sammelschritt wurde einzeln auf jede Begrüßung ausgeführt, was NICHT das ist, was wir wollten. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ Zum Schluss kannst du dir den Inhalt der Ausgabedatei anschauen, um dich selbst ??? abstract "Dateiinhalt" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` Es läuft erfolgreich und produziert die gewünschte Ausgabe: ??? abstract "Dateiinhalt" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` Wenn du ins Verzeichnis `results/hello_workflow/` schaust, findest du die neue Berichtsdatei `trio-report.txt`. @@ -1273,5 +1326,5 @@ Was muss bei der Übergabe mehrerer Eingaben an einen Process zutreffen? - [x] Die Reihenfolge der Eingaben muss mit der im Eingabeblock definierten Reihenfolge übereinstimmen - [ ] Nur zwei Eingaben können gleichzeitig übergeben werden -Mehr erfahren: [3. Zusätzliche Parameter an einen Process übergeben](#3-pass-more-than-one-input-to-a-process) +Mehr erfahren: [3. Zusätzliche Parameter an einen Process übergeben](#3-pass-additional-parameters-to-a-process) diff --git a/docs/de/docs/hello_nextflow/04_hello_modules.md b/docs/de/docs/hello_nextflow/04_hello_modules.md index 6dcbc77ab8..3408abf126 100644 --- a/docs/de/docs/hello_nextflow/04_hello_modules.md +++ b/docs/de/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` Wie zuvor findest du die Ausgabedateien im Verzeichnis, das im `output`-Block angegeben ist (hier `results/hello_modules/`). @@ -172,7 +187,7 @@ Lass uns das oberhalb des `params`-Blocks einfügen und entsprechend ausfüllen. * Pipeline-Parameter */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ Lass uns das oberhalb des `params`-Blocks einfügen und entsprechend ausfüllen. * Pipeline-Parameter */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ Füge die include-Deklaration oberhalb des `params`-Blocks ein und fülle sie en * Pipeline-Parameter */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ Füge die include-Deklaration oberhalb des `params`-Blocks ein und fülle sie en * Pipeline-Parameter */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ Füge die include-Deklaration oberhalb des `params`-Blocks ein und fülle sie en * Pipeline-Parameter */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ Füge die include-Deklaration oberhalb des `params`-Blocks ein und fülle sie en * Pipeline-Parameter */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/de/docs/hello_nextflow/05_hello_containers.md b/docs/de/docs/hello_nextflow/05_hello_containers.md index fd0d69d787..40525644e8 100644 --- a/docs/de/docs/hello_nextflow/05_hello_containers.md +++ b/docs/de/docs/hello_nextflow/05_hello_containers.md @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` Wie zuvor findest du die Ausgabedateien im Verzeichnis, das im `output`-Block angegeben ist (`results/hello_containers/`). @@ -259,22 +273,22 @@ Jetzt, da du dich innerhalb des Containers befindest, kannst du den `cowpy`-Befe Zum Beispiel sagt die Tool-Dokumentation, dass wir den Charakter ('cowacter') mit `-c` ändern können. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Befehlsausgabe" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "Befehlsausgabe (zur Klarheit bearbeitet)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` Diesmal funktioniert es tatsächlich! diff --git a/docs/de/docs/hello_nextflow/06_hello_config.md b/docs/de/docs/hello_nextflow/06_hello_config.md index 67c66bab56..ea35b20b35 100644 --- a/docs/de/docs/hello_nextflow/06_hello_config.md +++ b/docs/de/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Wie zuvor findest du die Ausgabedateien in dem im `output`-Block angegebenen Verzeichnis (`results/hello_config/`). @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Dies produziert dieselbe Ausgabe wie zuvor. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` Dies erstellt einen neuen Satz von Verzeichnissen unter `tux-run/` einschließlich `tux-run/work/` und `tux-run/results/`. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` Die finale Ausgabedatei sollte den stegosaurus-Charakter enthalten, der die Grüße sagt. @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Dies veröffentlicht Ausgaben nach `custom-outdir-cli/` statt nach `results/`: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` Dies veröffentlicht Ausgaben nach `custom-outdir-config-2/rep2/`, mit dem angegebenen Basispfad _und_ dem Batch-Namen-Unterverzeichnis _und_ Ergebnissen gruppiert nach Prozess: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Dies veröffentlicht Ausgaben nach `config-output-mode/`, und sie sind alle noch echte Kopien, keine Symlinks. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "Befehlsausgabe" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` Dies sollte ohne Probleme funktionieren und dieselben Ausgaben wie zuvor unter `custom-outdir-config/conda` produzieren. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Wie du sehen kannst, ermöglicht uns das, zur Laufzeit sehr bequem zwischen Konfigurationen zu wechseln. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` Dies wird Docker wo möglich verwenden und Ausgaben unter `custom-outdir-config/test` produzieren, und diesmal ist der Charakter das komische Duo `dragonandcow`. diff --git a/docs/de/docs/hello_nf-core/00_orientation.md b/docs/de/docs/hello_nf-core/00_orientation.md index 4e8774fce9..c357ecf170 100644 --- a/docs/de/docs/hello_nf-core/00_orientation.md +++ b/docs/de/docs/hello_nf-core/00_orientation.md @@ -22,25 +22,20 @@ Wenn du diesen Kurs selbstständig durcharbeitest, mache dich bitte mit den [Gru ### Versionsanforderungen -Dieses Training ist für **Nextflow 25.10.2** oder neuer **mit DEAKTIVIERTEM v2-Syntax-Parser** konzipiert. +Dieses Training funktioniert mit Nextflow 25.10.2 oder neuer **mit dem v2-Syntax-Parser**, der ab Nextflow 26.04 standardmäßig aktiviert ist. +In unserer Trainingsumgebung musst du nichts weiter tun: Sie läuft mit Nextflow 26.04.4 und dem v2-Parser. Wenn du eine lokale oder benutzerdefinierte Umgebung verwendest, lies die [Versionshinweise](../info/nxf_versions.md). -#### Wenn du unsere Trainingsumgebung verwendest: - -Du MUSST den folgenden Befehl ausführen, bevor du fortfährst: - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### Wenn du eine lokale oder benutzerdefinierte Umgebung verwendest: - -Bitte stelle sicher, dass du die korrekten Einstellungen verwendest, wie [hier](../info/nxf_versions.md) dokumentiert. - -Das Training erfordert zusätzlich **nf-core tools 3.5.2**. +Das Training erfordert zusätzlich **nf-core tools 4.0.2**. Wenn du eine andere Version der nf-core-Tools verwendest, könntest du Schwierigkeiten haben, dem Training zu folgen. Du kannst überprüfen, welche Version in deiner Umgebung installiert ist, indem du den Befehl `nf-core --version` verwendest. +!!! warning "Kompatibilität mit dem v2-Parser" + + Viele nf-core-Pipelines unterstützen den v2-Syntax-Parser noch nicht. + Wenn du eine nf-core-Pipeline ausführst, die nicht in diesem Kurs verwendet wird, und dabei Fehler auftreten, musst du möglicherweise zum v1-Parser wechseln: `export NXF_SYNTAX_PARSER=v1`. + Weitere Details findest du in den [Versionshinweisen](../info/nxf_versions.md). + ## Bereit zum Arbeiten Sobald dein Codespace läuft, musst du zwei Dinge tun, bevor du ins Training einsteigst: Setze dein Arbeitsverzeichnis für diesen spezifischen Kurs und wirf einen Blick auf die bereitgestellten Materialien. @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ Wir verwenden aufklappbare Abschnitte wie diesen, um die erwartete Befehlsausgab - **Die Datei `greetings.csv`** ist eine CSV-Datei mit einigen minimalen Spaltendaten, die wir zu Testzwecken verwenden. +- **Die Datei `custom.config`** ist eine Beispiel-Nextflow-Konfigurationsdatei, die in Teil 1 verwendet wird, um Prozess-Ressourcen-Overrides und `ext.args` zu demonstrieren. + +- **Die Datei `malformed_samplesheet.csv`** ist ein absichtlich fehlerhaftes Samplesheet, das in Teil 1 verwendet wird, um die Eingabevalidierung zu demonstrieren. + +- **Die Datei `my_params.yml`** ist eine Beispiel-Parameterdatei, die in Teil 1 verwendet wird, um zu zeigen, wie man boolean-Parameter an eine Pipeline übergibt. + - **Das Verzeichnis `original-hello`** enthält eine Kopie des Quellcodes, der durch das Durcharbeiten der vollständigen Hello Nextflow Trainingsreihe entsteht (mit aktiviertem Docker). - **Das Verzeichnis `solutions`** enthält die fertigen Workflow-Skripte, die aus jedem Schritt des Kurses resultieren. @@ -112,7 +116,7 @@ Denkst du, du bist bereit loszulegen? - [ ] Ich verstehe das Ziel dieses Kurses und seine Voraussetzungen - [ ] Meine Umgebung ist eingerichtet und läuft -- [ ] Ich habe sichergestellt, dass der Syntax-Parser auf **v1** gesetzt ist +- [ ] Ich verwende nf-core tools 4.0.2 (überprüfen mit `nf-core --version`) - [ ] Ich habe mein Arbeitsverzeichnis entsprechend gesetzt Wenn du alle Kästchen abhaken kannst, kann es losgehen. diff --git a/docs/de/docs/hello_nf-core/01_run_demo.md b/docs/de/docs/hello_nf-core/01_run_demo.md index f94686e3b4..54ddcce69e 100644 --- a/docs/de/docs/hello_nf-core/01_run_demo.md +++ b/docs/de/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ Der Tab `Introduction` bietet eine Übersicht über die Pipeline, einschließlic ![pipeline subway map](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. Beispiel-Befehlszeile @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow führt einen `pull` des Pipeline-Codes durch, was bedeutet, dass es das vollständige Repository auf deine lokale Festplatte herunterlädt. @@ -106,40 +107,73 @@ nextflow list Du kannst auch weitere Pipelines pullen, um zu sehen, wie sie aufgelistet werden, wenn du mehr als eine hast. -#### 1.2.3. Deine Pipelines in `$NXF_HOME/assets/` finden +#### 1.2.3. Herausfinden, wo die Pipeline heruntergeladen wurde Du wirst bemerken, dass die Dateien nicht in deinem aktuellen Arbeitsverzeichnis sind. -Standardmäßig speichert Nextflow sie unter `$NXF_HOME/assets`. +Standardmäßig speichert Nextflow gepullte Pipelines unter `$NXF_HOME/assets`. + +Um herauszufinden, wo eine bestimmte Pipeline liegt, frage Nextflow direkt: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "Befehlsausgabe" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "Hinweis" +!!! info "Info" Der vollständige Pfad kann auf deinem System abweichen, wenn du nicht unsere Trainingsumgebung verwendest. Nextflow hält den heruntergeladenen Quellcode absichtlich 'aus dem Weg' nach dem Prinzip, dass diese Pipelines eher wie Bibliotheken verwendet werden sollten als Code, mit dem du direkt interagieren würdest. +Intern speichert Nextflow jede gepullte Pipeline als Git-Repository unter `$NXF_HOME/assets/.repos/` und checkt den Code für jede Revision in ein Unterverzeichnis `clones//` aus. +Da `.repos` ein verstecktes Verzeichnis ist, sieht ein einfaches `tree -L 2 $NXF_HOME/assets/` leer aus. + #### 1.2.4. Einen Symlink erstellen, um leicht auf den Quellcode zuzugreifen Wir werden den Code nicht im Detail durchgehen, aber lass uns kurz einen Blick darauf werfen, um ein Gefühl für die Gesamtorganisation zu bekommen. -Um das Durchsuchen des Pipeline-Quellcodes zu erleichtern, erstelle einen symbolischen Link zum Assets-Verzeichnis: +Um das Durchsuchen des Pipeline-Quellcodes zu erleichtern, erstelle einen symbolischen Link, der auf die ausgecheckte Kopie der Pipeline zeigt: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -Dies erstellt eine Verknüpfung, mit der du den Code mit `tree -L 2 pipelines` erkunden oder Dateien direkt öffnen kannst. +Dies erstellt eine Verknüpfung, mit der du den Code mit `tree -L 2 pipelines/nf-core/demo` erkunden oder Dateien direkt öffnen kannst. #### 1.2.5. Überblick über die Code-Organisation @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` Wie du siehst, ist da eine Menge los, über das du dir aber größtenteils keine Gedanken machen musst. @@ -211,7 +247,7 @@ Praktischerweise kommt jede nf-core Pipeline mit einem Testprofil. Dies ist ein minimaler Satz von Konfigurationseinstellungen für die Pipeline, um mit einem kleinen Testdatensatz ausgeführt zu werden, der im [nf-core/test-datasets](https://github.com/nf-core/test-datasets) Repository gehostet wird. Es ist eine großartige Möglichkeit, eine Pipeline schnell in kleinem Maßstab auszuprobieren. -!!! note "Hinweis" +!!! tip "Tipp" Das Konfigurationsprofil-System von Nextflow ermöglicht es dir, einfach zwischen verschiedenen Container-Engines oder Ausführungsumgebungen zu wechseln. Für weitere Details siehe [Hello Nextflow Teil 6: Konfiguration](../hello_nextflow/06_hello_config.md). @@ -220,10 +256,10 @@ Es ist eine großartige Möglichkeit, eine Pipeline schnell in kleinem Maßstab Es ist gute Praxis, zu prüfen, was das Testprofil einer Pipeline spezifiziert, bevor man sie ausführt. Das `test`-Profil für `nf-core/demo` befindet sich in der Konfigurationsdatei `conf/test.config`. -Du findest es lokal im Pipeline-Quellcode, den `nextflow pull` heruntergeladen hat: +Du findest es lokal im Pipeline-Quellcode, den `nextflow pull` heruntergeladen hat, über den in Abschnitt 1.2.4 erstellten `pipelines`-Symlink: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` Hier ist der Inhalt dieser Datei: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Eingabedaten - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` Dies wird als Samplesheet bezeichnet und ist die häufigste Form der Eingabe für nf-core Pipelines. +Mach dir keine Sorgen, wenn du mit den Datenformaten und -typen nicht vertraut bist, es ist nicht wichtig für das Folgende. -!!! note "Hinweis" - - Mach dir keine Sorgen, wenn du mit den Datenformaten und -typen nicht vertraut bist, es ist nicht wichtig für das Folgende. - -Dies bestätigt also, dass wir alles haben, was wir brauchen, um die Pipeline auszuprobieren. +Damit haben wir alles, was wir brauchen, um die Pipeline auszuprobieren. ### 2.2. Die Pipeline ausführen -Entscheiden wir uns, Docker für das Container-System zu verwenden und `demo-results` als Ausgabeverzeichnis, und wir sind bereit, den Testbefehl auszuführen: +Wie oben erwähnt, können wir den Beispiel-Testbefehl fast unverändert verwenden; wir müssen nur angeben, welches Software-Packaging wir verwenden möchten, und wie das Ausgabeverzeichnis heißen soll. +Hier verwenden wir Docker als Container-System und `demo-results` als Ausgabeverzeichnis. + +Damit können wir den Testbefehl ausführen: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ Wenn deine Ausgabe damit übereinstimmt, Glückwunsch! Du hast gerade deine erst Du wirst bemerken, dass es viel mehr Konsolenausgabe gibt als wenn du eine einfache Nextflow-Pipeline ausführst. Es gibt einen Header, der eine Zusammenfassung der Pipeline-Version, Eingaben und Ausgaben sowie einige Konfigurationselemente enthält. -!!! note "Hinweis" +!!! info "Info" Deine Ausgabe wird unterschiedliche Zeitstempel, Ausführungsnamen und Dateipfade zeigen, aber die Gesamtstruktur und Prozessausführung sollte ähnlich sein. Beachte die Zeile am Anfang der Ausgabe: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` Diese zeigt dir, welche Revision der Pipeline verwendet wurde. @@ -379,7 +417,7 @@ Da wir keine Version angegeben haben, hat Nextflow den neuesten Commit auf `mast Für reproduzierbare Ausführungen solltest du eine bestimmte Version mit dem Flag `-r` festlegen: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` So wird sichergestellt, dass jedes Mal derselbe Pipeline-Code verwendet wird, unabhängig von neuen Commits oder Releases. @@ -388,14 +426,15 @@ In diesem Training lassen wir `-r` der Einfachheit halber weg, aber in der Produ Weiter zur Ausführungsausgabe, schauen wir uns die Zeilen an, die uns sagen, welche Prozesse ausgeführt wurden: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Dies sagt uns, dass drei Prozesse ausgeführt wurden, die den drei Tools entsprechen, die auf der Pipeline-Dokumentationsseite auf der nf-core-Website gezeigt werden: FASTQC, SEQTK_TRIM und MULTIQC. +Dies sagt uns, dass vier Prozesse ausgeführt wurden, die den vier Tools entsprechen, die auf der Pipeline-Dokumentationsseite auf der nf-core-Website gezeigt werden: `FASTQC`, `SEQTK_TRIM`, `MULTIQC` und `COWPY`. Die vollständigen Prozessnamen wie hier gezeigt, wie `NFCORE_DEMO:DEMO:MULTIQC`, sind länger als das, was du im einführenden Hello Nextflow Material gesehen haben könntest. Diese enthalten die Namen ihrer übergeordneten Workflows und spiegeln die Modularität des Pipeline-Codes wider. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` Das mag wie viel erscheinen. -Um mehr über die Ausgaben der `nf-core/demo` Pipeline zu erfahren, schau dir ihre [Dokumentationsseite](https://nf-co.re/demo/1.1.0/docs/output/) an. +Um mehr über die Ausgaben der `nf-core/demo` Pipeline zu erfahren, schau dir ihre [Dokumentationsseite](https://nf-co.re/demo/1.2.0/docs/output/) an. In diesem Stadium ist wichtig zu beobachten, dass die Ergebnisse nach Modul organisiert sind, und es gibt zusätzlich ein Verzeichnis namens `pipeline_info`, das verschiedene mit Zeitstempeln versehene Berichte über die Pipeline-Ausführung enthält. @@ -443,7 +485,7 @@ Zum Beispiel zeigt dir die Datei `execution_timeline_*`, welche Prozesse ausgef ![execution timeline report](./img/execution_timeline.png) -!!! note "Hinweis" +!!! info "Info" Hier wurden die Aufgaben nicht parallel ausgeführt, weil wir auf einer minimalistischen Maschine in Github Codespaces laufen. Um diese parallel laufen zu sehen, versuche die CPU-Zuweisung deines Codespace und die Ressourcenlimits in der Testkonfiguration zu erhöhen. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,24 +596,98 @@ Bei einfachen Nextflow-Pipelines funktioniert `--help` nur, wenn der/die Entwick Wie in [Hello Config](../hello_nextflow/06_hello_config.md) beschrieben, kannst du Parameterwerte über die Befehlszeile mit `--param_name` setzen oder eine Reihe von Parametern in einer YAML-Datei sammeln und sie mit `-params-file` übergeben. Beide Ansätze funktionieren bei nf-core Pipelines genauso. -Um zum Beispiel den Trimming-Schritt zu überspringen: +Um zum Beispiel den Trimming-Schritt zu überspringen, setzen wir den boolean-Parameter `skip_trim` auf `true`. +In deinem Arbeitsverzeichnis liegt bereits eine Params-Datei namens `my_params.yml` mit diesem Wert: + +```yaml title="my_params.yml" +skip_trim: true +``` + +Übergib sie mit `-params-file`: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "Befehlsausgabe" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` Der Prozess `SEQTK_TRIM` erscheint nicht mehr in der Ausgabe. -!!! info "Info" +!!! warning "Wichtige Einschränkungen bei Parameter-Eingaben" + + **Boolean-Parameter über die Befehlszeile setzen** + + Ab Nextflow Version 26.04 werden alle Werte, die über die Befehlszeile übergeben werden, als Strings typisiert. + Bei einem boolean-Parameter wie `skip_trim` wird die Übergabe als einfaches Flag (`--skip_trim`) oder als `--skip_trim true` als **String** `"true"` ausgewertet, was die Schema-Validierung fehlschlagen lässt: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + Um einen boolean-Parameter auf einen echten `true`/`false`-Wert zu setzen, verwende wie oben gezeigt eine `-params-file` oder setze ihn in einer Konfigurationsdatei. + String-, Integer- und Dateipfad-Parameter sind davon nicht betroffen und können weiterhin direkt über die Befehlszeile gesetzt werden. + Dieser Kurs verwendet dieses Muster durchgehend für boolean-Parameter. + + **Benutzerdefinierte Konfigurationsdateien verwenden** Obwohl es technisch möglich ist, Pipeline-Parameter in einer benutzerdefinierten Konfigurationsdatei zu setzen, die mit `-c` übergeben wird, überschreibt dies möglicherweise nicht die bereits in der eigenen `nextflow.config` der Pipeline gesetzten Standardwerte, abhängig von Nextflows Konfigurationsprioritätsregeln. Die Verwendung von `--param_name` auf der Befehlszeile oder `-params-file` ist zuverlässiger, da diese immer Vorrang haben. @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` Die Pipeline läuft weiterhin, aber die Warnung macht dich sofort darauf aufmerksam, dass `--foobar` kein erkannter Parameter ist. -Das erkennt Tippfehler wie `--outDir` statt `--outdir`, bevor du Rechenzeit damit verschwendest, dich zu fragen, warum die Ausgabe an den falschen Ort gegangen ist. +Das soll dich auf nicht-kritische Tippfehler hinweisen, wie `--outDir` statt `--outdir`, damit du keine Zeit und Rechenleistung verschwendest. ##### 3.1.3.2. Ungültige Parameterwerte @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` Die Pipeline stoppt, bevor irgendwelche Prozesse ausgeführt werden, und bewahrt dich so vor einer fehlgeschlagenen oder falschen Ausführung. -Boolean-Parameter sollten als Flags (`--skip_trim`) ohne Wert übergeben werden, oder in einer Params-Datei auf `true`/`false` gesetzt werden. +Wie in Abschnitt 3.1.2 erwähnt, sollten boolean-Parameter in einer Params-Datei auf einen echten `true`/`false`-Wert gesetzt werden, anstatt sie über die Befehlszeile zu übergeben, da Befehlszeilenwerte als Strings typisiert werden. #### 3.1.4. Eingabevalidierung @@ -637,7 +756,7 @@ Wir behandeln dies ebenfalls ausführlicher in [Teil 5: Eingabevalidierung](05_i Die `nf-core/demo` Pipeline erwartet eine CSV-Datei mit den Spalten `sample`, `fastq_1` und `fastq_2`. Dies ist in einer Schema-Datei (`assets/schema_input.json`) definiert, die die erwartete Struktur, Spaltentypen und Einschränkungen festlegt. -??? abstract "assets/schema_input.json" +??? abstract "Schema-Datei für Eingaben" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Dies ist in einer Schema-Datei (`assets/schema_input.json`) definiert, die die e Das Schema legt fest, dass `sample` und `fastq_1` erforderlich sind, während `fastq_2` optional ist (unterstützt sowohl Paired-End- als auch Single-End-Daten). Dateipfade werden auf Existenz und Erweiterungsmuster validiert. -##### 3.1.4.1. Ein ungültiges Samplesheet erstellen - -Erstelle ein Samplesheet mit einer fehlenden Spalte und einem nicht existierenden Dateipfad: +Zur Demonstration liegt in deinem Arbeitsverzeichnis bereits ein fehlerhaftes Samplesheet namens `malformed_samplesheet.csv`: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` Diesem Samplesheet fehlt die erforderliche Spalte `fastq_1` und es enthält einen nicht existierenden Dateipfad in `fastq_2`. -Beide Probleme werden im nächsten Schritt Validierungsfehler erzeugen. - -##### 3.1.4.2. Die Demo-Pipeline mit dem ungültigen Samplesheet ausführen -Führe die Demo-Pipeline mit `malformed_samplesheet.csv` als Eingabe aus. +Führe die Demo-Pipeline mit `malformed_samplesheet.csv` als Eingabe aus: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -724,15 +839,28 @@ Konfiguration im engeren Sinne steuert, **wie** die Pipeline läuft: Ressourcenz nf-core Pipelines enthalten Standardkonfiguration in `nextflow.config` und dem `conf/`-Verzeichnis. Bevor du etwas überschreibst, ist es hilfreich zu wissen, wo die Standardwerte liegen. -Du hast in Abschnitt 2.1 bereits gesehen, dass der Pipeline-Quellcode in `$NXF_HOME/assets` liegt. -Liste die Konfigurationsdateien auf, um zu sehen, was verfügbar ist: +Du hast in Abschnitt 2.1 bereits gesehen, dass der Pipeline-Quellcode unter `$NXF_HOME/assets` liegt. +Liste die Konfigurationsdateien über den `pipelines`-Symlink aus Abschnitt 1.2.4 auf, um zu sehen, was verfügbar ist: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ Wenn du Einstellungen aus diesen Dateien ändern möchtest, ändere keine dieser Erstelle stattdessen deine eigene Konfigurationsdatei und übergebe sie mit `-c`. Die von dir angegebenen Werte überschreiben die in diesen anderen Dateien gesetzten Standardwerte. -Lass uns einige Übungen durchgehen, um das in der Praxis zu tun. +Lass uns das in der Praxis ausprobieren. -#### 3.2.1. Ressourcenzuweisung für einen Prozess ändern +#### 3.2.1. Prozessressourcen und Tool-Argumente anpassen -Die Demo-Pipeline weist Ressourcen über Labels zu, die in `base.config` definiert sind. -Zum Beispiel verwendet `FASTQC` das Label `process_medium`, das 6 CPUs und 36 GB Arbeitsspeicher zuweist. +nf-core Module unterstützen zwei gängige Arten von Konfigurationsüberschreibungen: **Ressourcenzuweisung** (CPUs, Arbeitsspeicher, Zeit) und **Tool-Argumente** über `ext.args`. -Das Testprofil begrenzt Ressourcen über `resourceLimits`, aber du kannst auch Ressourcen für bestimmte Prozesse überschreiben. +Viele Befehlszeilen-Tools haben Argumente, die nicht häufig genug verwendet werden, um als Pipeline-Parameter eingerichtet zu werden. +Die `ext.args`-Konvention ermöglicht es dir, diese Argumente über eine Konfigurationsdatei an das zugrunde liegende Tool zu übergeben. -Erstelle eine Datei namens `custom.config`: +Die in deinem Arbeitsverzeichnis bereitgestellte Datei `custom.config` zeigt beide Überschreibungen: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -Führe die Pipeline mit deiner benutzerdefinierten Konfiguration aus: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "Befehlsausgabe" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -Das Flag `-c` fügt deine Konfiguration zusätzlich zur integrierten Konfiguration der Pipeline hinzu. - -#### 3.2.2. Tool-Argumentwerte mit `ext.args` setzen - -Viele Befehlszeilen-Tools haben Argumente, die nicht erforderlich sind und daher nicht als Pipeline-Parameter eingerichtet werden, es sei denn, sie werden sehr häufig verwendet. -Für diese Tool-Argumente verwenden nf-core Module eine Nextflow-Konvention namens `ext.args`, um Argumente über eine Konfigurationsdatei an das zugrunde liegende Tool zu übergeben. - -Lass uns zum Beispiel ein Trimming-Argument zum `SEQTK_TRIM`-Modul mit `ext.args` hinzufügen. - -##### 3.2.2.1. Die benutzerdefinierte Konfiguration aktualisieren - -Aktualisiere deine `custom.config`: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -Dies weist `seqtk trimfq` an, zusätzlich zum Qualitäts-Trimming 5 Basen vom Anfang jedes Reads zu trimmen. +Der erste Block überschreibt die Ressourcenzuweisung für `FASTQC`. +Standardmäßig verwendet `FASTQC` das Label `process_medium` aus `base.config`, das 6 CPUs und 36 GB Arbeitsspeicher zuweist; hier begrenzen wir es auf 2 CPUs und 4 GB. -##### 3.2.2.2. Die Pipeline ausführen +Der zweite Block übergibt ein zusätzliches Argument an `SEQTK_TRIM` über `ext.args`. +Das Flag `-b 5` weist `seqtk trimfq` an, zusätzlich zum Qualitäts-Trimming 5 Basen vom Anfang jedes Reads zu trimmen. -Führe die Pipeline erneut mit dieser Konfiguration aus, um den Effekt zu sehen: +Führe die Pipeline mit dieser Konfiguration aus: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "Befehlsausgabe" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Um zu überprüfen, ob das Argument angewendet wurde, suche den Hash des `SEQTK_TRIM` work-Verzeichnisses aus der Ausführungsausgabe (z.B. `work/ab/cd1234...`) und prüfe die Datei `.command.sh` darin: +Das Flag `-c` fügt deine Konfiguration zusätzlich zur integrierten Konfiguration der Pipeline hinzu. + +Um zu überprüfen, ob die `ext.args`-Überschreibung wirksam war, suche den Hash des `SEQTK_TRIM` work-Verzeichnisses aus der Ausführungsausgabe (z.B. `work/17/428668...`) und prüfe die Datei `.command.sh` darin: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "Befehlsausgabe" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` Du solltest `-b 5` im `seqtk trimfq`-Befehl sehen, was bestätigt, dass deine `ext.args`-Überschreibung wirksam war. -##### 3.2.2.3. Standardwerte überschreiben - -Einige Module haben `ext.args` bereits standardmäßig gesetzt. -Zum Beispiel ist das `FASTQC`-Modul standardmäßig mit `ext.args = '--quiet'` konfiguriert (definiert in `conf/modules.config`). +Wichtig zu wissen: Wenn ein Modul bereits einen Standardwert für `ext.args` gesetzt hat, **ersetzt** dein Wert ihn vollständig, anstatt ihn zu ergänzen. +Zum Beispiel ist das `FASTQC`-Modul standardmäßig mit `ext.args = '--quiet'` konfiguriert (definiert in `conf/modules.config`): ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -Wenn du einen Wert für `ext.args` über eine benutzerdefinierte Konfigurationsdatei angibst, ersetzt dieser Wert den für diesen Prozess gesetzten Standard vollständig. - -Wenn der Standard zum Beispiel `'--quiet'` war und du `ext.args = '--kmers 8'` setzt, wird das Flag `--quiet` nicht mehr angewendet. +Wenn du `ext.args = '--kmers 8'` für `FASTQC` setzt, wird das Flag `--quiet` nicht mehr angewendet. Um beides beizubehalten, setze `ext.args = '--quiet --kmers 8'`. -Das bedeutet, dass du dafür verantwortlich bist, die Standardkonfiguration der Tools zu prüfen, denen du Argumentwerte mit `ext.args` übergeben möchtest. +Du solltest immer die Standardkonfiguration eines Moduls prüfen, bevor du `ext.args` überschreibst. ### Fazit @@ -878,4 +976,6 @@ Du weißt, wie du Hilfe von einer nf-core Pipeline erhältst, Parameter setzt un ### Wie geht es weiter? -Mach eine Pause! Wenn du bereit bist, gehe zu Teil 2 über, wo du deine eigene nf-core-kompatible Pipeline von Grund auf erstellen wirst. +Wenn du nur nf-core Pipelines ausführen möchtest, bist du fertig! + +Wenn du lernen möchtest, eigene Pipelines nach nf-core-Standards zu entwickeln, mach eine Pause und gehe dann zu Teil 2 über. Dort lernst du, eine eigene nf-core-kompatible Pipeline mithilfe der nf-core Template-Tools zu erstellen. diff --git a/docs/de/docs/hello_nf-core/02_rewrite_hello.md b/docs/de/docs/hello_nf-core/02_rewrite_hello.md index 7ea7b2578b..f4d3c526b8 100644 --- a/docs/de/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/de/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Falls du mit der Hello-Pipeline nicht vertraut bist oder eine Auffrischung brauc - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "Hinweis" - - Stelle sicher, dass du dich im Terminal im Verzeichnis `hello-nf-core` befindest. - --- ## 1. Die Pipeline-Code-Struktur untersuchen @@ -30,6 +26,7 @@ Das nf-core-Projekt setzt strenge Richtlinien durch, wie Pipelines strukturiert Bevor wir unser Pipeline-Erstellungsprojekt angehen, müssen wir diese Struktur und Organisation verstehen. Schauen wir uns also an, wie der Pipeline-Code im `nf-core/demo`-Repository organisiert ist, mithilfe des `pipelines`-Symlinks, den wir in Teil 1 erstellt haben. +Stelle sicher, dass du dich im Terminal im Verzeichnis `hello-nf-core` befindest. Zur Erinnerung: Du kannst entweder `tree` verwenden oder den Datei-Explorer nutzen, um das Verzeichnis `nf-core/demo` zu finden und zu öffnen. @@ -82,7 +79,7 @@ So sehen die Beziehungen zwischen den relevanten Code-Komponenten aus: Der unbenannte Workflow in `main.nf` wird als _Einstiegspunkt_-Skript bezeichnet. Er dient als Wrapper für zwei Arten von verschachtelten Workflows: den `DEMO`-Workflow mit der eigentlichen Analyselogik in `workflows/demo.nf` und eine Reihe von Housekeeping-Workflows unter `subworkflows/`. Der `demo.nf`-Workflow ruft **Module** unter `modules/` auf; diese enthalten die **Prozesse**, die die eigentlichen Analyseschritte durchführen. -!!! note "Hinweis" +!!! info "Info" Subworkflows sind nicht auf Housekeeping-Funktionen beschränkt und können Prozess-Module verwenden. @@ -107,7 +104,7 @@ Wir behandeln die relevanten Unterschiede im nächsten Teil dieses Kurses, wenn Der `demo.nf`-Workflow ruft **Module** unter `modules/` auf, die wir als Nächstes besprechen. -!!! note "Hinweis" +!!! info "Info" Einige nf-core-Analyse-Workflows zeigen zusätzliche Verschachtelungsebenen, indem sie untergeordnete Subworkflows aufrufen. Dies wird hauptsächlich verwendet, um zwei oder mehr Module, die häufig zusammen verwendet werden, in leicht wiederverwendbare Pipeline-Segmente zu verpacken. @@ -266,13 +263,20 @@ Sobald die TUI sich schließt, solltest du die folgende Konsolenausgabe sehen. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -Es gibt keine explizite Bestätigung in der Konsolenausgabe, dass die Pipeline-Erstellung funktioniert hat, aber du solltest ein neues Verzeichnis namens `core-hello` sehen. +Sobald die TUI abgeschlossen ist, meldet das Werkzeug, dass es die Pipeline erstellt und ihre Container-Konfiguration generiert hat: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +Du solltest jetzt ein neues Verzeichnis namens `core-hello` sehen. Sieh dir den Inhalt des neuen Verzeichnisses an, um zu sehen, wie viel Arbeit du dir durch die Verwendung der Vorlage erspart hast. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "Verzeichnisinhalt" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` Das sind eine Menge Dateien! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +Die `WARN: Unrecognized config option 'validation.*'`-Zeilen stammen von der Version des nf-schema-Plugins, die in der frisch erstellten Vorlage festgelegt ist. +Sie sind harmlos und beeinflussen die Ausführung nicht. + Dies zeigt dir, dass die gesamte grundlegende Verkabelung vorhanden ist. Wo sind also die Ausgaben? Gibt es welche? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -435,7 +446,7 @@ Schauen wir uns das genauer an. Dieser dient als Platzhalter für unseren Analyse-Workflow, mit bereits vorhandener nf-core-Funktionalität. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -454,14 +465,16 @@ workflow HELLO { take: ch_samplesheet // Kanal: Samplesheet eingelesen von --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Software-Versionen sammeln und speichern // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -478,19 +491,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // Kanal: [ path(versions.yml) ] - } /* @@ -503,15 +513,15 @@ workflow HELLO { Im Vergleich zu einem grundlegenden Nextflow-Workflow wie dem, der in [Hello Nextflow](../hello_nextflow/index.md) entwickelt wurde, wirst du hier ein paar Dinge bemerken, die neu sind (hervorgehobene Zeilen oben): - Der Workflow-Block hat einen Namen -- Workflow-Eingaben werden mit dem Schlüsselwort `take:` deklariert und die Kanal-Konstruktion wird in den übergeordneten Workflow verschoben +- Workflow-Eingaben werden mit dem Schlüsselwort `take:` deklariert (hier ein Samplesheet-Kanal und ein Ausgabeverzeichnis), und die Kanal-Konstruktion wird in den übergeordneten Workflow verschoben - Workflow-Inhalt wird in einem `main:`-Block platziert - Ausgaben werden mit dem Schlüsselwort `emit:` deklariert Dies sind optionale Funktionen von Nextflow, die den Workflow **komponierbar** machen, was bedeutet, dass er aus einem anderen Workflow heraus aufgerufen werden kann. -??? note "Der `Channel.topic`-Block" +??? note "Der `channel.topic`-Block" - Du hast vielleicht den Block `def topic_versions = Channel.topic("versions")` bemerkt, der ab Zeile 17 beginnt. + Du hast vielleicht den Block `def topic_versions = channel.topic("versions")` bemerkt, der ab Zeile 28 beginnt. Dies ist Boilerplate-Code, der automatisch Software-Versionsinformationen aus allen Modulen sammelt. nf-core führt diesen Mechanismus 2026 in allen Pipelines ein, sodass du ihn in allen neuen Pipelines sehen wirst. Teil 4 dieses Kurses erklärt, wie er im Detail funktioniert. @@ -575,15 +585,15 @@ nextflow run original-hello/hello.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` Wenn das funktioniert, bist du bereit loszulegen. @@ -704,7 +714,7 @@ Während wir dabei sind, können wir auch die Zeile `params.greeting = 'greeting params.character = 'turkey' ``` -!!! note "Hinweis" +!!! info "Info" Falls du die Nextflow Language Server Extension installiert hast, wird der Syntax-Checker deinen Code mit roten Wellenlinien markieren. Das liegt daran, dass du, wenn du eine `take:`-Anweisung einfügst, auch ein `main:` haben musst. @@ -851,7 +861,7 @@ Hier gibt es zwei wichtige Beobachtungen: - Die Syntax zum Aufrufen des importierten Workflows ist im Wesentlichen dieselbe wie die Syntax zum Aufrufen von Modulen. - Alles, was mit dem Einbringen der Eingaben in den Workflow zu tun hat (Eingabeparameter und Kanal-Konstruktion), wird jetzt in diesem übergeordneten Workflow deklariert. -!!! note "Hinweis" +!!! info "Info" Die Benennung der Einstiegspunkt-Workflow-Datei `main.nf` ist eine Konvention, keine Anforderung. @@ -878,19 +888,19 @@ Wenn du alle Änderungen korrekt vorgenommen hast, sollte dies bis zum Abschluss ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -Das bedeutet, wir haben unseren HELLO-Workflow erfolgreich auf komponierbar aktualisiert. +Das bedeutet, wir haben unseren `HELLO`-Workflow erfolgreich auf komponierbar aktualisiert. ### Fazit @@ -932,14 +942,16 @@ workflow HELLO { take: ch_samplesheet // Kanal: Samplesheet eingelesen von --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Software-Versionen sammeln und speichern // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -956,19 +968,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // Kanal: [ path(versions.yml) ] - } /* @@ -978,8 +987,8 @@ workflow HELLO { */ ``` -Die hervorgehobenen Zeilen definieren die komponierbare Workflow-Struktur: `workflow HELLO {`, `take:`, `main:` und `emit:`. -Der große Block zwischen den Zeilen 17–34 ist umfangreicher: Er verarbeitet die Software-Versionserfassung mithilfe von Topic-Kanälen, einem Mechanismus, den nf-core 2026 in allen Pipelines einführt. +Dies ist die komponierbare Workflow-Struktur: ein benannter `workflow HELLO {`-Block mit `take:`, `main:` und `emit:`. +Der Block unter `// Collate and save software versions` ist umfangreicher: Er verarbeitet die Software-Versionserfassung mithilfe von Topic-Kanälen, einem Mechanismus, den nf-core 2026 in allen Pipelines einführt. Wir erklären das in Teil 4; behandle es vorerst als Boilerplate, den du unverändert lassen kannst. Wir müssen den relevanten Code aus der komponierbaren Version des ursprünglichen Workflows hinzufügen, den wir in Abschnitt 2 entwickelt haben. @@ -991,7 +1000,7 @@ Wir werden dies in den folgenden Phasen angehen: 3. Die Workflow-Logik zum `main`-Block hinzufügen 4. Den `emit`-Block aktualisieren -!!! note "Hinweis" +!!! info "Info" Wir werden den Versionserfassungs-Block bei diesem ersten Durchgang ignorieren. Teil 4 erklärt, wie er funktioniert. @@ -1079,9 +1088,10 @@ Zwei weitere interessante Beobachtungen hier: Das nf-core-Projekt hat viel vorgebaute Funktionalität rund um das Konzept des Samplesheets, das typischerweise eine CSV-Datei mit spaltenförmigen Daten ist. Da dies im Wesentlichen das ist, was unsere `greetings.csv`-Datei ist, behalten wir die aktuelle `take`-Deklaration bei und aktualisieren einfach den Namen des Eingabekanals im nächsten Schritt. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // Kanal: Samplesheet eingelesen von --input + outdir ``` Die Eingabebehandlung wird oberhalb dieses Workflows erfolgen (nicht in dieser Codedatei). @@ -1111,20 +1121,21 @@ Zur Erinnerung: Dies ist der relevante Code im ursprünglichen Workflow, der sic Wir müssen den Code, der nach `main:` kommt, in die neue Version des Workflows kopieren. Es gibt bereits etwas Code dort, der damit zu tun hat, die Versionen der Tools zu erfassen, die vom Workflow ausgeführt werden. Das lassen wir vorerst in Ruhe (wir werden uns später mit den Tool-Versionen befassen). -Wir behalten die Initialisierung `ch_versions = channel.empty()` oben bei, fügen dann unsere Workflow-Logik ein und behalten den Versionskollationscode am Ende. +Wir behalten die Initialisierung `def ch_versions = channel.empty()` oben bei, fügen dann unsere Workflow-Logik ein und behalten den Versionskollationscode am Ende. Diese Reihenfolge macht Sinn, weil in einer echten Pipeline die Prozesse Versionsinformationen ausgeben würden, die dem `ch_versions`-Kanal hinzugefügt würden, während der Workflow läuft. === "Danach" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // Kanal: Samplesheet eingelesen von --input + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // Eine Begrüßung ausgeben sayHello(greeting_ch) @@ -1141,7 +1152,7 @@ Diese Reihenfolge macht Sinn, weil in einer echten Pipeline die Prozesse Version // // Software-Versionen sammeln und speichern // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1158,37 +1169,36 @@ Diese Reihenfolge macht Sinn, weil in einer echten Pipeline die Prozesse Version "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // Kanal: [ path(versions.yml) ] - } ``` === "Vorher" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // Kanal: Samplesheet eingelesen von --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Software-Versionen sammeln und speichern // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1205,36 +1215,31 @@ Diese Reihenfolge macht Sinn, weil in einer echten Pipeline die Prozesse Version "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // Kanal: [ path(versions.yml) ] - } ``` -Du wirst bemerken, dass wir auch eine Leerzeile vor `main:` hinzugefügt haben, um den Code lesbarer zu machen. - Das sieht großartig aus, aber wir müssen noch den Namen des Kanals aktualisieren, den wir an den `sayHello()`-Prozess übergeben, von `greeting_ch` zu `ch_samplesheet`, wie unten gezeigt, damit er mit dem übereinstimmt, was unter dem `take:`-Schlüsselwort geschrieben steht. === "Danach" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // Eine Begrüßung ausgeben (aktualisiert für die nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) ``` === "Vorher" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // Eine Begrüßung ausgeben sayHello(greeting_ch) ``` @@ -1247,7 +1252,7 @@ Schließlich müssen wir den `emit`-Block aktualisieren, um die Deklaration der === "Danach" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // Kanal: [ path(versions.yml) ] @@ -1255,12 +1260,12 @@ Schließlich müssen wir den `emit`-Block aktualisieren, um die Deklaration der === "Vorher" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // Kanal: [ path(versions.yml) ] ``` -Damit sind die Änderungen abgeschlossen, die wir am HELLO-Workflow selbst vornehmen müssen. +Damit sind die Änderungen abgeschlossen, die wir am `HELLO`-Workflow selbst vornehmen müssen. An diesem Punkt haben wir die Gesamt-Code-Struktur erreicht, die wir umsetzen wollten. ### Fazit @@ -1324,7 +1329,8 @@ workflow CORE_HELLO { // WORKFLOW: Pipeline ausführen // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1361,7 +1367,6 @@ workflow { // SUBWORKFLOW: Abschlussaufgaben ausführen // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1377,7 +1382,7 @@ Das nf-core-Projekt macht starken Gebrauch von verschachtelten Subworkflows, dah Was hier wichtig ist, ist, dass zwei Workflows definiert sind: -- `CORE_HELLO` ist ein dünner Wrapper zum Ausführen des HELLO-Workflows, den wir gerade in `core-hello/workflows/hello.nf` angepasst haben. +- `CORE_HELLO` ist ein dünner Wrapper zum Ausführen des `HELLO`-Workflows, den wir gerade in `core-hello/workflows/hello.nf` angepasst haben. - Ein unbenannter Workflow, der `CORE_HELLO` sowie zwei andere Subworkflows aufruft, `PIPELINE_INITIALISATION` und `PIPELINE_COMPLETION`. Hier ist ein Diagramm, wie sie zueinander in Beziehung stehen: @@ -1422,9 +1427,9 @@ Wenn wir diese Datei öffnen und nach unten scrollen, kommen wir zu diesem Codeb versions = ch_versions ``` -Dies ist die Kanal-Factory, die das Samplesheet parst und es in einer Form weitergibt, die bereit ist, vom HELLO-Workflow konsumiert zu werden. +Dies ist die Kanal-Factory, die das Samplesheet parst und es in einer Form weitergibt, die bereit ist, vom `HELLO`-Workflow konsumiert zu werden. -!!! note "Hinweis" +!!! info "Info" Die Syntax oben unterscheidet sich etwas von dem, was wir bisher verwendet haben, aber grundsätzlich ist dies: @@ -1533,7 +1538,7 @@ Jetzt können wir die `test.config`-Datei wie folgt aktualisieren: === "Danach" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1595,13 +1600,53 @@ Und während wir dabei sind, lass uns die Standard-Ressourcenlimits verschärfen Damit sind die Code-Modifikationen abgeschlossen, die wir vornehmen müssen. -### 5.4. Die Pipeline mit dem Testprofil ausführen +### 5.4. Parameter-Validierung deaktivieren + +Wir haben das vorlagenbasierte Samplesheet-Parsing durch unsere eigene einfache Kanal-Konstruktion ersetzt, aber die Vorlage enthält noch eine `nextflow_schema.json` und `assets/schema_input.json`, die ein FASTQ-basiertes Samplesheet beschreiben. +Da wir diese Schemas noch nicht an unser `greetings.csv`-Format angepasst haben, müssen wir die Parameter-Validierung vorerst deaktivieren (wir richten sie später ordentlich ein). + +Öffne `core-hello/nextflow.config` und setze `validate_params` auf `false`: + +=== "Danach" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "Vorher" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +Wir setzen dies in der Konfigurationsdatei statt auf der Befehlszeile, weil ab Nextflow Version 26.04 alle auf der Befehlszeile angegebenen Werte als Strings typisiert werden. +Daher müssen Boolean-Parameter in einer Konfigurationsdatei oder einer `-params-file` gesetzt werden, um einen echten `true`/`false`-Wert zu erhalten. + +Zum Beispiel würde `--validate_params false` hier als **String** `"false"` ausgewertet werden, was die Validierung eingeschaltet lässt. + +!!! tip "v2-Parser-Kompatibilitätszeilen in `nextflow.config`" + + Apropos v2-Syntax: Du wirst vielleicht diese zwei Zeilen direkt unterhalb des `params`-Blocks in der Konfigurationsdatei bemerken: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + Diese sind für die Kompatibilität mit dem v2-Syntax-Parser erforderlich. + + - Mit der v2-Syntax können `params.*`-Variablen nicht direkt innerhalb von `publishDir`-Direktiven in Prozess-Modulen referenziert werden, daher wird `outputDir` hier als Top-Level-Konfigurationsvariable definiert, auf die diese Direktiven zugreifen können. + + - `workflow.output.mode` legt den Standard-Veröffentlichungsmodus für den v2-Workflow-Ausgabeblock fest. + + Beide werden automatisch von der nf-core-Pipeline-Vorlage generiert und müssen nicht geändert werden. + +### 5.5. Die Pipeline mit dem Testprofil ausführen Das war eine Menge, aber wir können endlich versuchen, die Pipeline auszuführen! -Beachte, dass wir `--validate_params false` zur Befehlszeile hinzufügen müssen, weil wir die Validierung noch nicht eingerichtet haben (das kommt später). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` Wenn du alle Änderungen korrekt vorgenommen hast, sollte dies bis zum Abschluss laufen. @@ -1609,9 +1654,9 @@ Wenn du alle Änderungen korrekt vorgenommen hast, sollte dies bis zum Abschluss ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1623,10 +1668,10 @@ Wenn du alle Änderungen korrekt vorgenommen hast, sollte dies bis zum Abschluss Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1637,17 +1682,17 @@ Wenn du alle Änderungen korrekt vorgenommen hast, sollte dies bis zum Abschluss !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -Wie du sehen kannst, hat dies die typische nf-core-Zusammenfassung am Anfang dank des Initialisierungs-Subworkflows produziert, und die Zeilen für jedes Modul zeigen jetzt die vollständigen PIPELINE:WORKFLOW:Modul-Namen. +Wie du sehen kannst, hat dies die typische nf-core-Zusammenfassung am Anfang dank des Initialisierungs-Subworkflows produziert, und die Zeilen für jedes Modul zeigen jetzt die vollständigen `PIPELINE:WORKFLOW:Modul`-Namen. -### 5.5. Die Pipeline-Ausgaben finden +### 5.6. Die Pipeline-Ausgaben finden Die Frage ist jetzt: Wo sind die Ausgaben der Pipeline? Und die Antwort ist ziemlich interessant: Es gibt jetzt zwei verschiedene Orte, an denen man nach den Ergebnissen suchen kann. @@ -1663,17 +1708,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1683,7 +1728,7 @@ Dieses Mal siehst du alle Tasks, die wie erwartet ausgeführt wurden. ![Ausführungs-Timeline-Bericht für die Hello-Pipeline](./img/execution_timeline_hello.png) -!!! note "Hinweis" +!!! info "Info" Erneut wurden die Tasks nicht parallel ausgeführt, da wir auf einer minimalistischen Maschine in Github Codespaces laufen. Um diese parallel ausgeführt zu sehen, versuche die CPU-Zuweisung deines Codespaces und die Ressourcenlimits in der Testkonfiguration zu erhöhen. diff --git a/docs/de/docs/hello_nf-core/03_use_module.md b/docs/de/docs/hello_nf-core/03_use_module.md index fe73e11225..052b705fdc 100644 --- a/docs/de/docs/hello_nf-core/03_use_module.md +++ b/docs/de/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ Um zu demonstrieren, wie das funktioniert, werden wir das eigene `collectGreetin Du kannst testen, ob sie erfolgreich läuft, indem du folgenden Befehl ausführst: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ Navigiere zur Modulseite in deinem Webbrowser und verwende die Suchleiste, um na Wie du sehen kannst, gibt es einige Ergebnisse, viele davon Module, die für das Verketten sehr spezifischer Dateitypen entwickelt wurden. Unter ihnen solltest du eines namens `find_concatenate` sehen, das universell einsetzbar ist. -!!! note "Namenskonvention für Module" +!!! info "Namenskonvention für Module" Der Unterstrich (`_`) wird als Platzhalter für den Schrägstrich (`/`) in Modulnamen verwendet. @@ -120,9 +120,11 @@ Dies zeigt die Dokumentation über das Modul an, einschließlich seiner Eingaben | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ Dies zeigt die Dokumentation über das Modul an, einschließlich seiner Eingaben Das ist genau die gleiche Information, die du auch auf der Website findest. +Die Meldung `INFO Reinstalling modules found in 'modules.json' but missing from directory` kannst du ignorieren. Sie wird von nf-core/tools 4.0.2 für jedes Modul ausgegeben, das du mit `info` abfragst – unabhängig davon, ob es tatsächlich installiert ist – und hat keine Auswirkungen, da der `info`-Befehl keine Dateien schreibt. + ### 1.4. Das find/concatenate-Modul installieren Jetzt, da wir das gewünschte Modul gefunden haben, müssen wir es zum Quellcode unserer Pipeline hinzufügen. @@ -193,15 +197,13 @@ Jetzt, da wir das gewünschte Modul gefunden haben, müssen wir es zum Quellcode Die gute Nachricht ist, dass das nf-core-Projekt Werkzeuge enthält, die diesen Teil einfach machen. Speziell der `nf-core modules install`-Befehl ermöglicht es, das Abrufen des Codes und das Verfügbarmachen für dein Projekt in einem einzigen Schritt zu automatisieren. -Navigiere zu deinem Pipeline-Verzeichnis und führe den Installationsbefehl aus: +Stelle sicher, dass dein aktuelles Arbeitsverzeichnis das Wurzelverzeichnis des `core-hello`-Pipeline-Projekts ist, und führe dann den Installationsbefehl aus: ```bash cd core-hello nf-core modules install find/concatenate ``` -Das Tool wird mit der Installation des Moduls fortfahren. - ??? success "Befehlsausgabe" ```console @@ -212,26 +214,20 @@ Das Tool wird mit der Installation des Moduls fortfahren. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -Der Befehl erledigt automatisch: - -- Herunterladen der Moduldateien nach `modules/nf-core/find/concatenate/` -- Aktualisierung der `modules.json`, um das installierte Modul zu verfolgen -- Bereitstellung der korrekten `include`-Anweisung zur Verwendung im Workflow - -!!! tip "Tipp" - - Stelle immer sicher, dass dein aktuelles Arbeitsverzeichnis das Wurzelverzeichnis deines Pipeline-Projekts ist, bevor du den Modulinstallationsbefehl ausführst. +Der Befehl lädt die Moduldateien nach `modules/nf-core/find/concatenate/` herunter und aktualisiert `modules.json`, um das installierte Modul zu verfolgen. +Den `NotADirectoryError` am Ende kannst du ignorieren. Er tritt auf, weil nf-core/tools 4.0.2 erwartet, dass jedes lokale Modul in einem eigenen Verzeichnis liegt (`modules/local//main.nf`), während `core-hello` in dieser Phase noch einzelne Moduldateien verwendet. +Das `find/concatenate`-Modul wird jedoch korrekt installiert und `modules.json` wird wie erwartet aktualisiert. +Wir werden `cowpy` in Teil 4 auf die Verzeichnisstruktur umstellen. -Lass uns überprüfen, ob das Modul korrekt installiert wurde: +Lass uns überprüfen, ob die Moduldateien vorhanden sind: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -Du kannst die Installation auch überprüfen, indem du das nf-core-Dienstprogramm bittest, lokal installierte Module aufzulisten: +Du kannst die Installation auch bestätigen, indem du `modules.json` überprüfst, das nun `find/concatenate` unter dem nf-core/modules Repository auflistet. + +??? abstract "Dateiinhalt" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +Dies bestätigt, dass das `find/concatenate`-Modul nun Teil des Quellcodes deines Projekts ist. +Um das neue Modul jedoch tatsächlich zu verwenden, müssen wir es in unsere Pipeline importieren. + +Schließlich kannst du auch den Befehl `nf-core modules list local` verwenden, um zu prüfen, welche Module aktuell in deiner Pipeline verfolgt werden. ```bash nf-core modules list local @@ -266,43 +316,45 @@ nf-core modules list local ??? success "Befehlsausgabe" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -Dies bestätigt, dass das `find/concatenate`-Modul nun Teil des Quellcodes deines Projekts ist. - -Um das neue Modul jedoch tatsächlich zu verwenden, müssen wir es in unsere Pipeline importieren. +Die Tabelle zeigt `find/concatenate` zusammen mit Repository, Version SHA, Commit-Nachricht und Datum. ### 1.5. Die Modulimporte aktualisieren Lass uns die `include`-Anweisung für das `collectGreetings`-Modul durch die für `FIND_CONCATENATE` im Importbereich des `workflows/hello.nf` Workflows ersetzen. -Zur Erinnerung, das Modulinstallationstool hat uns die exakte Anweisung gegeben, die wir verwenden sollen: +Zur Erinnerung: Das Modulinstallationstool hat uns die exakte Anweisung gegeben, die wir verwenden sollen: -```groovy title="Import-Anweisung, die vom Installationsbefehl erzeugt wurde" +```groovy title="Import statement produced by install command" include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` Beachte, dass die nf-core-Konvention darin besteht, Großbuchstaben für Modulnamen beim Importieren zu verwenden. -Öffne [core-hello/workflows/hello.nf](core-hello/workflows/hello.nf) und nimm folgende Ersetzung vor: +Öffne `core-hello/workflows/hello.nf` und nimm folgende Ersetzung vor: === "Danach" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ Beachte, dass die nf-core-Konvention darin besteht, Großbuchstaben für Modulna include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "Vorher" @@ -345,7 +397,7 @@ An diesem Punkt könntest du versucht sein, direkt einzusteigen und Code zu bear Wir werden das als separaten Abschnitt behandeln, weil es einen neuen Mechanismus beinhaltet, den wir noch nicht behandelt haben: Metadaten-Maps. -!!! note "Hinweis" +!!! info "Info" Du kannst optional die Datei `collectGreetings.nf` löschen: @@ -373,7 +425,7 @@ Dadurch können wir feststellen, ob wir das neue Modul einfach als direkten Ersa Idealerweise solltest du das tun, _bevor_ du das Modul überhaupt installierst, aber hey, besser spät als nie. (Übrigens gibt es einen `uninstall`-Befehl, um Module loszuwerden, die du nicht mehr möchtest.) -!!! note "Hinweis" +!!! info "Info" Der FIND_CONCATENATE-Prozess enthält eine ziemlich clevere Handhabung verschiedener Komprimierungstypen, Dateierweiterungen usw., die für das, was wir dir hier zeigen wollen, nicht streng relevant sind, daher werden wir das meiste davon ignorieren und uns nur auf die wichtigen Teile konzentrieren. @@ -381,7 +433,7 @@ Idealerweise solltest du das tun, _bevor_ du das Modul überhaupt installierst, Zur Erinnerung, so sieht die Schnittstelle zu unserem `collectGreetings`-Modul aus: -```groovy title="modules/local/collectGreetings.nf (Auszug)" linenums="1" hl_lines="6-7 10" +```groovy title="modules/local/collectGreetings.nf (excerpt)" linenums="1" hl_lines="6-7 10" process collectGreetings { publishDir 'results', mode: 'copy' @@ -403,7 +455,7 @@ Nach Abschluss gibt `collectGreetings` einen einzelnen Dateipfad aus, der mit de Im Vergleich dazu ist die Schnittstelle des `find/concatenate`-Moduls komplexer: -```groovy title="modules/nf-core/find/concatenate/main.nf (Auszug)" linenums="1" hl_lines="11 14" +```groovy title="modules/nf-core/find/concatenate/main.nf (excerpt)" linenums="1" hl_lines="11 14" process FIND_CONCATENATE { tag "${meta.id}" label 'process_low' @@ -459,19 +511,19 @@ Per Konvention wird eine nf-core-Metamap `meta` genannt und enthält das erforde Zum Beispiel könnte eine typische Metadaten-Map so aussehen: -```groovy title="Beispiel einer Metamap auf Probenebene" +```groovy title="Example of sample-level metamap" [id: 'sample1', single_end: false, strandedness: 'forward'] ``` Oder in einem Fall, in dem die Metadaten auf Chargenebene angehängt sind: -```groovy title="Beispiel einer Metamap auf Chargenebene" +```groovy title="Example of batch-level metamap" [id: 'batch1', date: '25.10.01'] ``` Lass uns das nun in den Kontext des `FIND_CONCATENATE`-Prozesses setzen, der erwartet, dass die Eingabedateien in ein Tupel mit einer Metamap verpackt sind, und die Metamap auch als Teil des Ausgabe-Tupels ausgibt. -```groovy title="modules/nf-core/find/concatenate/main.nf (Auszug)" linenums="10" hl_lines="2 5" +```groovy title="modules/nf-core/find/concatenate/main.nf (excerpt)" linenums="10" hl_lines="2 5" input: tuple val(meta), path(files_in) @@ -485,7 +537,7 @@ Nachfolgende Prozesse können dann auch problemlos auf diese Metadaten zugreifen Erinnerst du dich daran, dass wir dir gesagt haben, dass die von `FIND_CONCATENATE` ausgegebene Datei basierend auf einem Identifikator benannt wird, der Teil der Metadaten ist? Das ist der relevante Code: -```groovy title="modules/nf-core/find/concatenate/main.nf (Auszug)" linenums="37" +```groovy title="modules/nf-core/find/concatenate/main.nf (excerpt)" linenums="37" prefix = task.ext.prefix ?: "${meta.id}${file_extensions[0]}" ``` @@ -493,7 +545,7 @@ Das bedeutet ungefähr Folgendes: Wenn ein `prefix` über das externe Task-Param Du kannst dir den eingehenden Eingabekanal in dieses Modul mit Inhalten wie diesem vorstellen: -```groovy title="Beispiel für Eingabekanal-Inhalte" +```groovy title="Example input channel contents" ch_input = [[[id: 'batch1', date: '25.10.01'], ['file1A.txt', 'file1B.txt']], [[id: 'batch2', date: '25.10.26'], ['file2A.txt', 'file2B.txt']], [[id: 'batch3', date: '25.11.14'], ['file3A.txt', 'file3B.txt']]] @@ -501,7 +553,7 @@ ch_input = [[[id: 'batch1', date: '25.10.01'], ['file1A.txt', 'file1B.txt']], Dann kommen die Ausgabekanal-Inhalte so heraus: -```groovy title="Beispiel für Ausgabekanal-Inhalte" +```groovy title="Example output channel contents" ch_input = [[[id: 'batch1', date: '25.10.01'], 'batch1.txt'], [[id: 'batch2', date: '25.10.26'], 'batch2.txt'], [[id: 'batch3', date: '25.11.14'], 'batch3.txt']] @@ -512,7 +564,7 @@ Wie bereits erwähnt, ist das `tuple val(meta), path(files_in)` Eingabe-Setup ei Hoffentlich kannst du allmählich sehen, wie nützlich das sein kann. Es ermöglicht dir nicht nur, Ausgaben basierend auf Metadaten zu benennen, sondern du kannst auch Dinge tun wie verschiedene Parameterwerte anzuwenden, und in Kombination mit bestimmten Operatoren kannst du sogar Daten gruppieren, sortieren oder herausfiltern, während sie durch die Pipeline fließen. -!!! note "Mehr über Metadaten erfahren" +!!! info "Mehr über Metadaten erfahren" Für eine umfassende Einführung in die Arbeit mit Metadaten in Nextflow-Workflows, einschließlich wie man Metadaten aus Samplesheets liest und sie zur Anpassung der Verarbeitung verwendet, siehe die Side Quest [Metadaten in Workflows](../side_quests/metadata/index.md). @@ -543,7 +595,7 @@ Jetzt, da du alles über Metamaps weißt (oder zumindest genug für die Zwecke d Der Klarheit halber werden wir dies aufschlüsseln und jeden Schritt separat behandeln. -!!! note "Hinweis" +!!! info "Info" Alle unten gezeigten Änderungen werden an der Workflow-Logik im `main`-Block in der `core-hello/workflows/hello.nf` Workflow-Datei vorgenommen. @@ -553,14 +605,14 @@ Zuerst müssen wir eine Metadaten-Map für `FIND_CONCATENATE` erstellen, wobei w Da wir keine anderen Metadaten benötigen, können wir es einfach halten und so etwas verwenden: -```groovy title="Syntaxbeispiel" +```groovy title="Syntax example" def cat_meta = [id: 'test'] ``` Außer dass wir den `id`-Wert nicht fest codieren wollen; wir wollen den Wert des `params.batch`-Parameters verwenden. Der Code wird also: -```groovy title="Syntaxbeispiel" +```groovy title="Syntax example" def cat_meta = [id: params.batch] ``` @@ -570,8 +622,8 @@ Lass uns diese Zeilen nach dem `convertToUpper`-Aufruf hinzufügen und den `coll === "Danach" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // Eine Begrüßung ausgeben + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // Eine Begrüßung ausgeben (aktualisiert auf nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) // Die Begrüßung in Großbuchstaben umwandeln @@ -586,8 +638,8 @@ Lass uns diese Zeilen nach dem `convertToUpper`-Aufruf hinzufügen und den `coll === "Vorher" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // Eine Begrüßung ausgeben + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // Eine Begrüßung ausgeben (aktualisiert auf nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) // Die Begrüßung in Großbuchstaben umwandeln @@ -608,8 +660,8 @@ Als Nächstes transformieren wir den Kanal von Dateien in einen Kanal von Tupeln === "Danach" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // Eine Begrüßung ausgeben + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // Eine Begrüßung ausgeben (aktualisiert auf nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) // Die Begrüßung in Großbuchstaben umwandeln @@ -627,8 +679,8 @@ Als Nächstes transformieren wir den Kanal von Dateien in einen Kanal von Tupeln === "Vorher" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // Eine Begrüßung ausgeben + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // Eine Begrüßung ausgeben (aktualisiert auf nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) // Die Begrüßung in Großbuchstaben umwandeln @@ -654,8 +706,8 @@ Rufe nun `FIND_CONCATENATE` auf dem neu erstellten Kanal auf: === "Danach" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // Eine Begrüßung ausgeben + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // Eine Begrüßung ausgeben (aktualisiert auf nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) // Die Begrüßung in Großbuchstaben umwandeln @@ -676,8 +728,8 @@ Rufe nun `FIND_CONCATENATE` auf dem neu erstellten Kanal auf: === "Vorher" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // Eine Begrüßung ausgeben + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // Eine Begrüßung ausgeben (aktualisiert auf nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) // Die Begrüßung in Großbuchstaben umwandeln @@ -704,8 +756,8 @@ Da `cowpy` noch keine Metadaten-Tupel akzeptiert (das werden wir im nächsten Te === "Danach" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // Eine Begrüßung ausgeben + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // Eine Begrüßung ausgeben (aktualisiert auf nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) // Die Begrüßung in Großbuchstaben umwandeln @@ -729,8 +781,8 @@ Da `cowpy` noch keine Metadaten-Tupel akzeptiert (das werden wir im nächsten Te === "Vorher" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // Eine Begrüßung ausgeben + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // Eine Begrüßung ausgeben (aktualisiert auf nf-core-Konvention für Samplesheets) sayHello(ch_samplesheet) // Die Begrüßung in Großbuchstaben umwandeln @@ -753,7 +805,7 @@ Die `#!groovy .map { meta, file -> file }`-Operation extrahiert die Datei aus de Dann ist es nur noch eine Sache, `ch_for_cowpy` anstelle von `collectGreetings.out.outfile` in dieser letzten Zeile an `cowpy` zu übergeben. -!!! note "Hinweis" +!!! info "Info" Im nächsten Teil des Kurses werden wir `cowpy` aktualisieren, damit es direkt mit Metadaten-Tupeln funktioniert, sodass dieser Extraktionsschritt nicht mehr notwendig sein wird. @@ -762,7 +814,7 @@ Dann ist es nur noch eine Sache, `ch_for_cowpy` anstelle von `collectGreetings.o Lass uns testen, ob der Workflow mit dem neu integrierten `find/concatenate`-Modul funktioniert: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` Dies sollte relativ schnell laufen. @@ -770,40 +822,40 @@ Dies sollte relativ schnell laufen. ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` Beachte, dass `FIND_CONCATENATE` jetzt in der Liste der Prozessausführungen anstelle von `collectGreetings` erscheint. diff --git a/docs/de/docs/hello_nf-core/04_make_module.md b/docs/de/docs/hello_nf-core/04_make_module.md index ee00abf23c..4bf235b222 100644 --- a/docs/de/docs/hello_nf-core/04_make_module.md +++ b/docs/de/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ Danach zeigen wir dir, wie du die vorlagenbasierte Modulerstellung nutzt, um in Du kannst testen, ob sie erfolgreich läuft, indem du den folgenden Befehl ausführst: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ Los geht's! === "Danach" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // ASCII-Kunst mit cowpy generieren (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "Vorher" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // ASCII-Kunst mit cowpy generieren (https://github.com/jeffbuttars/cowpy) process cowpy { ``` In diesem Fall ist die Großschreibung völlig unkompliziert. -Wenn der Prozessname aus mehreren Wörtern bestünde, zum Beispiel wenn wir einen Prozess namens MyCowpyTool ursprünglich in CamelCase hätten, wäre die nf-core-Konvention, Unterstriche zu verwenden, um sie zu trennen, was MY_COWPY_TOOL ergäbe. +Wenn der Prozessname aus mehreren Wörtern bestünde, zum Beispiel wenn wir einen Prozess namens `MyCowpyTool` ursprünglich in CamelCase hätten, wäre die nf-core-Konvention, Unterstriche zu verwenden, um sie zu trennen, was `MY_COWPY_TOOL` ergäbe. #### 1.1.2. Die Modul-Import-Anweisung aktualisieren @@ -164,7 +164,7 @@ Also aktualisieren wir jetzt die beiden Referenzen auf den Prozess im Workflow-B // // Software-Versionen sammeln und speichern // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ Also aktualisieren wir jetzt die beiden Referenzen auf den Prozess im Workflow-B // // Software-Versionen sammeln und speichern // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ Stelle sicher, dass du **beide** Änderungen vornimmst, sonst erhältst du einen Lass uns den Workflow ausführen, um zu testen, dass nach diesen Änderungen alles korrekt funktioniert. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ Kehre zur Moduldatei `cowpy.nf` zurück und ändere sie so, dass sie Metadaten-T === "Danach" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ Kehre zur Moduldatei `cowpy.nf` zurück und ändere sie so, dass sie Metadaten-T === "Vorher" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ Dies ist technisch nicht erforderlich, aber es ist gute Praxis, auf benannte Aus Lass uns den Workflow ausführen, um zu testen, dass nach diesen Änderungen alles korrekt funktioniert. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Du kannst sehen, dass wir drei Änderungen vorgenommen haben. Dadurch ist die Modulschnittstelle jetzt einfacher: Sie erwartet nur die wesentlichen Metadaten- und Dateieingaben. -!!! note "Hinweis" +!!! info "Info" Der `?:`-Operator wird oft 'Elvis-Operator' genannt, weil er wie ein seitwärts gedrehtes Elvis-Presley-Gesicht aussieht, wobei das `?`-Zeichen die Welle in seinen Haaren symbolisiert. @@ -623,15 +623,15 @@ Lass uns testen, dass der Workflow immer noch wie erwartet funktioniert, indem w Führe diesen Befehl mit `kosh` aus, einer der... rätselhafteren Optionen: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "Befehlsausgabe" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ Zusammenfassung der Vorteile dieses Ansatzes: - **Portabilität**: Module können ohne fest codierte Tool-Optionen wiederverwendet werden - **Keine Workflow-Änderungen**: Das Hinzufügen oder Ändern von Tool-Optionen erfordert keine Aktualisierung des Workflow-Codes -!!! note "Hinweis" +!!! info "Info" Das `ext.args`-System hat leistungsstarke zusätzliche Funktionen, die hier nicht behandelt werden, einschließlich des dynamischen Wechselns von Argumentwerten basierend auf Metadaten. Siehe die [nf-core-Modulspezifikationen](https://nf-co.re/docs/guidelines/components/modules) für weitere Details. @@ -841,15 +841,15 @@ Falls du dich fragst: Die `ext.prefix`-Closure hat Zugriff auf das richtige Stü Lass uns testen, dass der Workflow immer noch wie erwartet funktioniert. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ Das war's! Lass uns sehen, was passiert, wenn wir die Pipeline jetzt ausführen. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ Jetzt enthält `core-hello-results` auch die Ausgaben des `COWPY`-Moduls. Du kannst sehen, dass Nextflow diese Hierarchie von Verzeichnissen basierend auf den Namen des Workflows und des Moduls erstellt hat. -!!! note "Hinweis" +!!! info "Info" Du wirst vielleicht `hello_software_versions.yml` in `pipeline_info/` bemerken. Diese Datei enthält derzeit nur Versionsinformationen von `FIND_CONCATENATE`, weil `COWPY` seine Version noch nicht meldet. @@ -1098,9 +1098,9 @@ Allerdings kannst du entscheiden, dass du deine Eingaben anders organisieren mö Um die Standard-`publishDir`-Direktive zu überschreiben, kannst du einfach deine eigenen Direktiven zur Datei `conf/modules.config` hinzufügen. -Du könntest beispielsweise den Standard für einen einzelnen Prozess mit dem `withName:`-Selektor überschreiben, wie in diesem Beispiel, wo wir eine benutzerdefinierte `publishDir`-Direktive für den 'COWPY'-Prozess hinzufügen. +Du könntest beispielsweise den Standard für einen einzelnen Prozess mit dem `withName:`-Selektor überschreiben, wie in diesem Beispiel, wo wir eine benutzerdefinierte `publishDir`-Direktive für den `COWPY`-Prozess hinzufügen. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ Am script-Block sind keine Änderungen nötig — die Version wird statisch im o #### 1.6.2. Die Pipeline ausführen und den Versionsbericht prüfen ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -Die Sammlung auf Workflow-Seite — der `Channel.topic("versions")`-Block, den du im Platzhalter-Workflow in Teil 2 gesehen hast — abonniert das Topic und schreibt diesen kombinierten Bericht automatisch. +Die Sammlung auf Workflow-Seite — der `channel.topic("versions")`-Block, den du im Platzhalter-Workflow in Teil 2 gesehen hast — abonniert das Topic und schreibt diesen kombinierten Bericht automatisch. -!!! note "Rückwärtskompatibilität" +!!! info "Rückwärtskompatibilität" Der `versions_file`-Branch im topic channel-Block des Workflows existiert, um Module zu unterstützen, die noch nicht auf `topic: versions` aktualisiert wurden und weiterhin eine `versions.yml`-Datei im script-Block mit `emit: versions` schreiben. Beide Stile werden während der Übergangsphase gleichzeitig unterstützt. @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Muster 1: Metadaten-Tupel ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ Der Standardcode bietet einen Wechsel zwischen Docker und Singularity an, aber w === "Vorher" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Conda-Umgebung -Für die Conda-Umgebung gibt der Modulcode `conda "${moduleDir}/environment.yml"` an, was bedeutet, dass sie in der Datei `environment.yml` konfiguriert werden sollte. +Für die Conda-Umgebung gibt der Modulcode `#!groovy conda "${moduleDir}/environment.yml"` an, was bedeutet, dass sie in der Datei `environment.yml` konfiguriert werden sollte. Das Modul-Erstellungstool hat uns gewarnt, dass es das `cowpy`-Paket in Bioconda (dem primären Kanal für Bioinformatik-Tools) nicht finden konnte. Allerdings ist `cowpy` in conda-forge verfügbar, sodass du die `environment.yml` wie folgt vervollständigen kannst: @@ -1428,7 +1431,7 @@ Aktualisiere die Eingabe- und Ausgabeblöcke: === "Danach" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Aktualisiere die Eingabe- und Ausgabeblöcke: === "Vorher" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` Dies spezifiziert: @@ -1453,6 +1456,7 @@ Dies spezifiziert: - Den Eingabedatei-Parameternamen (`input_file` statt dem generischen `input`) - Den Ausgabedateinamen mit dem konfigurierbaren Präfix-Muster (`#!groovy ${prefix}.txt` statt Wildcard `*`) - Einen beschreibenden Emit-Namen (`cowpy_output` statt dem generischen `output`) +- Einen statischen Versionsstring (`#!groovy val("1.1.5")`) anstelle des `#!groovy eval("cowpy --version")` der Vorlage, passend zum manuellen Modul aus Abschnitt 1.6 (das `cowpy`-Tool stellt kein `--version`-Flag bereit) Wenn du den Nextflow Language Server zur Syntaxvalidierung verwendest, wird der Teil `#!groovy ${prefix}` in dieser Phase als Fehler markiert, weil wir ihn noch nicht zum Script-Block hinzugefügt haben. Kommen wir jetzt dazu. @@ -1517,7 +1521,7 @@ Mach dir nicht zu viele Sorgen, wenn dies mysteriös erscheint; wir fügen dies === "Vorher" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1576,15 +1580,15 @@ Alles, was wir tun müssen, um diese neue Version des `COWPY`-Moduls auszuprobie Führen wir die Pipeline aus, um sie zu testen. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Befehlsausgabe" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1611,10 +1615,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/de/docs/hello_nf-core/05_input_validation.md b/docs/de/docs/hello_nf-core/05_input_validation.md index 665824fafa..0833e57545 100644 --- a/docs/de/docs/hello_nf-core/05_input_validation.md +++ b/docs/de/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ In diesem fünften Teil des Hello nf-core Trainingskurses zeigen wir dir, wie du Du kannst testen, ob es erfolgreich läuft, indem du folgenden Befehl ausführst: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema ist der Nachfolger des veralteten nf-validation Plugins und verwendet ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ Lass uns nun diese Prinzipien in der Praxis anwenden, beginnend mit der Paramete Beginnen wir damit, Parametervalidierung zu unserer Pipeline hinzuzufügen. Dies validiert Kommandozeilen-Flags wie `--input`, `--outdir` und `--batch`. -### 1.1. Validierung so konfigurieren, dass Eingabedatei-Validierung übersprungen wird +### 1.1. Validierung aktivieren und Eingabedatei-Validierung überspringen Das nf-core Pipeline-Template kommt mit bereits installiertem und konfiguriertem nf-schema: - Das nf-schema Plugin wird über den `plugins{}` Block in `nextflow.config` installiert -- Parametervalidierung ist standardmäßig über `params.validate_params = true` aktiviert +- Parametervalidierung wird über `params.validate_params` gesteuert - Die Validierung wird vom `UTILS_NFSCHEMA_PLUGIN` Subworkflow während der Pipeline-Initialisierung durchgeführt -Das Validierungsverhalten wird über den `validation{}` Bereich in `nextflow.config` gesteuert. +In den Teilen 3 und 4 haben wir `validate_params = false` gesetzt, damit die Pipeline laufen konnte, bevor wir Schemas konfiguriert hatten. +Jetzt, wo wir bereit sind, Validierung hinzuzufügen, ist der erste Schritt, sie einzuschalten. -Da wir zuerst an der Parametervalidierung arbeiten (dieser Abschnitt) und das Eingabedaten-Schema erst in Abschnitt 2 konfigurieren werden, müssen wir nf-schema vorübergehend anweisen, die Validierung der Dateiinhalte des `input` Parameters zu überspringen. +Öffne `nextflow.config` und finde den `validate_params` Parameter (um Zeile 37) und setze ihn auf `true`: -Öffne `nextflow.config` und finde den `validation` Block (um Zeile 247). Füge `ignoreParams` hinzu, um die Eingabedatei-Validierung zu überspringen: +=== "Danach" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "Vorher" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +Das Validierungsverhalten selbst wird über den `validation{}` Bereich in `nextflow.config` gesteuert. + +Da wir zuerst an der Parametervalidierung arbeiten (dieser Abschnitt) und das Eingabedaten-Schema erst in Abschnitt 2 konfigurieren werden, müssen wir nf-schema außerdem vorübergehend anweisen, die Validierung der Dateiinhalte des `input` Parameters zu überspringen. + +Finde den `validation` Block (um Zeile 252) und füge `ignoreParams` hinzu, um die Eingabedatei-Validierung zu überspringen: === "Danach" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ Da wir zuerst an der Parametervalidierung arbeiten (dieser Abschnitt) und das Ei === "Vorher" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ Diese Konfiguration weist nf-schema an: - **`ignoreParams`**: Validierung der Dateiinhalte des `input` Parameters überspringen (vorübergehend; wir werden dies in Abschnitt 2 wieder aktivieren) - **`monochromeLogs`**: Farbige Ausgabe in Validierungsmeldungen deaktivieren, wenn auf `true` gesetzt (gesteuert durch `params.monochrome_logs`) -!!! note "Warum den input Parameter ignorieren?" +!!! info "Warum den input Parameter ignorieren?" Der `input` Parameter in `nextflow_schema.json` hat `"schema": "assets/schema_input.json"`, was nf-schema anweist, die *Inhalte* der Eingabe-CSV-Datei gegen dieses Schema zu validieren. Da wir dieses Schema noch nicht konfiguriert haben, ignorieren wir diese Validierung vorübergehend. @@ -263,7 +280,7 @@ Du solltest etwas Ähnliches sehen: | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -Du solltest sehen, dass der `batch` Parameter zum Schema hinzugefügt wurde und das "required" Feld nun `["input", "outdir", "batch"]` zeigt. +Du solltest sehen, dass der `batch` Parameter zum Schema hinzugefügt wurde und das `required` Feld nun `["input", "outdir", "batch"]` zeigt. ### 1.5. Parametervalidierung testen @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ Jetzt, wo wir das Eingabedaten-Schema konfiguriert haben, können wir die vorüb === "Danach" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ Jetzt, wo wir das Eingabedaten-Schema konfiguriert haben, können wir die vorüb === "Vorher" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ Lass uns überprüfen, dass unsere Validierung funktioniert, indem wir sowohl g #### 2.7.1. Test mit gültiger Eingabe Bestätige zunächst, dass die Pipeline erfolgreich mit gültiger Eingabe läuft. -Beachte, dass wir `--validate_params false` nicht mehr benötigen, da die Validierung funktioniert! +Mit `validate_params = true` und dem Eingabe-Schema an Ort und Stelle laufen nun sowohl die Parameter- als auch die Eingabedatenvalidierung tatsächlich durch. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/de/docs/info/nxf_versions.md b/docs/de/docs/info/nxf_versions.md index 19e7a7cc65..a88d556c55 100644 --- a/docs/de/docs/info/nxf_versions.md +++ b/docs/de/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: Ab Version 3.0 des Trainingsportals sind alle unsere Trainingskurse mit Nextflow Version 25.10.2 oder neuer kompatibel, sofern auf der Kursübersichtsseite nicht anders angegeben. (Dies gilt nicht für veraltete oder anderweitig archivierte Materialien, die möglicherweise keinen Versionshinweis enthalten.) -Die Nextflow-Version, die in unserer Trainingsumgebung standardmäßig geladen wird, ist **Nextflow 25.10.4**. +Die Nextflow-Version, die in unserer Trainingsumgebung standardmäßig geladen wird, ist **Nextflow 26.04.4**. Da die Kurse jetzt typisierte Eingaben auf Workflow-Ebene sowie Workflow-Ausgabedirektiven verwenden, benötigen sie den V2-Syntaxparser, **sofern nicht ausdrücklich anders angegeben**. +Der V2-Parser ist ab Nextflow 26.04 standardmäßig aktiviert, sodass du ihn bei der von uns geladenen Version nicht manuell aktivieren musst. Wenn du die Umgebung verwendest, die wir über [Github Codespaces](../envsetup/01_setup.md) oder [lokale Devcontainer](../envsetup/03_devcontainer.md) bereitstellen, musst du nichts tun, sofern in den Kursanweisungen nicht ausdrücklich etwas anderes angegeben ist. -Wenn du jedoch planst, die Trainings in deiner eigenen Umgebung zu absolvieren ([Manuelle Installation](../envsetup/02_local.md)), musst du sicherstellen, dass du Nextflow Version 25.10.2 oder neuer mit aktiviertem v2-Syntaxparser verwendest. +Wenn du jedoch planst, die Trainings in deiner eigenen Umgebung zu absolvieren ([Manuelle Installation](../envsetup/02_local.md)), musst du sicherstellen, dass du Nextflow Version 25.10.2 oder neuer verwendest und den v2-Syntaxparser aktivierst, falls du eine Version vor 26.04 nutzt. ## Ältere Versionen der Trainingsmaterialien @@ -40,7 +41,7 @@ Aller moderner Nextflow-Code verwendet DSL2. Der v1-Parser ist der ursprüngliche, tolerantere Parser. Der v2-Parser ist strenger und ermöglicht neue Sprachfunktionen wie statische Typisierung (typisierte Ein- und Ausgaben) und Ausgabedirektiven auf Workflow-Ebene. Der v2-Parser liefert auch bessere Fehlermeldungen und erkennt mehr Fehler zur Parse-Zeit statt zur Laufzeit. -Der v2-Parser wird in Nextflow 26.04 zum Standard. +Der v2-Parser ist ab Nextflow 26.04 der Standard. Zusammengefasst: DSL2 ist die Sprache, die du schreibst; die Syntaxparser-Version bestimmt, wie streng diese Sprache interpretiert wird und welche erweiterten Funktionen verfügbar sind. @@ -52,21 +53,22 @@ Weitere Informationen zum Aktualisieren deiner Nextflow-Version findest du in de ### Den v2-Syntaxparser aktivieren +Ab Nextflow 26.04 ist der v2-Parser der Standard. Die folgenden Schritte sind daher nur für Versionen vor 26.04 erforderlich. + Um den v2-Syntaxparser für deine aktuelle Sitzung zu **aktivieren**, führe folgenden Befehl in deinem Terminal aus: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Um dies dauerhaft zu machen (bis v2 in Nextflow 26.04 zum Standard wird), füge den export-Befehl zu deinem Shell-Profil hinzu (`~/.bashrc`, `~/.zshrc`, etc.): +Um dies dauerhaft zu machen, füge den export-Befehl zu deinem Shell-Profil hinzu (`~/.bashrc`, `~/.zshrc`, etc.): ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -Beachte, dass die Umgebungsvariable `NXF_SYNTAX_PARSER=v2` eine vorübergehende Anforderung ist. -Ab Nextflow 26.04 wird der v2-Parser zum Standard und diese Einstellung wird nicht mehr benötigt. +Beachte, dass die Umgebungsvariable `NXF_SYNTAX_PARSER=v2` bei Nextflow-Versionen vor 26.04 erforderlich ist, um die v2-Funktionen dieser Kurse zu nutzen. ### Den v2-Syntaxparser deaktivieren diff --git a/docs/de/docs/nextflow_run/01_basics.md b/docs/de/docs/nextflow_run/01_basics.md index 2ff702ff53..2f30e3320c 100644 --- a/docs/de/docs/nextflow_run/01_basics.md +++ b/docs/de/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "Befehlsausgabe" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Wenn deine Konsolenausgabe ungefähr so aussieht, dann herzlichen Glückwunsch, du hast gerade deinen ersten Nextflow-Workflow ausgeführt! @@ -115,13 +121,14 @@ Wenn deine Konsolenausgabe ungefähr so aussieht, dann herzlichen Glückwunsch, Dies wurde zu Beginn des Kurses erwähnt, aber vielleicht hast du es verpasst. Schau dir das Hilfsmaterial zu [Nextflow-Versionen](../info/nxf_versions.md) an. - Kurz gesagt, wenn du Nextflow `25.10` verwendest, musst du den v2-Sprach-Parser aktivieren: + Der v2-Parser ist ab Nextflow 26.04 der Standard, daher wirst du diesen Fehler nur bei älteren Versionen sehen. + Bei einer Version vor 26.04 musst du den v2-Sprach-Parser aktivieren: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Die wichtigste Ausgabe hier ist die letzte Zeile, die in der obigen Ausgabe hervorgehoben ist: +Die wichtigste Ausgabe hier ist die hervorgehobene Zeile: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` Du solltest sehen, dass deine Ausgaben jetzt in ein Verzeichnis namens `hello_results` anstelle von `results` veröffentlicht werden: @@ -206,7 +219,7 @@ Das mag verwirrend klingen, also schauen wir uns an, wie das in der Praxis aussi Wenn wir auf die Konsolenausgabe für den zuvor ausgeführten Workflow zurückgehen, hatten wir diese Zeile: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` Siehst du, wie die Zeile mit `[a3/1e1535]` beginnt? @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "Befehlsausgabe" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Die Konsolenausgabe sollte vertraut aussehen, aber es gibt eine Sache, die ein bisschen anders ist als vorher. @@ -767,7 +786,7 @@ Was repräsentiert `[a3/7be2fa]` in der Konsolenausgabezeile `[a3/7be2fa] SAYHEL - [x] Der abgekürzte Pfad zum Work-Verzeichnis der Aufgabe - [ ] Die Prüfsumme der Ausgabedatei -Mehr erfahren: [2.4. Die ursprüngliche Ausgabe und Protokolle im `work/`-Verzeichnis finden](#23-find-the-original-output-and-logs-in-the-work-directory) +Mehr erfahren: [2.3. Die ursprüngliche Ausgabe und Protokolle im `work/`-Verzeichnis finden](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ Was ist der Zweck der `.command.sh`-Datei in einem Aufgabenverzeichnis? - [ ] Sie enthält Fehlermeldungen von fehlgeschlagenen Aufgaben - [ ] Sie listet Eingabedateien auf, die für die Aufgabe bereitgestellt wurden -Mehr erfahren: [2.4. Die ursprüngliche Ausgabe und Protokolle im `work/`-Verzeichnis finden](#23-find-the-original-output-and-logs-in-the-work-directory) +Mehr erfahren: [2.3. Die ursprüngliche Ausgabe und Protokolle im `work/`-Verzeichnis finden](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ Was passiert mit veröffentlichten Ergebnissen, wenn du einen Workflow ohne `-re - [ ] Nextflow verhindert das Überschreiben und schlägt fehl - [ ] Sie werden automatisch gesichert -Mehr erfahren: [2.5. Den Workflow mit verschiedenen Grüßen erneut ausführen](#24-re-run-the-workflow-with-different-greetings) +Mehr erfahren: [2.4. Den Workflow mit verschiedenen Grüßen erneut ausführen](#24-re-run-the-workflow-with-different-greetings) Was zeigt diese Konsolenausgabe an? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] Die Aufgabe ist fehlgeschlagen und wurde übersprungen diff --git a/docs/de/docs/nextflow_run/02_pipeline.md b/docs/de/docs/nextflow_run/02_pipeline.md index 96bdb9f1fc..dbde71d3df 100644 --- a/docs/de/docs/nextflow_run/02_pipeline.md +++ b/docs/de/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Spannenderweise scheint dies anzuzeigen, dass '3 von 3' Aufrufe für den process gemacht wurden, was ermutigend ist, da es drei Datenzeilen in der CSV gab, die wir als Eingabe bereitgestellt haben. @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "Befehlsausgabe" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Diesmal sehen wir alle drei process-Ausführungen und ihre zugehörigen work-Unterverzeichnisse in der Ausgabe aufgelistet. @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "Befehlsausgabe" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` Du siehst, dass wie versprochen mehrere Schritte als Teil des Workflows ausgeführt wurden; die ersten beiden (`sayHello` und `convertToUpper`) wurden vermutlich auf jeden einzelnen Gruß ausgeführt, und der dritte (`collectGreetings`) wird nur einmal ausgeführt worden sein, auf den Ausgaben aller drei `convertToUpper`-Aufrufe. @@ -619,6 +655,7 @@ Diesmal heißt der Operator `collect` und wird auf den Ausgabe-Kanal angewendet, Der `collect`-Operator wird verwendet, um die Ausgaben von mehreren Aufrufen desselben process zu sammeln und sie in ein einzelnes Kanal-Element zu verpacken. Im Kontext dieses Workflows nimmt er die drei großgeschriebenen Grüße im `convertToUpper.out` Kanal (die drei separate Kanal-Elemente sind und normalerweise in separaten Aufrufen vom nächsten process behandelt würden) und verpackt sie in ein einzelnes Element. +So bekommen wir alle Grüße zurück in dieselbe Datei.
--8<-- "docs/en/docs/nextflow_run/img/with-collect-operator.svg" @@ -630,8 +667,6 @@ Im Gegensatz dazu würde Nextflow, wenn wir `collect()` nicht auf die Ausgabe vo --8<-- "docs/en/docs/nextflow_run/img/without-collect-operator.svg"
-So bekommen wir alle Grüße zurück in dieselbe Datei. - Es gibt viele andere [Operatoren](https://nextflow.io/docs/latest/reference/operator.html), die verfügbar sind, um Transformationen auf den Inhalt von Kanälen zwischen process-Aufrufen anzuwenden. Das gibt bei der Pipeline-Entwicklung viel Flexibilität für die Anpassung der Flusslogik. @@ -671,13 +706,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "Befehlsausgabe" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` Du solltest neue Endausgaben sehen, die mit deinem benutzerdefinierten Batch-Namen benannt sind. @@ -922,13 +975,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` Du wirst bemerken, dass alle process-Ausführungen erfolgreich aus dem cache geladen wurden, was bedeutet, dass Nextflow erkannt hat, dass es die angeforderte Arbeit bereits erledigt hat, obwohl der Code aufgeteilt wurde und die Haupt-Workflow-Datei umbenannt wurde. @@ -1076,20 +1147,20 @@ Du siehst, dass das Dateisystem innerhalb des Containers sich vom Dateisystem au Von innerhalb des Containers kannst du den `cowpy`-Befehl direkt ausführen. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "Befehlsausgabe" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` Das produziert ASCII-Kunst des Standard-Kuh-Charakters (oder 'Cowacter') mit einer Sprechblase, die den von uns angegebenen Text enthält. @@ -1098,22 +1169,22 @@ Jetzt, da du die grundlegende Verwendung getestet hast, kannst du versuchen, ihm Zum Beispiel sagt die Tool-Dokumentation, dass wir den Charakter mit `-c` setzen können. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Befehlsausgabe" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1299,15 +1370,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` Die ersten drei Schritte wurden aus dem cache geladen, da wir sie zuvor schon ausgeführt haben, aber der `cowpy` process ist neu, also wird der tatsächlich ausgeführt. diff --git a/docs/de/docs/nextflow_run/03_config.md b/docs/de/docs/nextflow_run/03_config.md index 2433e9932a..b5e12e4c6b 100644 --- a/docs/de/docs/nextflow_run/03_config.md +++ b/docs/de/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` Das produziert immer noch dieselbe Ausgabe wie zuvor. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` Das wird neue Verzeichnisse unter `tux-run/` erstellen, einschließlich `tux-run/work/` und `tux-run/results/`. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` Die finale Ausgabedatei sollte den stegosaurus-Charakter enthalten, der die Grüße sagt. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` Das produziert immer noch dieselbe Ausgabe wie zuvor, außer dass wir unsere Ausgaben diesmal unter `results_config/outdir/` finden. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` Das produziert immer noch dieselbe Ausgabe wie zuvor, außer dass wir unsere Ausgaben diesmal unter `results_config/pnames/` finden, und sie sind nach process gruppiert. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` Das produziert immer noch dieselbe Ausgabe wie zuvor, außer dass wir unsere Ausgaben diesmal unter `results_config/outmode/` finden. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "Befehlsausgabe" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` Das sollte ohne Probleme funktionieren und dieselben Ausgaben wie zuvor unter `results_config/conda` produzieren. @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` Wie du sehen kannst, erlaubt uns das, sehr bequem zur Laufzeit zwischen Konfigurationen zu wechseln. @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` Das wird Docker verwenden, wo möglich, und Ausgaben unter `results_config/test` produzieren, und diesmal ist der Charakter das komische Duo `dragonandcow`. @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/de/docs/nf4_science/_template/02_single_sample.md b/docs/de/docs/nf4_science/_template/02_single_sample.md index a61d08aea5..fa9b873b95 100644 --- a/docs/de/docs/nf4_science/_template/02_single_sample.md +++ b/docs/de/docs/nf4_science/_template/02_single_sample.md @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/de/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/de/docs/nf4_science/genomics/02_per_sample_variant_calling.md index c68a6388c4..4bcbc5043e 100644 --- a/docs/de/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/de/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -1,5 +1,3 @@ -I need to update only the sections affected by the diff - specifically, changing `version 25.10.2` to `version 25.10.4` in console output blocks, and updating one link from `../../side_quests/working_with_files.md` to `../../side_quests/working_with_files/index.md`. - # Teil 2: Variantenerkennung pro Probe :material-information-outline:{ .ai-translation-notice-icon } KI-gestützte Übersetzung - [mehr erfahren & Verbesserungen vorschlagen](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) @@ -404,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` Du kannst überprüfen, dass die Indexdatei korrekt generiert wurde, indem du im Arbeitsverzeichnis oder im Ergebnisverzeichnis nachsiehst. @@ -771,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` Wenn wir uns jetzt die Konsolenausgabe ansehen, sehen wir die beiden aufgelisteten Prozesse. @@ -893,13 +911,32 @@ Lustige Sache: Dies _könnte funktionieren_, ODER es _könnte fehlschlagen_. Hie ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Wenn dein Workflow-Lauf erfolgreich war, führe ihn erneut aus, bis du einen Fehler wie diesen erhältst: @@ -907,9 +944,9 @@ Wenn dein Workflow-Lauf erfolgreich war, führe ihn erneut aus, bis du einen Feh ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1166,13 +1203,32 @@ Diesmal (und jedes Mal) sollte alles korrekt laufen: ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Das Ergebnisverzeichnis enthält jetzt sowohl BAM- als auch BAI-Dateien für jede Probe (aus dem Tupel) zusammen mit den VCF-Ausgaben: @@ -1329,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Dies sollte dasselbe Ergebnis wie zuvor liefern. Unser einfacher Variantenerkennungs-Workflow hat jetzt alle grundlegenden Funktionen, die wir wollten. diff --git a/docs/de/docs/nf4_science/genomics/03_joint_calling.md b/docs/de/docs/nf4_science/genomics/03_joint_calling.md index d3a89d259c..083899c5b3 100644 --- a/docs/de/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/de/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` Die Nextflow-Ausgabe sieht genauso aus wie zuvor, aber die `.g.vcf`-Dateien und ihre Indexdateien sind jetzt in Unterverzeichnissen organisiert. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` Die ersten beiden Schritte sind aus dem vorherigen Lauf gecacht, und der neue `GATK_JOINTGENOTYPING`-Schritt läuft einmal auf den gesammelten Eingaben aller drei Proben. diff --git a/docs/de/docs/nf4_science/imaging/01_basics.md b/docs/de/docs/nf4_science/imaging/01_basics.md index 15fe25d9b7..02e62d04b1 100644 --- a/docs/de/docs/nf4_science/imaging/01_basics.md +++ b/docs/de/docs/nf4_science/imaging/01_basics.md @@ -19,21 +19,21 @@ nextflow run hello-world.nf --greeting 'Hello World!' Deine Konsolenausgabe sollte in etwa so aussehen: -```console title="Ausgabe" linenums="1" - N E X T F L O W ~ version 25.04.3 +```console title="Output" linenums="1" + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Glückwunsch, du hast gerade deinen ersten Nextflow Workflow ausgeführt! Die wichtigste Ausgabe hier ist die letzte Zeile (Zeile 6): -```console title="Ausgabe" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` Dies zeigt uns, dass der `sayHello` Prozess einmal erfolgreich ausgeführt wurde (`1 of 1 ✔`). @@ -83,20 +83,20 @@ Das klingt vielleicht verwirrend, also schauen wir uns an, wie das in der Praxis Zurück zur Konsolenausgabe für den Workflow, den wir vorhin ausgeführt haben, hatten wir diese Zeile: -```console title="Auszug der Befehlsausgabe" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Excerpt of command output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` -Siehst du, wie die Zeile mit `[a3/7be2fa]` beginnt? +Siehst du, wie die Zeile mit `[71/8143bd]` beginnt? Das ist eine gekürzte Form des Aufgabenverzeichnispfads für diesen einen Prozessaufruf und zeigt dir, wo du die Ausgabe des `sayHello` Prozessaufrufs innerhalb des `work/` Verzeichnispfads findest. -Du kannst den vollständigen Pfad finden, indem du folgenden Befehl eingibst (ersetze `a3/7be2fa` mit dem, was du in deinem eigenen Terminal siehst) und die Tab-Taste drückst, um den Pfad zu vervollständigen oder ein Sternchen hinzuzufügen: +Du kannst den vollständigen Pfad finden, indem du folgenden Befehl eingibst (ersetze `71/8143bd` mit dem, was du in deinem eigenen Terminal siehst) und die Tab-Taste drückst, um den Pfad zu vervollständigen oder ein Sternchen hinzuzufügen: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -Dies sollte den vollständigen Verzeichnispfad ergeben: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +Dies sollte den vollständigen Verzeichnispfad ergeben: `work/71/8143bd5ed3420e23c5f0dc1a05056d` Schauen wir uns an, was sich darin befindet. @@ -116,8 +116,8 @@ Die genauen Unterverzeichnisnamen werden auf deinem System unterschiedlich sein. ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -136,7 +136,7 @@ Wenn du sie öffnest, wirst du die `Hello World!` Begrüßung wieder finden.
Dateiinhalt von output.txt -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,10 +159,9 @@ Die `.command.sh` Datei ist besonders nützlich, weil sie dir den Hauptbefehl ze
Dateiinhalt -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
@@ -177,11 +176,11 @@ Versuche, den Workflow mehrmals mit verschiedenen Werten für das `--greeting` A Beobachte, wie die Ausgaben und Logs isolierter Aufgabenverzeichnisse erhalten bleiben, während der Inhalt des `results` Verzeichnisses von der Ausgabe nachfolgender Ausführungen überschrieben wird. -### Zusammenfassung +### Fazit Du weißt, wie man ein einfaches Nextflow Skript ausführt, seine Ausführung überwacht und seine Ausgaben findet. -### Was kommt als Nächstes? +### Wie geht es weiter? Lerne, wie man ein grundlegendes Nextflow Skript liest und erkennt, wie seine Komponenten mit seiner Funktionalität zusammenhängen. @@ -357,14 +356,14 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Achte auf den `cached:` Teil, der in der Prozessstatuszeile (Zeile 5) hinzugefügt wurde, was bedeutet, dass Nextflow erkannt hat, dass es diese Arbeit bereits erledigt hat und einfach das Ergebnis aus dem vorherigen erfolgreichen Lauf wiederverwendet. +Achte auf den `cached:` Teil, der in der Prozessstatuszeile hinzugefügt wurde, was bedeutet, dass Nextflow erkannt hat, dass es diese Arbeit bereits erledigt hat und einfach das Ergebnis aus dem vorherigen erfolgreichen Lauf wiederverwendet. Du kannst auch sehen, dass der work Unterverzeichnis-Hash derselbe ist wie im vorherigen Lauf. Nextflow zeigt dir buchstäblich auf die vorherige Ausführung und sagt "Das habe ich bereits dort drüben gemacht." @@ -401,10 +400,10 @@ Du kannst das Nextflow Log verwenden, um einen Lauf anhand seines Zeitstempels u Du bist dafür verantwortlich, alle Ausgaben zu speichern, die dir wichtig sind oder auf die du dich verlassen möchtest! Wenn du die `publishDir` Direktive für diesen Zweck verwendest, stelle sicher, dass du den `copy` Modus verwendest, nicht den `symlink` Modus. -### Zusammenfassung +### Fazit Du weißt, wie man eine Pipeline erneut startet, ohne Schritte zu wiederholen, die bereits auf identische Weise ausgeführt wurden, das Ausführungslog einsieht und den `nextflow clean` Befehl verwendest, um alte work Verzeichnisse aufzuräumen. -### Was kommt als Nächstes? +### Wie geht es weiter? Jetzt, da du grundlegende Nextflow Operationen verstehst, bist du bereit, eine echte Bioimaging Pipeline mit nf-core/molkart auszuführen. diff --git a/docs/de/docs/nf4_science/imaging/02_run_molkart.md b/docs/de/docs/nf4_science/imaging/02_run_molkart.md index 9bd8502c72..930dbc9684 100644 --- a/docs/de/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/de/docs/nf4_science/imaging/02_run_molkart.md @@ -70,26 +70,34 @@ Dies erstellt ein `molkart/`-Verzeichnis mit dem vollständigen Pipeline-Quellco Bevor wir die vollständige Pipeline ausführen, lass uns lernen, warum Container für nf-core-Pipelines unerlässlich sind. -Lass uns versuchen, die Pipeline mit dem Testdatensatz und den Parametern aus der molkart-Testkonfiguration auszuführen: - -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +Wir übergeben die Parameter der Pipeline über eine Parameter-Datei. +Eine Parameter-Datei ist eine YAML-Datei, die jeden Parameter und seinen Wert auflistet. Das hält typisierte Werte (wie Integer) intakt und hält die Befehlszeile kurz. + +Eine `params.yaml`-Datei ist bereits im Arbeitsverzeichnis vorhanden: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` -Lass uns diese Parameter aufschlüsseln: +Diese Parameter sind: + +- `input`: Pfad zum Samplesheet mit Sample-Metadaten +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: Parameter für Gittermuster-Füllung +- `clahe_pyramid_tile`: Kernel-Größe für Kontrastverbesserung +- `segmentation_method`: Welche(r) Algorithmus/Algorithmen für Zellsegmentierung verwendet werden soll(en) +- `outdir`: Wo die Ergebnisse gespeichert werden sollen -- `--input`: Pfad zum Samplesheet mit Sample-Metadaten -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: Parameter für Gittermuster-Füllung -- `--clahe_pyramid_tile`: Kernel-Größe für Kontrastverbesserung -- `--segmentation_method`: Welche(r) Algorithmus/Algorithmen für Zellsegmentierung verwendet werden soll(en) -- `--outdir`: Wo die Ergebnisse gespeichert werden sollen +Lass uns versuchen, die Pipeline mit diesen Parametern auszuführen: + +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "Dieser Befehl wird fehlschlagen - das ist beabsichtigt!" @@ -172,17 +180,10 @@ process { } ``` -Führe nun die Pipeline erneut mit dem gleichen Befehl aus: +Führe nun die Pipeline erneut aus, diesmal mit allen drei Segmentierungsmethoden, damit wir sie später vergleichen können: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` Dieses Mal wird Nextflow: @@ -209,12 +210,13 @@ Während die Pipeline läuft, siehst du eine Ausgabe ähnlich dieser: ??? success "Befehlsausgabe" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ Während die Pipeline läuft, siehst du eine Ausgabe ähnlich dieser: |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ Während die Pipeline läuft, siehst du eine Ausgabe ähnlich dieser: https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,16 +300,16 @@ Die Executor-Zeile `executor > local (22)` sagt dir: Jede Prozesszeile zeigt: -- **Hash** (`[1a/2b3c4d]`): Work-Verzeichnis-Identifier (wie vorher) +- **Hash** (`[b4/e57ff1]`): Work-Verzeichnis-Identifier (wie vorher) - **Prozessname**: Vollständiger Modulpfad und Prozessname - **Eingabe-Identifier**: Sample-Name in Klammern -- **Fortschritt**: Prozentsatz abgeschlossen und Zählung (z.B. `1 of 1 ✔`) +- **Fortschritt**: Aufgabenanzahl und Abschlussstatus (z.B. `1 of 1 ✔`) ### Fazit Du weißt, wie man eine nf-core-Pipeline mit Testdaten startet und ihre Ausführungsausgabe interpretiert. -### Was kommt als Nächstes? +### Wie geht es weiter? Lerne, wo du die Ergebnisse findest und wie du sie interpretierst. @@ -372,7 +369,7 @@ Der Bericht enthält: - Segmentierungsqualitätsmetriken - Anzahl erkannter Zellen und Spots -!!! Tip +!!! Tip "Tipp" MultiQC-Berichte sind typischerweise in allen nf-core-Pipelines enthalten. Sie bieten immer einen Überblick über die Pipeline-Ausführung und Datenqualität. @@ -426,7 +423,7 @@ Dies zeigt: - CPU- und Speichernutzung - Welche Aufgaben gecacht wurden vs. ausgeführt wurden -!!! Tip +!!! Tip "Tipp" Diese Berichte sind unglaublich nützlich für die Optimierung der Ressourcenzuteilung und die Fehlerbehebung bei Leistungsproblemen. @@ -447,7 +444,7 @@ Genau wie bei unserem Hello-World-Beispiel findet die gesamte eigentliche Arbeit ### 4.1. Die Struktur des Work-Verzeichnisses verstehen Das Work-Verzeichnis enthält ein Unterverzeichnis für jede Aufgabe, die ausgeführt wurde. -Für diese Pipeline mit 12 Aufgaben wird es 12 Work-Unterverzeichnisse geben. +Für diesen Pipeline-Lauf mit 22 Aufgaben wird es 22 Work-Unterverzeichnisse geben. Liste das Work-Verzeichnis auf: @@ -467,7 +464,7 @@ ls -la work/3m/4n5o6p*/ Du wirst sehen: -- **.command.\*-Dateien**: Nextflow-Ausführungsskripte und Logs (wie vorher) +- **.command.\*** **Dateien**: Nextflow-Ausführungsskripte und Logs (wie vorher) - **Gestufte Eingabedateien**: Symlinks zu den tatsächlichen Eingabedateien - **Ausgabedateien**: Segmentierungsmasken, Zwischenergebnisse, etc. @@ -477,7 +474,7 @@ Der Hauptunterschied zu Hello World: - Ausgabedateien können ziemlich groß sein (Segmentierungsmasken, verarbeitete Bilder) - Mehrere Eingabe- und Ausgabedateien pro Aufgabe -!!! Tip +!!! Tip "Tipp" Wenn ein Prozess fehlschlägt, kannst du zu seinem Work-Verzeichnis navigieren, `.command.err` für Fehlermeldungen untersuchen und sogar `.command.sh` manuell erneut ausführen, um das Problem zu debuggen. @@ -492,7 +489,7 @@ Für nf-core-Pipelines mit großen Zwischendateien ist es jedoch besonders wicht Du verstehst, wie nf-core-Pipelines ihre Work-Verzeichnisse organisieren und wie man einzelne Aufgaben zum Debuggen inspiziert. -### Was kommt als Nächstes? +### Wie geht es weiter? Lerne über den Nextflow-Cache und wie man fehlgeschlagene Pipeline-Läufe fortsetzt. @@ -517,30 +514,29 @@ Dies ist für langläufige Pipelines unerlässlich, bei denen Fehler spät in de Führe den gleichen Befehl erneut aus, aber füge `-resume` hinzu: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -Du solltest eine Ausgabe wie diese sehen: +Du solltest eine Ausgabe wie diese sehen: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -Beachte `cached: 2` oder `cached: 1` für jeden Prozess - nichts wurde erneut ausgeführt! +Beachte die `cached: N`-Annotation bei jedem Vorverarbeitungs- und Segmentierungsprozess – diese Aufgaben wurden wiederverwendet und nicht erneut ausgeführt. ### 5.3. Wann Resume nützlich ist @@ -551,7 +547,7 @@ Resume ist besonders wertvoll, wenn: - Deine Netzwerkverbindung während des Datendownloads abbricht - Du zusätzliche Ausgaben hinzufügen möchtest, ohne Berechnungen zu wiederholen -!!! Warning +!!! Warning "Warnung" Resume funktioniert nur, wenn du die Eingabedaten, den Pipeline-Code oder die Parameter nicht geändert hast. Wenn du eines davon änderst, wird Nextflow betroffene Aufgaben korrekt erneut ausführen. @@ -560,6 +556,6 @@ Resume ist besonders wertvoll, wenn: Du weißt, wie man `-resume` verwendet, um Pipelines effizient erneut auszuführen, ohne erfolgreiche Aufgaben zu wiederholen. -### Was kommt als Nächstes? +### Wie geht es weiter? Jetzt, da du nf-core/molkart mit Testdaten ausführen kannst, bist du bereit zu lernen, wie man es für deine eigenen Datensätze konfiguriert. diff --git a/docs/de/docs/nf4_science/imaging/03_inputs.md b/docs/de/docs/nf4_science/imaging/03_inputs.md index 86232afaf0..4517e9f50c 100644 --- a/docs/de/docs/nf4_science/imaging/03_inputs.md +++ b/docs/de/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Jetzt lernen wir zwei bessere Ansätze zum Verwalten von Eingaben kennen: **Para ### 1.1. Das Problem mit langen Befehlszeilen -Erinnere dich an unseren Befehl aus Teil 2: +In Teil 2 haben wir bereits eine Parameterdatei verwendet, um den Befehl kurz zu halten und eingetippte Werte (wie die ganzzahligen Vorverarbeitungsparameter) korrekt zu übergeben: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -Das funktioniert, ist aber schwer zu reproduzieren, zu teilen oder zu ändern. +Viele Parameter einzeln auf der Kommandozeile zu übergeben ist schwer zu reproduzieren, zu teilen oder zu ändern. Was, wenn du dieselbe Analyse nächsten Monat erneut ausführen musst? Was, wenn ein Kollege genau deine Einstellungen verwenden möchte? +Eine Parameterdatei löst dieses Problem. -### 1.2. Lösung: Verwende eine Parameterdatei +### 1.2. Die Parameterdatei -Erstelle eine Datei namens `params.yaml`: +Hier ist die `params.yaml`-Datei, die wir bisher verwendet haben: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -Jetzt wird dein Befehl zu: +Jeder Parameter wird als `key: value`-Paar geschrieben. +Ganzzahlen ohne Anführungszeichen zu schreiben (zum Beispiel `mindagap_tilesize: 90`) erhält ihren Integer-Typ, den die Parametervalidierung der Pipeline erfordert. + +Dein Befehl wird damit zu: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -Das war's! Die Parameterdatei dokumentiert deine exakte Konfiguration und macht es einfach, sie erneut auszuführen oder zu teilen. +Die Parameterdatei dokumentiert deine exakte Konfiguration und macht es einfach, sie erneut auszuführen oder zu teilen. ### 1.3. Parameter überschreiben @@ -125,7 +122,7 @@ sample,nuclear_image,spot_table,membrane_image mem_only,data/nuclear.tiff,data/spots.txt,data/membrane.tiff ``` -!!! warning "Warnung" +!!! Warning "Warnung" Beachte, dass die Pfade im Samplesheet relativ zu dem Ort sind, an dem du Nextflow **ausführst**, nicht wo sich das Samplesheet befindet. diff --git a/docs/de/docs/nf4_science/imaging/04_config.md b/docs/de/docs/nf4_science/imaging/04_config.md index 60a6971c20..3ca2517993 100644 --- a/docs/de/docs/nf4_science/imaging/04_config.md +++ b/docs/de/docs/nf4_science/imaging/04_config.md @@ -131,15 +131,16 @@ Da wir `-resume` verwenden, prüft Nextflow, ob sich seit der letzten Ausführun Wenn Parameter, Eingaben und Code gleich sind, werden alle Aufgaben aus dem Cache abgerufen und die Pipeline wird fast sofort abgeschlossen. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -Beachte, dass alle Prozesse `cached: 2` oder `cached: 1` anzeigen - nichts wurde erneut ausgeführt! +Beachte die `cached: N`-Anmerkung bei jedem Prozess – die zwischengespeicherten Vorverarbeitungs- und Segmentierungsaufgaben wurden nicht erneut ausgeführt. ### 2.4. Test-Profile @@ -203,7 +204,7 @@ Profile werden von links nach rechts angewendet, spätere Profile überschreiben nf-core Pipelines kommen mit eingebauten Profilen für Container, Tests und spezielle Umgebungen. Du kannst mehrere Profile kombinieren, um die benötigte Konfiguration aufzubauen. -### Was kommt als Nächstes? +### Wie geht es weiter? Lerne, wie du eigene Profile für verschiedene Rechenumgebungen erstellst. diff --git a/docs/de/docs/nf4_science/rnaseq/02_single-sample.md b/docs/de/docs/nf4_science/rnaseq/02_single-sample.md index 9d51f10d61..430d752fe3 100644 --- a/docs/de/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/de/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` Dies sollte sehr schnell ausgeführt werden, wenn du Teil 1 durchgearbeitet hast und den Container bereits heruntergeladen hast. @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` Dies sollte ebenfalls sehr schnell ausgeführt werden, da wir mit einer so kleinen Eingabedatei arbeiten. @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` Du findest die Alignment-Ausgaben im Ergebnisverzeichnis. diff --git a/docs/de/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/de/docs/nf4_science/rnaseq/03_multi-sample.md index 9e8ead4675..7eba3e1707 100644 --- a/docs/de/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/de/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` Diesmal wird jeder Schritt 6 Mal ausgeführt, einmal für jede Probe in der CSV-Datei. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` Ein einzelner Aufruf von MULTIQC wurde nach den gecachten Prozessaufrufen hinzugefügt. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` Jetzt haben wir zwei leicht divergierende Versionen unseres Workflows, eine für Single-End-Read-Daten und eine für Paired-End-Daten. diff --git a/docs/de/docs/side_quests/debugging/index.md b/docs/de/docs/side_quests/debugging/index.md index 0f86431ebb..6ffe36d2b5 100644 --- a/docs/de/docs/side_quests/debugging/index.md +++ b/docs/de/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. Falsche Prozess-Keywords oder Direktiven verwenden @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. Ungültige Variablennamen verwenden @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ Bei einem 'No such variable'-Fehler kannst du ihn beheben, indem du die Variable val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // Variablen in Groovy-Code vor dem Skript definieren @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Falsche Verwendung von Bash-Variablen @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Groovy- vs. Bash-Variablen" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` Definiere deine Eingabekanäle immer innerhalb des workflow-Blocks und befolge generell alle anderen Empfehlungen der Erweiterung. @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` Häufiger als in diesem Beispiel wirst du zusätzliche Eingaben zu einem Prozess hinzufügen und vergessen, den workflow-Aufruf entsprechend zu aktualisieren, was zu dieser Art von Fehler führen kann. Glücklicherweise ist das einer der leichter verständlichen und behebbaren Fehler, da die Fehlermeldung die Diskrepanz klar beschreibt. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "Befehlsausgabe" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` Dieser Workflow wird ohne Fehler abgeschlossen, verarbeitet aber nur eine einzige Probe! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` Du solltest jetzt sehen, dass alle drei Proben verarbeitet werden, nicht nur eine. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "Befehlsausgabe" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. Kanal-Debugging-Techniken @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. Fehlende Software @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "Befehlsausgabe" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "Hinweis" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker Schauen wir uns `bad_resources.nf` an: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // FEHLER: Unrealistische Zeitbegrenzung input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -Wenn du deine Fehlermeldungen sorgfältig liest, sollten dich solche Fehler nicht lange beschäftigen. Stelle aber sicher, dass du die Ressourcenanforderungen der von dir ausgeführten Befehle verstehst, damit du deine Ressourcen-Direktiven entsprechend konfigurieren kannst. +Beim `local`-Executor ist die Fehlermeldung weniger eindeutig als bei einem Scheduler: Du erhältst `process hasn't exited` und `WARN: Killing running tasks` statt einer Meldung, die das Zeitlimit nennt. Der Zusammenhang ist folgender: Nextflow beendet eine Aufgabe, wenn sie die zugewiesenen Ressourcen überschreitet. Wenn ein Prozess ohne skriptseitigen Fehler abgebrochen wird, überprüfe seine Ressourcen-Direktiven. Hier ist die `time`-Direktive der Übeltäter – sie ist viel zu niedrig für die Arbeit, die der Prozess erledigt. Stelle sicher, dass du die Ressourcenanforderungen der von dir ausgeführten Befehle verstehst, damit du deine Ressourcen-Direktiven entsprechend konfigurieren kannst. ### 3.4. Prozess-Debugging-Techniken @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1913,7 +1901,7 @@ Das hilft zu überprüfen: - **Erwartete Ausgabe**: Ob der Befehl die richtigen Ergebnisse produziert hat - **Teilausführung**: Ob der Befehl gestartet, aber auf halbem Weg fehlgeschlagen ist -- **Debug-Informationen**: Jegliche Diagnosausgabe aus deinem Skript +- **Debug-Informationen**: Jegliche Diagnoseausgabe aus deinem Skript ##### Den Exit-Code prüfen @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### Den Code prüfen @@ -2249,16 +2237,20 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - Dieser kryptische Fehler weist auf ein Parsing-Problem um Zeile 11–12 im `params{}`-Block hin. Der v2-Parser erkennt strukturelle Probleme frühzeitig. + Der Parser zeigt auf Zeile 25 (`script:`), aber der eigentliche Verursacher liegt direkt darüber: Das abschließende Komma nach der `output:`-Deklaration in Zeile 23 lässt den Parser eine weitere Ausgabe erwarten, sodass er fehlschlägt, wenn er `script:` erreicht. Das ist der erste von mehreren Syntaxfehlern, die behoben werden müssen. Wende die Vier-Phasen-Debugging-Methode an, die du gelernt hast: @@ -2300,7 +2292,7 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. ``` ??? solution "Lösung" - Der `buggy_workflow.nf` enthält 9 oder 10 verschiedene Fehler (je nachdem, wie man zählt), die alle wichtigen Debugging-Kategorien abdecken. Hier ist eine systematische Aufschlüsselung jedes Fehlers und wie man ihn behebt. + Der `buggy_workflow.nf` enthält 10 verschiedene Fehler, die alle wichtigen Debugging-Kategorien abdecken. Hier ist eine systematische Aufschlüsselung jedes Fehlers und wie man ihn behebt – in der Reihenfolge, in der sie unter Nextflow 26.04 auftreten. Der Compiler verarbeitet den Workflow in zwei Durchläufen: Zuerst parst er die Syntax, dann prüft er statisch, ob alle Variablen definiert sind. Du behebst also zuerst die Syntaxfehler, dann eine Reihe von Fehlern wegen undefinierter Variablen, bevor der Workflow überhaupt ausgeführt wird und die Laufzeitfehler beginnen. Beginnen wir mit den Syntaxfehlern: @@ -2315,6 +2307,8 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. path "${sample_id}_result.txt" ``` + Sobald das Komma entfernt ist, läuft der Parser bis zum Ende der Datei und sucht nach der schließenden geschweiften Klammer für `processFiles` – und meldet `Unexpected input: ''`. + **Fehler 2: Syntaxfehler – Fehlende schließende geschweifte Klammer** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. } // Fehlende schließende geschweifte Klammer hinzufügen ``` + Jetzt wird die Syntax geparst und der statische Typprüfer läuft. Er meldet alle undefinierten Variablen auf einmal, bevor der Workflow ausgeführt wird: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + Diese vier Zeilen entsprechen drei verschiedenen Bugs: Fehler 3, 4 und 5 unten. Der letzte davon, `i`, ist eine Bash-Variable, die der Typprüfer nicht von einer Nextflow-Variable unterscheiden kann – daher taucht er hier zur Kompilierzeit auf statt als Laufzeitfehler. Behebe alle drei, bevor du den Workflow erneut ausführst. + **Fehler 3: Variablennamenfehler** ```groovy linenums="26" echo "Processing: ${sample}" // FEHLER: Sollte sample_id sein @@ -2348,14 +2353,23 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // FEHLER: sample_ids ist undefiniert ``` - **Korrektur:** Korrekten Kanal verwenden und Proben-IDs extrahieren + **Korrektur:** Korrekten Kanal verwenden ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - An diesem Punkt wird der Workflow ausgeführt, aber wir erhalten noch Fehler (z. B. `Path value cannot be null` in `processFiles`), verursacht durch eine fehlerhafte Kanalstruktur. + **Fehler 5: Bash-Variablen-Escaping-Fehler** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // FEHLER: $i sieht aus wie eine undefinierte Nextflow-Variable + ``` + **Korrektur:** Bash-Variable escapen, damit Nextflow sie der Shell überlässt + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + Nachdem diese Fehler behoben sind, wird der Workflow kompiliert und startet. Der erste Laufzeitfehler kommt von `processFiles`, das ein Tupel erwartet, aber einen einzelnen Wert erhält: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **Fehler 5: Kanalstrukturfehler – Falsche map-Ausgabe** + **Fehler 6: Kanalstrukturfehler – Falsche map-Ausgabe** ```groovy linenums="83" .map { row -> row.sample_id } // FEHLER: processFiles erwartet Tupel ``` @@ -2364,29 +2378,18 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - Das bricht aber unsere Lösung für `heavyProcess()` oben, also müssen wir eine map verwenden, um nur die Proben-IDs an diesen Prozess zu übergeben: + Das behebt `processFiles`, aber `input_ch` gibt jetzt ein zweiteiliges Tupel aus, und `heavyProcess` bekommt immer noch das gesamte Tupel, obwohl es einen einzelnen Wert erwartet. Das Tupel wird im Script als `[sample_005, /path/sample_005.fastq.gz]` dargestellt, was den Bash-Befehl mit einem Syntaxfehler und Exit-Status 2 abbricht. - **Fehler 6: Fehlerhafte Kanalstruktur für heavyProcess** + **Fehler 7: Fehlerhafte Kanalstruktur für heavyProcess** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // FEHLER: input_ch hat jetzt 2 Elemente pro Emission – heavyProcess braucht nur 1 (das erste) + heavy_ch = heavyProcess(input_ch) // FEHLER: input_ch gibt jetzt ein 2-Element-Tupel aus; heavyProcess braucht nur das erste Element ``` - **Korrektur:** Korrekten Kanal verwenden und Proben-IDs extrahieren + **Korrektur:** Nur die Proben-IDs übergeben ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - Jetzt kommen wir weiter, erhalten aber einen Fehler über `No such variable: i`, weil wir eine Bash-Variable nicht escaped haben. - - **Fehler 7: Bash-Variablen-Escaping-Fehler** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // FEHLER: $i nicht escaped - ``` - **Korrektur:** Bash-Variable escapen - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - Jetzt erhalten wir `Process exceeded running time limit (1ms)`, also korrigieren wir das Zeitlimit für den betreffenden Prozess: + Jetzt läuft `heavyProcess`, erreicht aber sein Zeitlimit. Beim `local`-Executor lautet die Meldung `process hasn't exited` (zusammen mit einer `WARN: Killing running tasks`-Meldung) statt einer expliziten Timeout-Meldung – verbinde die abgebrochene Aufgabe also mit ihrer `time`-Direktive: **Fehler 8: Ressourcenkonfigurationsfehler** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. time '100 s' ``` - Als nächstes haben wir einen `Missing output file(s)`-Fehler zu beheben: + Als nächstes haben wir einen `Missing output file(s)`-Fehler zu beheben, weil das Script `${sample_id}.txt` schreibt, die output-Deklaration aber `${sample_id}_heavy.txt` erwartet: **Fehler 9: Ausgabedateiname stimmt nicht überein** ```groovy linenums="49" @@ -2408,9 +2411,9 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. done > ${sample_id}_heavy.txt ``` - Die ersten beiden Prozesse liefen, aber nicht der dritte. + Der Workflow läuft jetzt ohne Fehler durch, aber die `files`-Ausgabe ist leer: `handleFiles` wurde nie ausgeführt. Sein Eingabekanal `channel.fromPath("*.txt")` findet keine Dateien im Startverzeichnis, sodass der Prozess einfach übersprungen wird, ohne einen Fehler zu melden. - **Fehler 10: Ausgabedateiname stimmt nicht überein** + **Fehler 10: Falsche Kanalquelle** ```groovy linenums="88" file_ch = channel.fromPath("*.txt") // FEHLER: Versucht, Eingabe aus dem aktuellen Verzeichnis zu nehmen, statt aus einem Prozess handleFiles(file_ch) @@ -2420,7 +2423,7 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. file_ch = handleFiles(heavy_ch) ``` - Damit sollte der gesamte Workflow ausgeführt werden. + Damit läuft der gesamte Workflow von Anfang bis Ende durch und alle drei Ausgaben sind befüllt. **Vollständig korrigierter Workflow:** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ Jetzt ist es Zeit, den systematischen Debugging-Ansatz in die Praxis umzusetzen. script: """ # Schwere Berechnung simulieren - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/de/docs/side_quests/dev_environment/index.md b/docs/de/docs/side_quests/dev_environment/index.md index e437f98adb..a07aad0a75 100644 --- a/docs/de/docs/side_quests/dev_environment/index.md +++ b/docs/de/docs/side_quests/dev_environment/index.md @@ -74,7 +74,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "Über die Beispieldateien" diff --git a/docs/de/docs/side_quests/essential_scripting_patterns/index.md b/docs/de/docs/side_quests/essential_scripting_patterns/index.md index b9e1c88d24..2f46b90c29 100644 --- a/docs/de/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/de/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, Wir verwenden diesen realistischen Datensatz, um praktische Programmiertechniken zu erkunden, die du in echten Bioinformatik-Workflows antreffen wirst. - - - - #### Bereitschafts-Checkliste Bereit einzutauchen? @@ -112,9 +108,19 @@ Beginne mit einem einfachen Workflow, der nur die CSV-Datei liest (das haben wir ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Den Map-Operator hinzufügen @@ -148,7 +162,7 @@ So sieht diese Map-Operation aus: === "Danach" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ So sieht diese Map-Operation aus: === "Vorher" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ Jetzt schreiben wir **Scripting**-Logik in unsere Closure, um jede Datenzeile zu === "Danach" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ Jetzt schreiben wir **Scripting**-Logik in unsere Closure, um jede Datenzeile zu === "Vorher" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ Nimm folgende Änderung vor: === "Danach" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ Nimm folgende Änderung vor: === "Vorher" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ Fügen wir eine Zeile hinzu, um eine vereinfachte Version unserer Metadaten zu e === "Danach" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ Fügen wir eine Zeile hinzu, um eine vereinfachte Version unserer Metadaten zu e === "Vorher" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Dies zeigt sowohl die vollständigen Metadaten, die durch die `view()`-Operation angezeigt werden, als auch die extrahierte Teilmenge, die wir mit `println` ausgegeben haben. @@ -390,7 +410,7 @@ Geben wir eine Kanalstruktur aus, die aus einem Tupel mit 2 Elementen besteht: d === "Danach" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -409,7 +429,7 @@ Geben wir eine Kanalstruktur aus, die aus einem Tupel mit 2 Elementen besteht: d === "Vorher" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -485,9 +505,9 @@ nextflow run collect.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -501,7 +521,7 @@ Jetzt sehen wir die `collect`-Methode auf einer List in Aktion. Ändere `collect === "Danach" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - fasst mehrere Kanalemissionen zu einer zusammen @@ -519,7 +539,7 @@ Jetzt sehen wir die `collect`-Methode auf einer List in Aktion. Ändere `collect === "Vorher" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - fasst mehrere Kanalemissionen zu einer zusammen @@ -543,9 +563,9 @@ nextflow run collect.nf ??? success "Befehlsausgabe" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -614,9 +634,9 @@ nextflow run collect.nf ??? success "Befehlsausgabe" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -673,7 +693,7 @@ Nimm folgende Änderung an deinem bestehenden `main.nf`-Workflow vor: === "Danach" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // Scripting für die Datentransformation def sample_meta = [ @@ -700,7 +720,7 @@ Nimm folgende Änderung an deinem bestehenden `main.nf`-Workflow vor: === "Vorher" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // Scripting für die Datentransformation def sample_meta = [ @@ -743,13 +763,19 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Dies zeigt die aus den Dateinamen angereicherten Metadaten. @@ -796,8 +822,9 @@ include { FASTP } from './modules/fastp.nf' === "Danach" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -824,13 +851,23 @@ include { FASTP } from './modules/fastp.nf' } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "Vorher" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -853,9 +890,18 @@ include { FASTP } from './modules/fastp.nf' ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -868,28 +914,41 @@ nextflow run main.nf ??? failure "Befehlsausgabe" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` Du siehst, dass der Prozess versucht, `fastp` mit einem `null`-Wert für die zweite Eingabedatei auszuführen, was zum Fehler führt. Das liegt daran, dass unser Datensatz Single-End-Reads enthält, der Prozess aber fest auf Paired-End-Reads (zwei Eingabedateien gleichzeitig) ausgelegt ist. @@ -953,18 +1012,24 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Sieht gut aus! Wenn wir die tatsächlich ausgeführten Befehle prüfen (passe den Task-Hash an): ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Sehen wir, dass Nextflow den richtigen Befehl für Single-End-Reads gewählt hat: @@ -976,7 +1041,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Ein weiteres gängiges Beispiel für dynamische Skript-Logik findet sich im [Nextflow for Science Genomics-Modul](../../nf4_science/genomics/03_joint_calling.md). In diesem Modul kann der aufgerufene GATK-Prozess mehrere Eingabedateien entgegennehmen, aber jede muss mit `-V` vorangestellt werden, um eine korrekte Befehlszeile zu bilden. Der Prozess verwendet Scripting, um eine Collection von Eingabedateien (`all_gvcfs`) in die richtigen Befehlsargumente umzuwandeln: @@ -1023,11 +1088,12 @@ Füge den Prozess in deine `main.nf` ein und ergänze ihn im Workflow: === "Danach" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1054,15 +1120,25 @@ Füge den Prozess in deine `main.nf` ein und ergänze ihn im Workflow: ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Vorher" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1088,17 +1164,44 @@ Füge den Prozess in deine `main.nf` ein und ergänze ihn im Workflow: } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` Führe jetzt den Workflow aus und prüfe die generierten Berichte in `results/reports/`. Sie sollten grundlegende Informationen über jede Probe enthalten. - +```bash +nextflow run main.nf +``` ??? success "Befehlsausgabe" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` Aber was, wenn wir Informationen darüber hinzufügen möchten, wann und wo die Verarbeitung stattgefunden hat? Lass uns den Prozess so ändern, dass er **Shell**-Variablen und etwas Befehlssubstitution verwendet, um den aktuellen Benutzer, Hostnamen und das Datum in den Bericht aufzunehmen: @@ -1131,11 +1234,18 @@ Wenn du das ausführst, wirst du einen Fehler bemerken – Nextflow versucht, `# ??? failure "Befehlsausgabe" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Wir müssen es escapen, damit Bash es stattdessen verarbeiten kann. @@ -1195,7 +1305,7 @@ Um zu zeigen, wie das mit unserem bestehenden Workflow aussieht, nimm die folgen === "Danach" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1222,22 +1332,33 @@ Um zu zeigen, wie das mit unserem bestehenden Workflow aussieht, nimm die folgen } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Vorher" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1264,6 +1385,15 @@ Um zu zeigen, wie das mit unserem bestehenden Workflow aussieht, nimm die folgen ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1289,13 +1419,22 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Die Ausgabe sollte zeigen, dass beide Prozesse erfolgreich abgeschlossen wurden. Der Workflow ist jetzt viel übersichtlicher und einfacher zu warten, da die gesamte komplexe Metadaten-Verarbeitungslogik in der Funktion `separateMetadata` gekapselt ist. @@ -1359,26 +1498,35 @@ nextflow run main.nf -ansi-log false ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` Du kannst den genauen `docker`-Befehl prüfen, der ausgeführt wurde, um die CPU-Zuweisung für eine bestimmte Aufgabe zu sehen: ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` Du solltest etwas wie das Folgende sehen: ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` In diesem Beispiel haben wir eine Aufgabe gewählt, die 2 CPUs angefordert hat (`--cpu-shares 2048`), weil es eine Probe mit hoher Sequenzierungstiefe war. Du solltest je nach Probensequenzierungstiefe unterschiedliche CPU-Zuweisungen sehen. Probiere das auch für die anderen Aufgaben aus. @@ -1432,7 +1580,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` Das zeigt an, dass der Prozess wegen Überschreitung der Speichergrenzen beendet wurde. @@ -1520,7 +1668,7 @@ Füge das neue Modul aus `modules/trimgalore.nf` ein: === "Danach" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1538,7 +1686,7 @@ Füge das neue Modul aus `modules/trimgalore.nf` ein: === "Vorher" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1556,14 +1704,26 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` Hier haben wir kleine, aber wirkungsvolle bedingte Ausdrücke innerhalb des `.branch{}`-Operators verwendet, um Proben basierend auf ihren Metadaten weiterzuleiten. Menschliche Proben mit hoher Abdeckung werden durch `FASTP` geleitet, während alle anderen Proben durch `TRIMGALORE` gehen. @@ -1583,7 +1743,7 @@ Füge Folgendes vor der Branch-Operation hinzu: === "Danach" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1603,7 +1763,7 @@ Füge Folgendes vor der Branch-Operation hinzu: === "Vorher" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1624,21 +1784,31 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -Da wir einen Filter gewählt haben, der einige Proben ausschließt, wurden weniger Aufgaben ausgeführt. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +In diesem Fall erfüllen alle drei Proben den Filter, sodass jede Probe die Pipeline weiter durchläuft. +Ein strengerer Schwellenwert würde Proben mit geringer Sequenzierungstiefe ausschließen und die Anzahl der ausgeführten Aufgaben reduzieren. Der Filterausdruck `meta.id && meta.organism && meta.depth >= 25000000` kombiniert Truthiness mit expliziten Vergleichen: @@ -1708,13 +1878,13 @@ nextflow run main.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` Das stürzt mit einer NullPointerException ab. @@ -1764,7 +1934,27 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` Kein Absturz! Der Workflow behandelt das fehlende Feld jetzt problemlos. Wenn `row.run_id` `null` ist, verhindert der `?.`-Operator den `.toUpperCase()`-Aufruf, und `run_id` wird zu `null`, anstatt eine Exception zu verursachen. @@ -1808,7 +1998,7 @@ Füge auch einen `view()`-Operator im Workflow hinzu, um die Ergebnisse zu sehen === "Danach" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1817,7 +2007,7 @@ Füge auch einen `view()`-Operator im Workflow hinzu, um die Ergebnisse zu sehen === "Vorher" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1870,7 +2060,7 @@ Erstelle eine Validierungsfunktion vor deinem Workflow-Block, rufe sie aus dem W === "Danach" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1888,6 +2078,7 @@ Erstelle eine Validierungsfunktion vor deinem Workflow-Block, rufe sie aus dem W } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1901,6 +2092,7 @@ Erstelle eine Validierungsfunktion vor deinem Workflow-Block, rufe sie aus dem W ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1913,9 +2105,9 @@ nextflow run main.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1932,9 +2124,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1948,7 +2140,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "Befehlsausgabe" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Diesmal läuft es erfolgreich. @@ -1987,14 +2199,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 + + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2025,7 +2247,7 @@ Füge den Event-Handler zu deiner `main.nf`-Datei hinzu, innerhalb deiner Workfl === "Danach" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2041,15 +2263,21 @@ Füge den Event-Handler zu deiner `main.nf`-Datei hinzu, innerhalb deiner Workfl println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "Vorher" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2064,29 +2292,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Machen wir es nützlicher, indem wir bedingte Logik hinzufügen: === "Danach" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2109,12 +2352,15 @@ Machen wir es nützlicher, indem wir bedingte Logik hinzufügen: println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "Vorher" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2130,34 +2376,53 @@ Machen wir es nützlicher, indem wir bedingte Logik hinzufügen: println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` -Jetzt erhalten wir eine noch informativere Zusammenfassung, einschließlich einer Erfolgs-/Fehlermeldung: +Jetzt erhalten wir eine noch informativere Zusammenfassung, einschließlich einer Erfolgs-/Fehlermeldung und des Ausgabeverzeichnisses: - +```bash +nextflow run main.nf +``` ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` Du kannst die Zusammenfassung auch mit Dateioperationen in eine Datei schreiben: diff --git a/docs/de/docs/side_quests/metadata/index.md b/docs/de/docs/side_quests/metadata/index.md index 1d97bb3c8d..8368be3484 100644 --- a/docs/de/docs/side_quests/metadata/index.md +++ b/docs/de/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Wir sehen, dass der Operator für jede Zeile in der CSV-Datei eine Map aus Schlüssel-Wert-Paaren erstellt hat, wobei die Spaltenüberschriften als Schlüssel für die entsprechenden Werte dienen. @@ -265,9 +271,9 @@ Zum Beispiel könnten wir mit `id` auf die Datei-ID oder mit `recording` auf den Und das kannst du in der Ausgabe erwarten: ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Das zeigt, dass wir auf die Werte der `character`-Spalte für jede Zeile zugreifen können. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Wie du siehst, hat `COWPY` jede Datei mit der richtigen Figur verarbeitet. @@ -654,12 +679,25 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Die Ausgabe sind dieselben sieben `cowpy-*.txt`-Dateien wie zuvor, jetzt mit einem einfacheren Aufruf von `COWPY`. @@ -744,7 +782,7 @@ Lass uns die `map`-Operation umstrukturieren, um ein `[meta, file]`-Tupel zu erz === "Vorher" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -770,9 +808,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -781,6 +819,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Jedes Element im Kanal ist jetzt ein Tupel aus zwei Elementen: zuerst die Meta-Map, dann die Datei. @@ -792,7 +836,7 @@ Jedes Element im Kanal ist jetzt ein Tupel aus zwei Elementen: zuerst die Meta-M ] ``` -Wenn wir später eine `language`-Spalte zum Datenblatt hinzufügen, wird sie als `meta.language` verfügbar, ohne dass Änderungen an der Prozess-Eingabedefinition erforderlich sind. +Wenn wir später eine `language`-Spalte zum Datenblatt hinzufügen und sie in der `map`-Operation einbinden (z.B. `language: row.language`), wird sie als `meta.language` verfügbar, ohne dass Änderungen an der Prozess-Eingabedefinition erforderlich sind. #### 1.5.3. Den `COWPY`-Prozess aktualisieren, um die Meta-Map zu verwenden @@ -891,12 +935,25 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Das Ergebnisverzeichnis enthält jetzt die ASCII-Kunst-Dateien. @@ -980,7 +1037,7 @@ process IDENTIFY_LANGUAGE { } ``` -Die Eingabedefinition verwendet dieselbe `tuple val(meta), path(file)`-Struktur, die wir in Abschnitt 1 aufgebaut haben, sodass `ch_datasheet` direkt in diesen Prozess einfließen kann. +Die Eingabedefinition verwendet dieselbe `tuple val(meta), path(file)`-Struktur, die wir in Abschnitt 1 aufgebaut haben, sodass `ch_datasheet` direkt in diesen Prozess einfließen kann, ohne Anpassungen zu benötigen. Die Ausgabe fügt `stdout` als drittes Element hinzu: Das erfasst die Sprachvorhersage, die `langid` auf der Konsole ausgibt. Der `sed`-Befehl entfernt den Wahrscheinlichkeitswert und den abschließenden Zeilenumbruch und lässt nur den zweistelligen Sprachcode übrig. @@ -1044,20 +1101,33 @@ nextflow run main.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` Wir haben jetzt eine Sprachvorhersage für jede Datei im Datensatz. @@ -1206,19 +1276,32 @@ nextflow run main.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` Ja, das stimmt! @@ -1311,7 +1394,7 @@ Wichtige Punkte: -#### 2.3.2. Den Workflow ausführen +#### 2.3.2. Den Workflow ausführen: Führe den Workflow aus, um zu überprüfen, dass es funktioniert: @@ -1322,19 +1405,32 @@ nextflow run main.nf -resume ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` Die Meta-Map enthält jetzt vier Felder: `id`, `character`, `lang` und `lang_group`. @@ -1445,13 +1541,26 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` Das Ergebnisverzeichnis ist jetzt nach Sprachfamilie organisiert, wobei jede Datei nach der erkannten Sprache benannt ist: @@ -1509,18 +1618,19 @@ Wenn Nextflow `#!groovy ${meta.character}` in den Befehl einsetzt, erhält das ` ??? failure "Befehlsausgabe" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1540,7 +1650,7 @@ Wenn Nextflow `#!groovy ${meta.character}` in den Befehl einsetzt, erhält das ` cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1564,28 +1674,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -Der `character`-Schlüssel wird in der Meta-Map nie erstellt. -Wenn der Prozess-Script `#!groovy ${meta.character}` auswertet, gibt der fehlende Schlüssel `null` zurück, und Nextflow setzt buchstäblich den String `null` in den Befehl ein: +Unsere `map`-Operation schreibt explizit `#!groovy character: row.character`, sodass der `character`-Schlüssel in der Meta-Map zwar erstellt wird, aber der Zugriff auf eine Spalte, die in der geparsten Zeile nicht existiert, `null` zurückgibt – der Wert wird also `null`. +Wenn der Prozess-Script `#!groovy ${meta.character}` auswertet, setzt Nextflow buchstäblich den String `null` in den Befehl ein: ??? failure "Befehlsausgabe" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1610,7 +1721,7 @@ Wenn der Prozess-Script `#!groovy ${meta.character}` auswertet, gibt der fehlend TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/de/docs/side_quests/nf_test/index.md b/docs/de/docs/side_quests/nf_test/index.md index b3a43edf69..d38ae95a80 100644 --- a/docs/de/docs/side_quests/nf_test/index.md +++ b/docs/de/docs/side_quests/nf_test/index.md @@ -1,16 +1,3 @@ -I'll analyze the diff and update only the specific sections that changed in the existing German translation. - -The changes are: - -1. Link URL: `../hello_nextflow/README.md` → `../../hello_nextflow/index.md` (Prerequisites section) -2. Link URL: `../envsetup/index.md` → `../../envsetup/index.md` (Open training codespace section) -3. Link URLs: `../hello_nextflow/00_orientation.md` → `../../hello_nextflow/00_orientation.md`, `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md`, `../hello_nextflow/index.md` → `../../hello_nextflow/index.md` (Review materials section) -4. Workflow code block: removed `publishDir` directives, added `main:`, `publish:`, and `output {}` block -5. File assertions: `Holà` → `Hola` (two occurrences) -6. Link URL: `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` (process test section) -7. `!!!warning` → `!!! warning` (formatting fix) -8. Link URL: `../` → `../index.md` (What's next section) - # Testen mit nf-test :material-information-outline:{ .ai-translation-notice-icon } KI-gestützte Übersetzung - [mehr erfahren & Verbesserungen vorschlagen](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) @@ -32,7 +19,7 @@ Testen ermöglicht es dir, systematisch zu überprüfen, ob jeder Teil deiner Pi Es gibt viele verschiedene Arten von Tests, die wir schreiben können: -1. **Tests auf Modulebene**: Für einzelne Prozesse +1. **Tests auf Prozessebene**: Für einzelne Prozesse 2. **Tests auf Workflow-Ebene**: Für einen einzelnen Workflow 3. **Tests auf Pipeline-Ebene**: Für die Pipeline als Ganzes 4. **Performance-Tests**: Für die Geschwindigkeit und Effizienz der Pipeline @@ -40,16 +27,16 @@ Es gibt viele verschiedene Arten von Tests, die wir schreiben können: Das Testen einzelner Prozesse ist analog zu Unit-Tests in anderen Sprachen. Das Testen des Workflows oder der gesamten Pipeline ist analog zu sogenannten Integrationstests in anderen Sprachen, bei denen wir die Interaktionen der Komponenten testen. -[**nf-test**](https://www.nf-test.com/) ist ein Tool, mit dem du Tests auf Modul-, Workflow- und Pipeline-Ebene schreiben kannst. Kurz gesagt: Es ermöglicht dir, systematisch zu überprüfen, ob jeder einzelne Teil der Pipeline wie erwartet funktioniert – _isoliert_. +[**nf-test**](https://www.nf-test.com/) ist ein Tool, mit dem du Tests auf Prozess-, Workflow- und Pipeline-Ebene schreiben kannst. Kurz gesagt: Es ermöglicht dir, systematisch zu überprüfen, ob jeder einzelne Teil der Pipeline wie erwartet funktioniert – _isoliert_. ### Lernziele -In dieser Side Quest lernst du, nf-test zu verwenden, um einen Test auf Workflow-Ebene für die Pipeline sowie Tests auf Modulebene für die drei aufgerufenen Prozesse zu schreiben. +In dieser Side Quest lernst du, nf-test zu verwenden, um einen Test auf Workflow-Ebene für die Pipeline sowie Tests auf Prozessebene für die zwei aufgerufenen Prozesse zu schreiben. Am Ende dieser Side Quest wirst du folgende Techniken effektiv einsetzen können: - nf-test in deinem Projekt initialisieren -- Tests auf Modul- und Workflow-Ebene generieren +- Tests auf Prozess- und Workflow-Ebene generieren - Gängige Arten von Assertions hinzufügen - Verstehen, wann Snapshots vs. direkte Inhalts-Assertions verwendet werden sollten - Tests für ein gesamtes Projekt ausführen @@ -63,6 +50,16 @@ Bevor du diese Side Quest in Angriff nimmst, solltest du: - Das Tutorial [Hello Nextflow](../../hello_nextflow/index.md) oder einen gleichwertigen Einsteigerkurs abgeschlossen haben. - Mit grundlegenden Nextflow-Konzepten und -Mechanismen vertraut sein (Prozesse, Kanäle, Operatoren, Arbeiten mit Dateien, Metadaten). +!!! warning "nf-test Versionsanforderung" + + Tests auf Prozessebene erfordern **nf-test 0.9.3 oder höher**. Ältere Versionen (einschließlich 0.9.2) generieren Test-Harness-Code, der nicht mit dem strikten Syntax-Parser kompatibel ist, den Nextflow ab Version 26.04 standardmäßig verwendet. Das führt zu einem `Script compilation failed`-Fehler anstelle des erwarteten Testergebnisses. + + Prüfe deine Version mit `nf-test version`. Falls du ein Upgrade benötigst: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. Erste Schritte @@ -94,7 +91,8 @@ Du findest eine Haupt-Workflow-Datei und eine CSV-Datei namens `greetings.csv`, ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` Eine detaillierte Beschreibung der Dateien findest du im [Aufwärmen aus Hello Nextflow](../../hello_nextflow/00_orientation.md). @@ -124,21 +122,23 @@ Den vollständigen Workflow-Code siehst du unten. ??? example "Workflow-Code" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * Pipeline-Parameter - */ + * Pipeline-Parameter + */ params.input_file = "greetings.csv" /* - * Verwende echo, um 'Hello World!' auf die Standardausgabe zu schreiben - */ + * Verwende echo, um 'Hello World!' auf die Standardausgabe zu schreiben + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -147,15 +147,15 @@ Den vollständigen Workflow-Code siehst du unten. } /* - * Verwende ein Textersetzungs-Utility, um die Begrüßung in Großbuchstaben umzuwandeln - */ + * Verwende ein Textersetzungs-Utility, um die Begrüßung in Großbuchstaben umzuwandeln + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -196,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` HERZLICHEN GLÜCKWUNSCH! Du hast gerade einen Test durchgeführt! @@ -448,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` Erfolg! Die Pipeline wird erfolgreich ausgeführt und der Test besteht. Führe ihn so oft aus, wie du möchtest – du wirst immer das gleiche Ergebnis erhalten! @@ -473,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -547,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` Erfolg! Die Pipeline wird erfolgreich ausgeführt und der Test besteht. Jetzt haben wir begonnen, die Details der Pipeline zu testen, nicht nur den Gesamtstatus. @@ -632,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` Erfolg! Die Tests bestehen, weil die Pipeline erfolgreich abgeschlossen wurde, die korrekte Anzahl von Prozessen ausgeführt wurde und die Ausgabedateien erstellt wurden. Das zeigt dir auch, wie nützlich es ist, aussagekräftige Namen für deine Tests zu vergeben. @@ -743,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -813,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -821,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` Erfolg! Der Test besteht, weil der `sayHello`-Prozess erfolgreich ausgeführt wurde und die Ausgabe erstellt wurde. @@ -871,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` Erfolg! Der Test besteht, weil der `sayHello`-Prozess erfolgreich ausgeführt wurde und die Ausgabe mit dem Snapshot übereinstimmt. @@ -964,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. Den `convertToUpper`-Prozess testen @@ -1011,10 +1040,10 @@ Das ist ein ähnlicher Test wie beim `sayHello`-Prozess, aber er testet den `con Wir müssen jetzt eine einzelne Eingabedatei für den `convertToUpper`-Prozess bereitstellen, die Text enthält, den wir in Großbuchstaben umwandeln möchten. Es gibt viele Möglichkeiten, dies zu tun: - Wir könnten eine dedizierte Datei zum Testen erstellen -- Wir könnten die vorhandene `data/greetings.csv`-Datei wiederverwenden +- Wir könnten die vorhandene `greetings.csv`-Datei wiederverwenden - Wir könnten sie im Test spontan erstellen -Für jetzt verwenden wir die vorhandene `data/greetings.csv`-Datei mit dem Beispiel, das wir beim Test auf Pipeline-Ebene verwendet haben. Wie zuvor können wir den Test benennen, um besser widerzuspiegeln, was wir testen, aber dieses Mal lassen wir es den Inhalt per Snapshot erfassen, anstatt nach bestimmten Strings zu suchen (wie wir es beim anderen Prozess getan haben). +Für jetzt verwenden wir die vorhandene `greetings.csv`-Datei mit dem Beispiel, das wir beim Test auf Pipeline-Ebene verwendet haben. Wie zuvor können wir den Test benennen, um besser widerzuspiegeln, was wir testen, aber dieses Mal lassen wir es den Inhalt per Snapshot erfassen, anstatt nach bestimmten Strings zu suchen (wie wir es beim anderen Prozess getan haben). === "Danach" @@ -1083,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1091,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` Beachte, dass wir eine Snapshot-Datei für den `convertToUpper`-Prozess unter `tests/main.converttoupper.nf.test.snap` erstellt haben. Wenn wir den Test erneut ausführen, sollten wir sehen, dass nf-test wieder besteht. @@ -1110,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### Fazit @@ -1152,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` Schau dir das an! Wir haben 4 Tests ausgeführt – 1 für jeden Prozess und 2 für die gesamte Pipeline – mit einem einzigen Befehl. Stell dir vor, wie mächtig das bei einer großen Codebasis ist! @@ -1206,7 +1235,7 @@ Schau dir die [nf-test-Dokumentation](https://www.nf-test.com/) für erweiterte - Umfassendere Assertions zu deinen Tests hinzufügen - Tests für Grenzfälle und Fehlerbedingungen schreiben - Continuous Integration einrichten, um Tests automatisch auszuführen -- Mehr über andere Testtypen wie Workflow- und Modultests erfahren +- Mehr über andere Testtypen wie Workflow-, Performance- und Stresstests erfahren - Fortgeschrittenere Inhaltsvalidierungstechniken erkunden **Denk daran:** Tests sind lebendige Dokumentation darüber, wie sich dein Code verhalten soll. Je mehr Tests du schreibst und je spezifischer deine Assertions sind, desto sicherer kannst du dir bei der Zuverlässigkeit deiner Pipeline sein. diff --git a/docs/de/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/de/docs/side_quests/plugin_development/01_plugin_basics.md index 07b079222c..49e32dad52 100644 --- a/docs/de/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/de/docs/side_quests/plugin_development/01_plugin_basics.md @@ -511,7 +511,7 @@ Aktualisiere `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -534,7 +534,7 @@ Das Plugin gibt während der Ausführung mehrere INFO- und WARN-Meldungen aus. Diese sind für ein kleines Beispiel auf einem lokalen Rechner normal: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -600,7 +600,7 @@ Füge einen `co2footprint`-Block zu `nextflow.config` hinzu: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -614,7 +614,7 @@ Füge einen `co2footprint`-Block zu `nextflow.config` hinzu: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -635,11 +635,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: Die Zonenwarnung ist verschwunden. Das Plugin verwendet jetzt die GB-spezifische CO₂-Intensität (163.92 gCO₂eq/kWh) statt des globalen Fallback-Werts (480.0 gCO₂eq/kWh). -!!! note "Hinweis" - - Möglicherweise siehst du auch eine Meldung `WARN: Unrecognized config option 'co2footprint.location'`. - Diese ist kosmetischer Natur und kann bedenkenlos ignoriert werden; das Plugin liest den Wert trotzdem korrekt. - In Teil 6 wirst du einen Konfigurationsbereich für dein eigenes Plugin erstellen. Dieses Plugin funktioniert vollständig über den Observer-Mechanismus: Es hängt sich in Workflow-Lifecycle-Ereignisse ein, um Ressourcenmetriken zu sammeln und seinen Bericht zu generieren, wenn die Pipeline abgeschlossen ist. diff --git a/docs/de/docs/side_quests/plugin_development/02_create_project.md b/docs/de/docs/side_quests/plugin_development/02_create_project.md index 59eaf46f4a..1a60e9f7a4 100644 --- a/docs/de/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/de/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ Du solltest Folgendes sehen: ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ Der wichtigste ist der `nextflowPlugin`-Block: ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ Aktualisiere ihn auf deine installierte Nextflow-Version, um volle Kompatibilit ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ Aktualisiere ihn auf deine installierte Nextflow-Version, um volle Kompatibilit ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **Die Warnungen sind erwartet.** diff --git a/docs/de/docs/side_quests/plugin_development/03_custom_functions.md b/docs/de/docs/side_quests/plugin_development/03_custom_functions.md index ce7fcd8e11..1635b525a9 100644 --- a/docs/de/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/de/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "Ausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "Ausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/de/docs/side_quests/plugin_development/04_build_and_test.md b/docs/de/docs/side_quests/plugin_development/04_build_and_test.md index a94102b015..29eb83f985 100644 --- a/docs/de/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/de/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **Wo sind die Testergebnisse?** Gradle blendet die detaillierte Ausgabe aus, wenn alle Tests bestehen. diff --git a/docs/de/docs/side_quests/plugin_development/05_observers.md b/docs/de/docs/side_quests/plugin_development/05_observers.md index d01142f1d7..56d86dcdfc 100644 --- a/docs/de/docs/side_quests/plugin_development/05_observers.md +++ b/docs/de/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "Ausgabe" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/de/docs/side_quests/plugin_development/06_configuration.md b/docs/de/docs/side_quests/plugin_development/06_configuration.md index 01685aacdc..cc5991ac46 100644 --- a/docs/de/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/de/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ Der Build schlägt fehl: ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` In Groovy (und Java) musst du eine Variable _deklarieren_, bevor du sie verwendest. diff --git a/docs/de/docs/side_quests/plugin_development/index.md b/docs/de/docs/side_quests/plugin_development/index.md index f7c8856d33..9f798744e1 100644 --- a/docs/de/docs/side_quests/plugin_development/index.md +++ b/docs/de/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ Vorkenntnisse in Java oder Groovy sind nicht erforderlich. **Arbeitsverzeichnis:** `side-quests/plugin_development` +#### Trainingsumgebung öffnen + +Falls du das noch nicht getan hast, öffne die Trainingsumgebung wie in der [Umgebung einrichten](../../envsetup/index.md) beschrieben. + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Lernziele Nach Abschluss dieses Trainings kannst du: diff --git a/docs/de/docs/side_quests/splitting_and_grouping/index.md b/docs/de/docs/side_quests/splitting_and_grouping/index.md index 01142ac277..daee062b22 100644 --- a/docs/de/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/de/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ Wende diese Änderungen auf `main.nf` an: === "Danach" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ Als Nächstes betrachten wir die Situation, in der du nach mehreren Feldern zusa ### 3.2. Nach mehreren Feldern zusammenführen -Wir haben 2 Replikate für sampleA, aber nur 1 für sampleB und sampleC. In diesem Fall konnten wir sie effektiv zusammenführen, indem wir das `id`-Feld verwendet haben, aber was würde passieren, wenn sie nicht synchron wären? Wir könnten die normalen und Tumorproben aus verschiedenen Replikaten durcheinanderbringen! +Wir haben 2 Replikate für patientA, aber nur 1 für patientB und patientC. In diesem Fall konnten wir sie effektiv zusammenführen, indem wir das `id`-Feld verwendet haben, aber was würde passieren, wenn sie nicht synchron wären? Wir könnten die normalen und Tumorproben aus verschiedenen Replikaten durcheinanderbringen! Um dies zu vermeiden, können wir nach mehreren Feldern zusammenführen. Es gibt tatsächlich mehrere Möglichkeiten, dies zu erreichen, aber wir konzentrieren uns auf die Erstellung eines neuen Zusammenführungsschlüssels, der sowohl die Proben-`id` als auch die `replicate`-Nummer enthält. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + Da die Closure jeden Pfad nun mit `file()` umschließt, erscheinen die Dateieinträge als aufgelöste absolute Pfade statt als bloße Dateinamen aus dem Samplesheet. + Die Verwendung einer benannten Closure ermöglicht es uns, dieselbe Transformation an mehreren Stellen wiederzuverwenden, was das Fehlerrisiko verringert und den Code lesbarer und wartbarer macht. ### 3.5. Datenduplikate reduzieren @@ -723,21 +725,21 @@ Wir haben viele duplizierte Daten in unserem Workflow. Jedes Element in den zusa ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ In diesem Abschnitt hast du gelernt: ## 5. Proben mit `groupTuple` aggregieren -In den vorherigen Abschnitten haben wir gelernt, wie man Daten aus einer Eingabedatei aufteilt und nach bestimmten Feldern filtert (in unserem Fall normale und Tumorproben). Aber das deckt nur eine Art der Zusammenführung ab. Was, wenn wir Proben nach einem bestimmten Attribut gruppieren möchten? Anstatt übereinstimmende Normal-Tumor-Paare zusammenzuführen, möchten wir vielleicht alle Proben von "sampleA" zusammen verarbeiten, unabhängig von ihrem Typ. Dieses Muster ist in Bioinformatik-Workflows üblich, wo du verwandte Proben aus Effizienzgründen getrennt verarbeiten möchtest, bevor du die Ergebnisse am Ende vergleichst oder kombinierst. +In den vorherigen Abschnitten haben wir gelernt, wie man Daten aus einer Eingabedatei aufteilt und nach bestimmten Feldern filtert (in unserem Fall normale und Tumorproben). Aber das deckt nur eine Art der Zusammenführung ab. Was, wenn wir Proben nach einem bestimmten Attribut gruppieren möchten? Anstatt übereinstimmende Normal-Tumor-Paare zusammenzuführen, möchten wir vielleicht alle Proben von "patientA" zusammen verarbeiten, unabhängig von ihrem Typ. Dieses Muster ist in Bioinformatik-Workflows üblich, wo du verwandte Proben aus Effizienzgründen getrennt verarbeiten möchtest, bevor du die Ergebnisse am Ende vergleichst oder kombinierst. Nextflow enthält eingebaute Methoden dafür, die wichtigste, die wir uns ansehen werden, ist `groupTuple`. @@ -1008,7 +1014,7 @@ Der erste Schritt ähnelt dem, was wir im vorherigen Abschnitt getan haben. Wir ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Die Beherrschung dieser Kanaloperationen ermöglicht es dir, flexible, skalierba 2. **Daten in separate Kanäle aufteilen:** Wir haben `filter` verwendet, um Daten basierend auf dem `type`-Feld in unabhängige Streams aufzuteilen ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Übereinstimmende Proben zusammenführen:** Wir haben `join` verwendet, um verwandte Proben basierend auf den Feldern `id` und `repeat` wieder zusammenzuführen @@ -1199,31 +1205,31 @@ Die Beherrschung dieser Kanaloperationen ermöglicht es dir, flexible, skalierba - Zwei Kanäle nach Schlüssel (erstes Element des Tupels) zusammenführen ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Zusammenführungsschlüssel extrahieren und nach diesem Wert zusammenführen ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - Nach mehreren Feldern mit subMap zusammenführen + - Nach mehreren Feldern mit `subMap` zusammenführen ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Über Intervalle verteilen:** Wir haben `combine` verwendet, um kartesische Produkte von Proben mit genomischen Intervallen für die Parallelverarbeitung zu erstellen. ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Nach Gruppierungsschlüsseln aggregieren:** Wir haben `groupTuple` verwendet, um nach dem ersten Element in jedem Tupel zu gruppieren und dabei Proben mit denselben Feldern `id` und `interval` zu sammeln und technische Replikate zusammenzuführen. diff --git a/docs/de/docs/side_quests/workflows_of_workflows/index.md b/docs/de/docs/side_quests/workflows_of_workflows/index.md index 90ea7be5e0..6c623e222f 100644 --- a/docs/de/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/de/docs/side_quests/workflows_of_workflows/index.md @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` Damit er mit anderen Workflows kombinierbar wird, müssen einige Dinge geändert werden. ### 1.2. Den Workflow kombinierbar machen -Um einen Workflow kombinierbar zu machen, müssen vier Dinge geändert werden: -Der Workflow bekommt einen Namen, Eingaben werden in einen `take:`-Block verschoben, Ausgaben in einen `emit:`-Block, -und die eigenständigen `publish:`/`output {}`-Blöcke werden entfernt (sie gehören in den Entry Workflow). +Um einen Workflow kombinierbar zu machen, müssen drei Dinge geändert werden: +Der Workflow bekommt einen Namen, Eingaben werden in einen `take:`-Block verschoben und Ausgaben in einen `emit:`-Block +(die eigenständigen `publish:`/`output {}`-Blöcke werden ersetzt – sie gehören in den Entry Workflow). Lass uns diese Änderungen Schritt für Schritt durchgehen. @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "Verzeichnisinhalt" @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` Um ihn mit `GREETING_WORKFLOW` kombinierbar zu machen, gelten die gleichen drei Änderungen aus Abschnitt 1.2. @@ -477,7 +514,7 @@ include { REVERSE_TEXT } from '../modules/reverse_text' workflow TRANSFORM_WORKFLOW { take: - input_ch // Eingabekanal mit Nachrichten + input_ch // Eingabekanal mit Begrüßungen main: // Transformationen der Reihe nach anwenden @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "Verzeichnisinhalt" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "Dateiinhalt" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` Die Pipeline funktioniert von Anfang bis Ende: Die Begrüßung wurde in Großbuchstaben umgewandelt und umgekehrt. diff --git a/docs/de/docs/side_quests/working_with_files/index.md b/docs/de/docs/side_quests/working_with_files/index.md index 475d20634f..a0b9b64508 100644 --- a/docs/de/docs/side_quests/working_with_files/index.md +++ b/docs/de/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Wie du siehst, hat Nextflow den String-Pfad genau so ausgegeben, wie wir ihn geschrieben haben. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Diesmal siehst du den vollständigen absoluten Pfad anstelle des relativen Pfads, den wir als Eingabe angegeben haben. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Du siehst die verschiedenen Dateiattribute, die oben auf der Konsole ausgegeben werden. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Das zeigt, dass wir die Datei innerhalb eines Prozesses korrekt verarbeiten können. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Das ist der wichtige Teil: @@ -543,12 +568,13 @@ nextflow run main.nf ??? failure "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -576,9 +602,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Das zeigt viele Details über den Fehler, da der Prozess so eingestellt ist, dass er Debug-Informationen ausgibt, wie oben erwähnt. @@ -692,9 +718,9 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -702,9 +728,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Es funktioniert! Du siehst, dass sich sehr wenig geändert hat. @@ -813,16 +845,11 @@ Eine naive Methode wäre, die `file()`-Methode mit [`channel.of()`](https://www. ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` Das funktioniert, ist aber umständlich. -!!! tip "Tipp: Wann `file()` vs. `channel.fromPath()` verwenden" - - - Verwende `file()`, wenn du ein einzelnes Path-Objekt für die direkte Manipulation benötigst (prüfen, ob eine Datei existiert, ihre Attribute lesen oder an einen einzelnen Prozessaufruf übergeben) - - Verwende `channel.fromPath()`, wenn du einen Kanal benötigst, der mehrere Dateien aufnehmen kann, insbesondere mit Glob-Mustern, oder wenn Dateien durch mehrere Prozesse fließen sollen - Hier kommt [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath) ins Spiel: eine praktische Kanal-Factory, die alle Funktionen bündelt, die wir benötigen, um einen Kanal aus einem oder mehreren statischen Datei-Strings sowie Glob-Mustern zu erstellen. ### 3.1. Die Kanal-Factory hinzufügen @@ -877,11 +904,17 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Wie du siehst, wird der Dateipfad als `Path`-Objekt im Kanal geladen. @@ -889,6 +922,11 @@ Das ist ähnlich wie bei `file()`, aber jetzt haben wir einen Kanal, in den wir `channel.fromPath()` ist eine praktische Möglichkeit, einen neuen Kanal zu erstellen, der mit einer Liste von Dateien befüllt ist. +!!! tip "Tipp: Wann `file()` vs. `channel.fromPath()` verwenden" + + - Verwende `file()`, wenn du ein einzelnes Path-Objekt für die direkte Manipulation benötigst (prüfen, ob eine Datei existiert, ihre Attribute lesen oder an einen einzelnen Prozessaufruf übergeben) + - Verwende `channel.fromPath()`, wenn du einen Kanal benötigst, der mehrere Dateien aufnehmen kann, insbesondere mit Glob-Mustern, oder wenn Dateien durch mehrere Prozesse fließen sollen + ### 3.2. Attribute von Dateien im Kanal anzeigen Bei unserem ersten Einsatz der Kanal-Factory haben wir den Code vereinfacht und nur den Dateinamen ausgegeben. @@ -934,12 +972,12 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -947,6 +985,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Und da haben wir es – dieselben Ergebnisse wie zuvor, aber jetzt haben wir die Datei in einem Kanal, sodass wir weitere hinzufügen können. @@ -1003,12 +1047,12 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1024,6 +1068,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Wie du siehst, haben wir jetzt zwei Path-Objekte in unserem Kanal, was zeigt, dass Nextflow die Dateinamen-Expansion korrekt durchgeführt und beide Dateien wie erwartet geladen und verarbeitet hat. @@ -1108,19 +1158,25 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Jedes Element im Kanal ist jetzt ein Tupel, das den `simpleName` und das ursprüngliche Dateiobjekt enthält. @@ -1164,19 +1220,25 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Jetzt enthält das Tupel für jedes Element in unserem Kanal die Liste der Metadaten (_z. B._ `[patientA, rep1, normal, R1, 001]`) und das ursprüngliche Dateiobjekt. @@ -1265,19 +1327,25 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Jetzt sind die Metadaten übersichtlich beschriftet (_z. B._ `[id:patientA, replicate:1, type:normal, readNum:2]`), sodass es viel einfacher ist zu erkennen, was was ist. @@ -1337,10 +1405,10 @@ Aktualisieren wir den Workflow `main.nf` entsprechend: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Die Mapping-Operation vorerst auskommentieren, wir kommen später darauf zurück! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1355,13 +1423,13 @@ Aktualisieren wir den Workflow `main.nf` entsprechend: === "Vorher" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // Dateien mit channel.fromFilePairs laden + // Dateien mit channel.fromPath laden ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1383,12 +1451,11 @@ nextflow run main.nf ??? failure "Befehlsausgabe" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1398,9 +1465,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Oh nein, diesmal ist die Ausführung fehlgeschlagen! @@ -1451,11 +1518,17 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Diesmal ist der Workflow erfolgreich! @@ -1476,10 +1549,10 @@ Kommentiere die map-Operation im Workflow aus und nimm folgende Änderungen vor: // Dateien mit channel.fromFilePairs laden ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1496,10 +1569,10 @@ Kommentiere die map-Operation im Workflow aus und nimm folgende Änderungen vor: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Die Mapping-Operation vorerst auskommentieren, wir kommen später darauf zurück! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1526,11 +1599,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Und da ist es: Wir haben die Metadaten-map (`[id:patientA, replicate:1, type:normal]`) an der ersten Position des Ausgabe-Tupels, gefolgt vom Tupel der gepaarten Dateien, wie beabsichtigt. @@ -1642,10 +1721,10 @@ Ersetze im Haupt-Workflow den `.view()`-Operator durch `#!groovy .set { ch_sampl // Dateien mit channel.fromFilePairs laden ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1664,10 +1743,10 @@ Ersetze im Haupt-Workflow den `.view()`-Operator durch `#!groovy .set { ch_sampl // Dateien mit channel.fromFilePairs laden ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1686,11 +1765,17 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Das bestätigt, dass wir den Kanal jetzt beim Namen ansprechen können. @@ -1714,10 +1799,10 @@ Nimm folgende Codeänderungen im Haupt-Workflow vor: // Dateien mit channel.fromFilePairs laden ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1747,10 +1832,10 @@ Nimm folgende Codeänderungen im Haupt-Workflow vor: // Dateien mit channel.fromFilePairs laden ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1784,12 +1869,19 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` Die Ausgaben werden in ein `results`-Verzeichnis veröffentlicht, also schau dort nach. @@ -1849,12 +1941,26 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` Das `results`-Verzeichnis sollte jetzt Ergebnisse für alle verfügbaren Daten enthalten. @@ -1885,7 +1991,7 @@ Nimm folgende Änderung am `output {}`-Block vor: === "Danach" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1893,7 +1999,7 @@ Nimm folgende Änderung am `output {}`-Block vor: === "Vorher" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1911,12 +2017,26 @@ nextflow run main.nf ??? success "Befehlsausgabe" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` Überprüfe jetzt das `results`-Verzeichnis: @@ -2069,7 +2189,7 @@ Die Anwendung dieser Techniken in deiner eigenen Arbeit ermöglicht es dir, effi 5. **Vereinfachung mit channel.fromFilePairs:** Wir haben `channel.fromFilePairs()` verwendet, um verwandte Dateien automatisch zu paaren und Metadaten aus gepaarten Datei-IDs zu extrahieren. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Dateioperationen in Prozessen verwenden:** Wir haben Dateioperationen mit korrekter Eingabeverarbeitung in Nextflow-Prozesse integriert und den `output {}`-Block verwendet, um Ausgaben basierend auf Metadaten zu organisieren. @@ -2079,10 +2199,10 @@ Die Anwendung dieser Techniken in deiner eigenen Arbeit ermöglicht es dir, effi ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], diff --git a/docs/es/docs/hello_nextflow/01_hello_world.md b/docs/es/docs/hello_nextflow/01_hello_world.md index 0b20e03931..41541d6436 100644 --- a/docs/es/docs/hello_nextflow/01_hello_world.md +++ b/docs/es/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "Salida del comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -La salida de la terminal debería verse familiar. Externamente, nada ha cambiado. +La salida de la terminal ahora termina con un resumen `Outputs:` que lista las salidas publicadas y el directorio en el que fueron escritas. -Sin embargo, revise su explorador de archivos: esta vez, Nextflow ha creado un nuevo directorio llamado `results/`. +Revise su explorador de archivos: esta vez, Nextflow también ha creado un nuevo directorio llamado `results/`. ??? abstract "Contenido del directorio" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Esta vez el resultado se escribe bajo el subdirectorio especificado. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Esta vez, si observa los resultados, el archivo es una copia adecuada en lugar de solo un enlace simbólico. @@ -767,19 +785,19 @@ En el bloque del proceso, haga el siguiente cambio de código: === "Después" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "Antes" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` El símbolo `$` y las llaves (`{ }`) le dicen a Nextflow que este es un nombre de variable que necesita ser reemplazado con el valor de entrada real (=interpolado). @@ -811,15 +829,15 @@ En el bloque del workflow, haga el siguiente cambio de código: === "Después" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // emite un saludo - sayHello(params.input) + // emite un saludo + sayHello(params.input) ``` === "Antes" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // emite un saludo - sayHello() + // emite un saludo + sayHello() ``` Esto le dice a Nextflow que ejecute el proceso `sayHello` con el valor proporcionado a través del parámetro `--input`. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Si hizo todas estas ediciones correctamente, debería obtener otra ejecución exitosa. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "Si no funcionó" @@ -936,7 +966,8 @@ nextflow run hello-world.nf Esto se mencionó al inicio del curso, pero tal vez se lo perdió. Consulte el material de ayuda sobre [versiones de Nextflow](../info/nxf_versions.md). - En resumen, si está usando Nextflow `25.10` entonces necesita habilitar el analizador de lenguaje v2: + El analizador v2 es el predeterminado a partir de Nextflow 26.04, por lo que solo verá este error en versiones anteriores. + En una versión anterior a 26.04 necesita habilitar el analizador de lenguaje v2: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Una vez más, debería encontrar la salida actualizada correspondiente en su directorio de resultados. @@ -1020,17 +1057,23 @@ Hay dos ventajas clave al hacer esto: Para usarlo, simplemente agregue `-resume` a su comando y ejecútelo: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "Salida del comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` La salida de la consola debería verse familiar, pero hay una cosa que es un poco diferente en comparación con antes. diff --git a/docs/es/docs/hello_nextflow/02_hello_channels.md b/docs/es/docs/hello_nextflow/02_hello_channels.md index b1de288fba..6b89b71caa 100644 --- a/docs/es/docs/hello_nextflow/02_hello_channels.md +++ b/docs/es/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` Como anteriormente, encontrará el archivo de salida llamado `output.txt` en el directorio `results/hello_channels` (como se especifica en el bloque `output` del script de workflow, mostrado arriba). @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Si hizo ambas ediciones correctamente, debería obtener una ejecución exitosa. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "Salida del comando" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Como puede ver, esto muestra el contenido del channel en la consola. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "Salida del comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Ciertamente parece haber funcionado bien. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Esta vez vemos las tres ejecuciones de proceso y sus subdirectorios de trabajo asociados listados en la salida. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Volviendo a la vista resumida, la salida se resume en una línea nuevamente. @@ -605,8 +652,6 @@ Eche un vistazo al directorio `results` para ver si todos los saludos de salida └── output.txt ``` -¡Sí! Y cada uno tiene el contenido esperado. - ??? abstract "Contenido del archivo" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "Salida del comando" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -941,16 +986,25 @@ nextflow run hello-channels.nf ??? success "Salida del comando" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Esta vez funciona Y nos da la información adicional sobre cómo se ve el contenido del channel antes y después de ejecutar el operador `flatten()`. @@ -1024,11 +1078,13 @@ Haga la siguiente edición a la declaración del parámetro: === "Antes" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Parámetros del pipeline */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` Esto asume que el archivo está ubicado junto con el código del workflow. @@ -1095,9 +1151,9 @@ nextflow run hello-channels.nf ??? failure "Salida del comando" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1198,12 +1254,12 @@ nextflow run hello-channels.nf ??? failure "Salida del comando" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1318,12 +1374,12 @@ nextflow run hello-channels.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1331,6 +1387,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` Esta vez debería ejecutarse sin error. diff --git a/docs/es/docs/hello_nextflow/03_hello_workflow.md b/docs/es/docs/hello_nextflow/03_hello_workflow.md index 01b45aab99..8c01535635 100644 --- a/docs/es/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/es/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` Como anteriormente, encontrará los archivos de salida en la ubicación especificada en el bloque `output`. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` Ahora hay una línea extra en la salida de la consola que corresponde al nuevo proceso que acabamos de agregar. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "Salida del comando" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + La salida de la terminal ahora también termina con un bloque de resumen `Outputs:`. Lo hemos omitido aquí para centrarnos en las líneas de estado de los procesos. + Se ejecuta exitosamente, incluyendo el tercer paso. Sin embargo, mire el número de llamadas para `collectGreetings()` en la última línea. @@ -627,8 +651,8 @@ Ahora eche un vistazo al contenido del archivo de salida final. ??? abstract "Contenido del archivo" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` Oh no. El paso de recopilación se ejecutó individualmente en cada saludo, lo cual NO es lo que queríamos. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ Finalmente, puede echar un vistazo al contenido del archivo de salida para satis ??? abstract "Contenido del archivo" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` Se ejecuta exitosamente y produce la salida deseada: ??? abstract "Contenido del archivo" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` Si mira en el directorio `results/hello_workflow/`, encontrará el nuevo archivo de reporte, `trio-report.txt`. @@ -1273,5 +1326,5 @@ Cuando proporciona múltiples entradas a un proceso, ¿qué debe ser verdad? - [x] El orden de las entradas debe coincidir con el orden definido en el bloque input - [ ] Solo se pueden proporcionar dos entradas a la vez -Aprenda más: [3. Pasar parámetros adicionales a un proceso](#3-pass-more-than-one-input-to-a-process) +Aprenda más: [3. Pasar parámetros adicionales a un proceso](#3-pass-additional-parameters-to-a-process) diff --git a/docs/es/docs/hello_nextflow/04_hello_modules.md b/docs/es/docs/hello_nextflow/04_hello_modules.md index c7305c0350..13ed0c463d 100644 --- a/docs/es/docs/hello_nextflow/04_hello_modules.md +++ b/docs/es/docs/hello_nextflow/04_hello_modules.md @@ -3,7 +3,7 @@ :material-information-outline:{ .ai-translation-notice-icon } Traducción asistida por IA - [más información y sugerencias](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md)
- +
/// caption @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` Como anteriormente, encontrará los archivos de salida en el directorio especificado en el bloque `output` (aquí, `results/hello_modules/`). @@ -172,7 +187,7 @@ Insertemos eso arriba del bloque `params` y completémoslo apropiadamente. * Parámetros del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ Insertemos eso arriba del bloque `params` y completémoslo apropiadamente. * Parámetros del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ Inserte la declaración de importación arriba del bloque `params` y complétela * Parámetros del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ Inserte la declaración de importación arriba del bloque `params` y complétela * Parámetros del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ Inserte la declaración de importación arriba del bloque `params` y complétela * Parámetros del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ Inserte la declaración de importación arriba del bloque `params` y complétela * Parámetros del pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/es/docs/hello_nextflow/05_hello_containers.md b/docs/es/docs/hello_nextflow/05_hello_containers.md index f1cbab72bb..b9e38af6d1 100644 --- a/docs/es/docs/hello_nextflow/05_hello_containers.md +++ b/docs/es/docs/hello_nextflow/05_hello_containers.md @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` Como anteriormente, encontrará los archivos de salida en el directorio especificado en el bloque `output` (`results/hello_containers/`). @@ -259,22 +273,22 @@ Ahora que está dentro del contenedor, puede ejecutar el comando `cowpy` directa Por ejemplo, la documentación de la herramienta dice que podemos cambiar el personaje ('cowacter') con `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Salida del comando" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "Salida del comando (editada para claridad)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` ¡Esta vez sí funciona! diff --git a/docs/es/docs/hello_nextflow/06_hello_config.md b/docs/es/docs/hello_nextflow/06_hello_config.md index fcd4409620..b606331dd5 100644 --- a/docs/es/docs/hello_nextflow/06_hello_config.md +++ b/docs/es/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Como anteriormente, encontrará los archivos de salida en el directorio especificado en el bloque `output` (`results/hello_config/`). @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Esto todavía produce la misma salida que anteriormente. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` Esto creará un nuevo conjunto de directorios bajo `tux-run/` incluyendo `tux-run/work/` y `tux-run/results/`. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` El archivo de salida final debería contener el personaje stegosaurus diciendo los saludos. @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Esto publica las salidas en `custom-outdir-cli/` en lugar de `results/`: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` Esto publica las salidas en `custom-outdir-config-2/rep2/`, con la ruta base especificada _y_ el subdirectorio del nombre de batch _y_ resultados agrupados por proceso: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Esto publica las salidas en `config-output-mode/`, y todavía son todas copias apropiadas, no enlaces simbólicos. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "Salida del comando" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` Esto debería funcionar sin problemas y producir las mismas salidas que anteriormente bajo `custom-outdir-config/conda`. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Como puede ver, esto nos permite alternar entre configuraciones muy convenientemente en tiempo de ejecución. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` Esto usará Docker donde sea posible y producirá salidas bajo `custom-outdir-config/test`, y esta vez el personaje es el dúo cómico `dragonandcow`. diff --git a/docs/es/docs/hello_nf-core/00_orientation.md b/docs/es/docs/hello_nf-core/00_orientation.md index 30e873208b..02774fc268 100644 --- a/docs/es/docs/hello_nf-core/00_orientation.md +++ b/docs/es/docs/hello_nf-core/00_orientation.md @@ -22,25 +22,20 @@ Si está trabajando en este curso por su cuenta, por favor familiarícese con lo ### Requisitos de versión -Este entrenamiento está diseñado para **Nextflow 25.10.2** o posterior **con el analizador de sintaxis v2 DESHABILITADO**. +Este entrenamiento funciona con **Nextflow 25.10.2** o posterior **con el analizador de sintaxis v2**, que es el predeterminado a partir de Nextflow 26.04. +En nuestro entorno de entrenamiento no necesita hacer nada: ejecuta Nextflow 26.04.4 con el analizador v2. Si está usando un entorno local o personalizado, consulte las [notas de versión](../info/nxf_versions.md). -#### Si está usando nuestro entorno de entrenamiento: - -DEBE ejecutar el siguiente comando antes de continuar: - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### Si está usando un entorno local o personalizado: - -Por favor asegúrese de estar usando la configuración correcta como se documenta [aquí](../info/nxf_versions.md). - -El entrenamiento además requiere **nf-core tools 3.5.2**. +El entrenamiento además requiere **nf-core tools 4.0.2**. Si usa una versión diferente de las herramientas nf-core, puede tener dificultades para seguir el curso. Puede verificar qué versión está instalada en su entorno usando el comando `nf-core --version`. +!!! warning "Compatibilidad con el analizador v2" + + Muchos pipelines de nf-core aún no son compatibles con el analizador de sintaxis v2. + Si ejecuta un pipeline de nf-core distinto de los usados en este curso y encuentra errores, puede que necesite cambiar al analizador v1 configurando `export NXF_SYNTAX_PARSER=v1`. + Consulte las [notas de versión](../info/nxf_versions.md) para más detalles. + ## Prepararse para trabajar Una vez que su codespace esté funcionando, hay dos cosas que necesita hacer antes de sumergirse en la capacitación: establecer su directorio de trabajo para este curso específico y echar un vistazo a los materiales proporcionados. @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ Usamos secciones colapsables como esta para incluir la salida esperada de comand - **El archivo `greetings.csv`** es un CSV que contiene algunos datos columnares mínimos que usamos con fines de prueba. +- **El archivo `custom.config`** es un ejemplo de archivo de configuración de Nextflow usado en la Parte 1 para demostrar la sobreescritura de recursos de procesos y `ext.args`. + +- **El archivo `malformed_samplesheet.csv`** es una hoja de muestras intencionalmente incorrecta usada en la Parte 1 para demostrar la validación de entradas. + +- **El archivo `my_params.yml`** es un ejemplo de archivo de parámetros usado en la Parte 1 para demostrar cómo pasar parámetros booleanos a un pipeline. + - **El directorio `original-hello`** contiene una copia del código fuente producido al trabajar a través de la serie completa de capacitación Hello Nextflow (con Docker habilitado). - **El directorio `solutions`** contiene los scripts de workflow completados que resultan de cada paso del curso. @@ -112,7 +116,7 @@ Usamos secciones colapsables como esta para incluir la salida esperada de comand - [ ] Entiendo el objetivo de este curso y sus requisitos previos - [ ] Mi entorno está funcionando -- [ ] Me he asegurado de que el analizador de sintaxis esté establecido en **v1** +- [ ] Estoy usando nf-core tools 4.0.2 (verifique con `nf-core --version`) - [ ] He establecido mi directorio de trabajo apropiadamente Si puede marcar todas las casillas, está listo para comenzar. diff --git a/docs/es/docs/hello_nf-core/01_run_demo.md b/docs/es/docs/hello_nf-core/01_run_demo.md index fc8c009321..d37d1f38a6 100644 --- a/docs/es/docs/hello_nf-core/01_run_demo.md +++ b/docs/es/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ La pestaña `Introduction` proporciona una descripción general del pipeline, in ![mapa de metro del pipeline](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. Ejemplo de línea de comando @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow hace un `pull` del código del pipeline, lo que significa que descarga el repositorio completo en su unidad local. @@ -106,40 +107,73 @@ nextflow list Puede intentar obtener algunos otros pipelines para ver cómo aparecen listados cuando tiene más de uno. -#### 1.2.3. Encontrar sus pipelines en `$NXF_HOME/assets/` +#### 1.2.3. Encontrar dónde se descargó el pipeline Notará que los archivos no están en su directorio de trabajo actual. -Por defecto, Nextflow los guarda en `$NXF_HOME/assets`. +Por defecto, Nextflow guarda los pipelines obtenidos en `$NXF_HOME/assets`. + +Para encontrar dónde vive un pipeline específico, consulte a Nextflow directamente: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "Salida del comando" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "Nota" +!!! info "Info" La ruta completa puede diferir en su sistema si no está utilizando nuestro entorno de capacitación. Nextflow mantiene el código fuente descargado intencionalmente 'fuera del camino' bajo el principio de que estos pipelines deben usarse más como bibliotecas que como código con el que interactuaría directamente. +Internamente, Nextflow almacena cada pipeline obtenido como un repositorio git bajo `$NXF_HOME/assets/.repos/`, y extrae el código de cada revisión en un subdirectorio `clones//`. +Como `.repos` es un directorio oculto, un simple `tree -L 2 $NXF_HOME/assets/` aparecerá vacío. + #### 1.2.4. Crear un enlace simbólico para acceder fácilmente al código fuente No vamos a revisar el código en detalle, pero echemos un vistazo rápido para tener una idea de cómo se ve la organización general. -Para facilitar la exploración del código fuente del pipeline, cree un enlace simbólico al directorio de assets: +Para facilitar la exploración del código fuente del pipeline, cree un enlace simbólico que apunte a la copia extraída del pipeline: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -Esto crea un acceso directo para que pueda explorar el código con `tree -L 2 pipelines` o abrir archivos directamente. +Esto crea un acceso directo para que pueda explorar el código con `tree -L 2 pipelines/nf-core/demo` o abrir archivos directamente. #### 1.2.5. Descripción general de la organización del código @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` Como puede ver, hay mucho sucediendo allí, aunque la mayor parte no necesita preocuparle. @@ -211,7 +247,7 @@ Convenientemente, cada pipeline de nf-core viene con un perfil de prueba. Este es un conjunto mínimo de configuraciones para que el pipeline se ejecute usando un conjunto de datos de prueba pequeño alojado en el repositorio [nf-core/test-datasets](https://github.com/nf-core/test-datasets). Es una excelente manera de probar rápidamente un pipeline a pequeña escala. -!!! note "Nota" +!!! tip "Consejo" El sistema de perfiles de configuración de Nextflow le permite cambiar fácilmente entre diferentes motores de contenedores o entornos de ejecución. Para más detalles, consulte [Hello Nextflow Parte 6: Configuración](../hello_nextflow/06_hello_config.md). @@ -220,10 +256,10 @@ Es una excelente manera de probar rápidamente un pipeline a pequeña escala. Es una buena práctica verificar qué especifica el perfil de prueba de un pipeline antes de ejecutarlo. El perfil `test` para `nf-core/demo` se encuentra en el archivo de configuración `conf/test.config`. -Puede encontrarlo localmente dentro del código fuente del pipeline que descargó `nextflow pull`: +Puede encontrarlo localmente dentro del código fuente del pipeline que descargó `nextflow pull`, a través del enlace simbólico `pipelines` creado en la sección 1.2.4: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` A continuación se muestra el contenido de ese archivo: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Datos de entrada - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` Esto se llama una hoja de muestras, y es la forma más común de entrada a los pipelines de nf-core. +No se preocupe si no está familiarizado con los formatos y tipos de datos, no es importante para lo que sigue. -!!! note "Nota" - - No se preocupe si no está familiarizado con los formatos y tipos de datos, no es importante para lo que sigue. - -Entonces esto confirma que tenemos todo lo que necesitamos para probar el pipeline. +Ahora tenemos todo lo que necesitamos para probar el pipeline. ### 2.2. Ejecutar el pipeline -Decidamos usar Docker para el sistema de contenedores y `demo-results` como el directorio de salida, y estamos listos para ejecutar el comando de prueba: +Como se indicó anteriormente, podemos usar el comando de prueba de ejemplo casi tal como está; solo necesitamos especificar qué sistema de empaquetado de software usar y cómo nombrar el directorio de salida. +Aquí usaremos Docker para el sistema de contenedores y `demo-results`, respectivamente. + +Con eso, podemos ejecutar el comando de prueba: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ Si su salida coincide con esa, ¡felicitaciones! Acaba de ejecutar su primer pip Notará que hay mucha más salida en la consola que cuando ejecuta un pipeline básico de Nextflow. Hay un encabezado que incluye un resumen de la versión del pipeline, entradas y salidas, y algunos elementos de configuración. -!!! note "Nota" +!!! info "Info" Su salida mostrará diferentes marcas de tiempo, nombres de ejecución y rutas de archivo, pero la estructura general y la ejecución del proceso deben ser similares. Observe la línea cerca de la parte superior de la salida: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` Esto le indica qué revisión del pipeline se utilizó. @@ -379,7 +417,7 @@ Como no especificamos una versión, Nextflow utilizó el último commit en `mast Para ejecuciones reproducibles, debe fijar una versión específica usando el indicador `-r`: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` Esto garantiza que se use el mismo código del pipeline cada vez, independientemente de nuevos commits o versiones. @@ -388,14 +426,15 @@ Para esta capacitación omitimos `-r` por simplicidad, pero en producción siemp Pasando a la salida de ejecución, echemos un vistazo a las líneas que nos dicen qué procesos se ejecutaron: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Esto nos dice que se ejecutaron tres procesos, correspondientes a las tres herramientas mostradas en la página de documentación del pipeline en el sitio web de nf-core: FASTQC, SEQTK_TRIM y MULTIQC. +Esto nos dice que se ejecutaron cuatro procesos, correspondientes a las cuatro herramientas mostradas en la página de documentación del pipeline en el sitio web de nf-core: `FASTQC`, `SEQTK_TRIM`, `MULTIQC` y `COWPY`. Los nombres completos de los procesos como se muestran aquí, como `NFCORE_DEMO:DEMO:MULTIQC`, son más largos que lo que puede haber visto en el material introductorio de Hello Nextflow. Estos incluyen los nombres de sus workflows padre y reflejan la modularidad del código del pipeline. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` Eso puede parecer mucho. -Para obtener más información sobre las salidas del pipeline `nf-core/demo`, consulte su [página de documentación](https://nf-co.re/demo/1.1.0/docs/output/). +Para obtener más información sobre las salidas del pipeline `nf-core/demo`, consulte su [página de documentación](https://nf-co.re/demo/1.2.0/docs/output/). En esta etapa, lo importante a observar es que los resultados están organizados por módulo, y además hay un directorio llamado `pipeline_info` que contiene varios informes con marcas de tiempo sobre la ejecución del pipeline. @@ -443,7 +485,7 @@ Por ejemplo, el archivo `execution_timeline_*` le muestra qué procesos se ejecu ![informe de línea de tiempo de ejecución](./img/execution_timeline.png) -!!! note "Nota" +!!! info "Info" Aquí las tareas no se ejecutaron en paralelo porque estamos ejecutando en una máquina minimalista en Github Codespaces. Para ver que se ejecuten en paralelo, intente aumentar la asignación de CPU de su codespace y los límites de recursos en la configuración de prueba. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,24 +596,98 @@ En pipelines de Nextflow simples, `--help` solo funciona si el desarrollador lo Como se explica en [Hello Config](../hello_nextflow/06_hello_config.md), puede establecer valores de parámetros en la línea de comando con `--nombre_param` o recopilar un conjunto de parámetros en un archivo YAML y pasarlo con `-params-file`. Ambos enfoques funcionan de la misma manera con los pipelines de nf-core. -Por ejemplo, para omitir el paso de recorte: +Por ejemplo, para omitir el paso de recorte, queremos establecer el parámetro boolean `skip_trim` en `true`. +En su directorio de trabajo se proporciona un archivo de parámetros llamado `my_params.yml` con ese valor ya configurado: + +```yaml title="my_params.yml" +skip_trim: true +``` + +Páselo con `-params-file`: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "Salida del comando" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` El proceso `SEQTK_TRIM` ya no aparece en la salida. -!!! info "Info" +!!! warning "Advertencia: Limitaciones importantes sobre las entradas de parámetros" + + **Establecer parámetros boolean en la línea de comando** + + A partir de la versión 26.04 de Nextflow, todos los valores proporcionados en la línea de comando se tipifican como strings. + Para un parámetro boolean como `skip_trim`, pasarlo como un indicador simple (`--skip_trim`) o como `--skip_trim true` se evalúa como el **string** `"true"`, lo que falla en la validación del esquema: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + Para establecer un parámetro boolean en un valor genuino `true`/`false`, use un `-params-file` como se muestra arriba, o configúrelo en un archivo de configuración. + Los parámetros de tipo string, integer y file-path no se ven afectados y aún pueden establecerse directamente en la línea de comando. + Este curso usa este patrón en todo momento para los parámetros boolean. + + **Usar archivos de configuración personalizados** Aunque técnicamente es posible establecer parámetros del pipeline en un archivo de configuración personalizado pasado con `-c`, esto puede no anular los valores predeterminados ya establecidos en el propio `nextflow.config` del pipeline, dependiendo de las reglas de precedencia de configuración de Nextflow. Usar `--nombre_param` en la línea de comando o `-params-file` es más confiable, ya que estos siempre tienen precedencia. @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` El pipeline sigue ejecutándose, pero la advertencia le alerta de inmediato que `--foobar` no es un parámetro reconocido. -Esto detecta errores tipográficos como `--outDir` en lugar de `--outdir` antes de que pierda tiempo de cómputo preguntándose por qué la salida fue al lugar equivocado. +Esto está diseñado para llamar su atención sobre errores tipográficos que no interrumpen la ejecución, como usar `--outDir` en lugar de `--outdir`, lo que puede ayudarle a evitar perder tiempo y recursos de cómputo. ##### 3.1.3.2. Valores de parámetros no válidos @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` El pipeline se detiene antes de que se ejecute cualquier proceso, evitando una ejecución fallida o incorrecta. -Los parámetros boolean deben pasarse como indicadores (`--skip_trim`) sin un valor, o establecerse como `true`/`false` en un archivo de parámetros. +Como se indica en la sección 3.1.2, los parámetros boolean deben establecerse en un valor genuino `true`/`false` en un archivo de parámetros en lugar de pasarse en la línea de comando, ya que los valores de la línea de comando se tipifican como strings. #### 3.1.4. Validación de entrada @@ -637,7 +756,7 @@ También cubrimos esto con más detalle en [Parte 5: Validación de entrada](05_ El pipeline `nf-core/demo` espera un archivo CSV con columnas `sample`, `fastq_1` y `fastq_2`. Esto está definido en un archivo de esquema (`assets/schema_input.json`) que especifica la estructura esperada, los tipos de columnas y las restricciones. -??? abstract "assets/schema_input.json" +??? abstract "Archivo de esquema para las entradas" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Esto está definido en un archivo de esquema (`assets/schema_input.json`) que es El esquema especifica que `sample` y `fastq_1` son obligatorios, mientras que `fastq_2` es opcional (admitiendo datos de extremo pareado y de extremo único). Las rutas de archivo se validan para verificar su existencia y patrón de extensión. -##### 3.1.4.1. Crear una hoja de muestras no válida - -Cree una hoja de muestras con una columna faltante y una ruta de archivo inexistente: +Para demostrarlo, en su directorio de trabajo se proporciona una hoja de muestras malformada llamada `malformed_samplesheet.csv`: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` A esta hoja de muestras le falta la columna requerida `fastq_1` y tiene una ruta de archivo inexistente en `fastq_2`. -Ambos problemas producirán errores de validación en el siguiente paso. - -##### 3.1.4.2. Ejecutar el pipeline de demostración con la hoja de muestras no válida -Ejecute el pipeline de demostración usando `malformed_samplesheet.csv` como entrada. +Ejecute el pipeline de demostración usando `malformed_samplesheet.csv` como entrada: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -724,15 +839,28 @@ La configuración en sentido estricto controla **cómo** se ejecuta el pipeline: Los pipelines de nf-core incluyen configuración predeterminada en `nextflow.config` y el directorio `conf/`. Antes de anular cualquier cosa, es útil saber dónde se encuentran los valores predeterminados. -Ya vio en la sección 2.1 que el código fuente del pipeline se encuentra en `$NXF_HOME/assets`. -Liste los archivos de configuración para ver qué está disponible: +Ya vio en la sección 2.1 que el código fuente del pipeline se encuentra bajo `$NXF_HOME/assets`. +Usando el enlace simbólico `pipelines` de la sección 1.2.4, liste los archivos de configuración para ver qué está disponible: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ Si desea modificar alguna de las configuraciones especificadas en estos archivos En su lugar, cree su propio archivo de configuración y páselo con `-c`. Los valores que especifique anularán los valores predeterminados establecidos en esos otros archivos. -Repasemos algunos ejercicios para hacer esto en la práctica. +Practiquemos esto. -#### 3.2.1. Cambiar la asignación de recursos para un proceso +#### 3.2.1. Personalizar recursos de procesos y argumentos de herramientas -El pipeline de demostración asigna recursos usando etiquetas definidas en `base.config`. -Por ejemplo, `FASTQC` usa la etiqueta `process_medium`, que asigna 6 CPUs y 36 GB de memoria. +Los módulos de nf-core admiten dos tipos comunes de anulación de configuración: **asignación de recursos** (CPUs, memoria, tiempo) y **argumentos de herramientas** a través de `ext.args`. -El perfil de prueba limita los recursos mediante `resourceLimits`, pero también puede anular los recursos para procesos específicos. +Muchas herramientas de línea de comando tienen argumentos que no se usan con suficiente frecuencia como para exponerse como parámetros del pipeline. +La convención `ext.args` le permite pasar estos argumentos a la herramienta subyacente a través de un archivo de configuración. -Cree un archivo llamado `custom.config`: +El archivo `custom.config` proporcionado en su directorio de trabajo demuestra ambas anulaciones: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -Ejecute el pipeline con su configuración personalizada: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "Salida del comando" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -El indicador `-c` agrega su configuración sobre la configuración integrada del pipeline. - -#### 3.2.2. Establecer valores de argumentos de herramientas con `ext.args` - -Muchas herramientas de línea de comando tienen argumentos que no son obligatorios y por lo tanto no se configuran como parámetros del pipeline a menos que se usen muy comúnmente. -Para esos argumentos de herramientas, los módulos de nf-core usan una convención de Nextflow llamada `ext.args` para pasar argumentos a la herramienta subyacente a través de un archivo de configuración. - -Por ejemplo, agreguemos un argumento de recorte al módulo `SEQTK_TRIM` usando `ext.args`. - -##### 3.2.2.1. Actualizar la configuración personalizada - -Actualice su `custom.config`: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -Esto le indica a `seqtk trimfq` que recorte 5 bases del inicio de cada lectura además del recorte por calidad. +El primer bloque anula la asignación de recursos de `FASTQC`. +Por defecto, `FASTQC` usa la etiqueta `process_medium` de `base.config`, que asigna 6 CPUs y 36 GB de memoria; aquí lo limitamos a 2 CPUs y 4 GB. -##### 3.2.2.2. Ejecutar el pipeline +El segundo bloque pasa un argumento adicional a `SEQTK_TRIM` a través de `ext.args`. +El indicador `-b 5` le indica a `seqtk trimfq` que recorte 5 bases del inicio de cada lectura además del recorte por calidad. -Ejecute el pipeline nuevamente con esta configuración para ver el efecto: +Ejecute el pipeline con esta configuración: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "Salida del comando" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Para verificar que el argumento fue aplicado, encuentre el hash del directorio de trabajo de `SEQTK_TRIM` en la salida de la ejecución (por ejemplo, `work/ab/cd1234...`) y verifique el archivo `.command.sh` dentro de él: +El indicador `-c` agrega su configuración sobre la configuración integrada del pipeline. + +Para verificar que la anulación de `ext.args` tuvo efecto, encuentre el hash del directorio de trabajo de `SEQTK_TRIM` en la salida de la ejecución (por ejemplo, `work/17/428668...`) y verifique el archivo `.command.sh` dentro de él: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "Salida del comando" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` -Debería ver `-b 5` en el comando `seqtk trimfq`, confirmando que su anulación de `ext.args` tuvo efecto. +Debería ver `-b 5` en el comando `seqtk trimfq`. -##### 3.2.2.3. Anular valores predeterminados - -Algunos módulos ya tienen `ext.args` establecido por defecto. -Por ejemplo, el módulo `FASTQC` está configurado con `ext.args = '--quiet'` por defecto (definido en `conf/modules.config`). +Una cosa importante que debe saber sobre `ext.args`: si un módulo ya tiene un valor predeterminado establecido, su valor lo **reemplazará completamente** en lugar de agregarse a él. +Por ejemplo, `FASTQC` tiene `ext.args = '--quiet'` establecido por defecto en `conf/modules.config`: ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -Si proporciona un valor para `ext.args` a través de un archivo de configuración personalizado, ese valor reemplazará completamente el valor predeterminado establecido para ese proceso. - -Por ejemplo, si el valor predeterminado era `'--quiet'` y establece `ext.args = '--kmers 8'`, el indicador `--quiet` ya no se aplicará. +Si establece `ext.args = '--kmers 8'` para `FASTQC`, el indicador `--quiet` ya no se aplicará. Para mantener ambos, establezca `ext.args = '--quiet --kmers 8'`. -Esto significa que usted es responsable de verificar cuál es la configuración predeterminada de las herramientas a las que desea proporcionar valores de argumentos con `ext.args`. +Siempre debe verificar la configuración predeterminada de un módulo antes de anular `ext.args`. ### Conclusión @@ -878,4 +976,6 @@ Sabe cómo obtener ayuda de un pipeline de nf-core, establecer parámetros y ent ### ¿Qué sigue? -¡Tome un descanso! Cuando esté listo, pase a la Parte 2, donde creará su propio pipeline compatible con nf-core desde cero. +¡Si solo quiere ejecutar pipelines de nf-core, ya terminó! + +Si quiere aprender a desarrollar sus propios pipelines según los estándares de nf-core, tome un descanso y pase a la Parte 2 cuando esté listo. Aprenderá a crear su propio pipeline compatible con nf-core usando las herramientas basadas en la plantilla de nf-core. diff --git a/docs/es/docs/hello_nf-core/02_rewrite_hello.md b/docs/es/docs/hello_nf-core/02_rewrite_hello.md index ac5d175b81..92d051d714 100644 --- a/docs/es/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/es/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Si no estás familiarizado con el pipeline Hello o necesitas un recordatorio, co - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "Nota" - - Asegúrate de estar en el directorio `hello-nf-core` en tu terminal. - --- ## 1. Examinar la estructura del código del pipeline @@ -30,6 +26,7 @@ El proyecto nf-core aplica directrices estrictas sobre cómo se estructuran los Antes de abordar nuestro proyecto de creación de pipeline, necesitamos entender esa estructura y organización. Así que veamos cómo está organizado el código del pipeline en el repositorio `nf-core/demo`, usando el enlace simbólico `pipelines` que creamos en la Parte 1. +Asegúrate de estar en el directorio `hello-nf-core` en tu terminal. Como recordatorio, puedes usar `tree` o el explorador de archivos para encontrar y abrir el directorio `nf-core/demo`. @@ -82,7 +79,7 @@ Así es como se ven las relaciones entre los componentes de código relevantes: El workflow sin nombre en `main.nf` se llama script de _punto de entrada_. Actúa como un envoltorio para dos tipos de workflows anidados: el workflow `DEMO` que contiene la lógica de análisis real, ubicado en `workflows/demo.nf`, y un conjunto de workflows de mantenimiento ubicados bajo `subworkflows/`. El workflow `demo.nf` llama a **módulos** ubicados bajo `modules/`; estos contienen los **procesos** que realizarán los pasos de análisis reales. -!!! note "Nota" +!!! info "Info" Los subworkflows no se limitan a funciones de mantenimiento, y pueden hacer uso de módulos de procesos. @@ -107,7 +104,7 @@ Cubriremos las diferencias relevantes en la siguiente parte de este curso, cuand El workflow `demo.nf` llama a **módulos** ubicados bajo `modules/`, que revisaremos a continuación. -!!! note "Nota" +!!! info "Info" Algunos workflows de análisis nf-core muestran niveles adicionales de anidamiento al llamar a subworkflows de nivel inferior. Esto se usa principalmente para envolver dos o más módulos que se usan comúnmente juntos en segmentos de pipeline fácilmente reutilizables. @@ -266,13 +263,20 @@ Una vez que la TUI se cierre, deberías ver la siguiente salida en la consola. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -No hay una confirmación explícita en la salida de consola de que la creación del pipeline funcionó, pero deberías ver un nuevo directorio llamado `core-hello`. +Una vez que la TUI haya terminado, la herramienta informa que creó el pipeline y generó su configuración de contenedor: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +Ahora deberías ver un nuevo directorio llamado `core-hello`. Visualiza el contenido del nuevo directorio para ver cuánto trabajo te ahorraste usando la plantilla. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "Contenido del directorio" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` ¡Son muchos archivos! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +Las líneas `WARN: Unrecognized config option 'validation.*'` provienen de la versión del plugin nf-schema fijada en la plantilla recién creada. +Son inofensivas y no afectan la ejecución. + Esto te muestra que toda la estructura básica está en su lugar. Entonces, ¿dónde están las salidas? ¿Hay alguna? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -435,7 +446,7 @@ Veamos más de cerca. Este sirve como placeholder para nuestro workflow de análisis, con algo de funcionalidad nf-core ya en su lugar. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -454,14 +465,16 @@ workflow HELLO { take: ch_samplesheet // canal: samplesheet leído desde --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Recopilar y guardar versiones de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -478,19 +491,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // canal: [ path(versions.yml) ] - } /* @@ -503,15 +513,15 @@ workflow HELLO { Comparado con un workflow básico de Nextflow como el desarrollado en [Hello Nextflow](../hello_nextflow/index.md), notarás algunas cosas que son nuevas aquí (líneas destacadas arriba): - El bloque workflow tiene un nombre -- Las entradas del workflow se declaran usando la palabra clave `take:` y la construcción del canal se mueve al workflow padre +- Las entradas del workflow se declaran usando la palabra clave `take:` (aquí un canal de samplesheet y un directorio de salida), y la construcción del canal se mueve al workflow padre - El contenido del workflow se coloca dentro de un bloque `main:` - Las salidas se declaran usando la palabra clave `emit:` Estas son características opcionales de Nextflow que hacen que el workflow sea **componible**, lo que significa que puede ser llamado desde dentro de otro workflow. -??? note "El bloque `Channel.topic`" +??? note "El bloque `channel.topic`" - Puede que hayas notado el bloque `def topic_versions = Channel.topic("versions")` que comienza en la línea 17. + Puede que hayas notado el bloque `def topic_versions = channel.topic("versions")` que comienza en la línea 28. Este es código de mantenimiento estándar que recopila información de versiones de software de todos los módulos automáticamente. nf-core está implementando este mecanismo en todos los pipelines en 2026, por lo que lo verás en todos los nuevos pipelines a partir de ahora. La Parte 4 de este curso explica cómo funciona en detalle. @@ -575,15 +585,15 @@ nextflow run original-hello/hello.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` Si eso funciona, estás listo para comenzar. @@ -704,7 +714,7 @@ Ya que estamos en eso, también podemos comentar la línea `params.greeting = 'g params.character = 'turkey' ``` -!!! note "Nota" +!!! info "Info" Si tienes instalada la extensión del servidor de lenguaje Nextflow, el verificador de sintaxis iluminará tu código con garabatos rojos. Eso es porque si pones una declaración `take:`, también debes tener un `main:`. @@ -851,7 +861,7 @@ Hay dos observaciones importantes que hacer aquí: - La sintaxis para llamar al workflow importado es esencialmente la misma que la sintaxis para llamar módulos. - Todo lo que está relacionado con llevar las entradas al workflow (parámetro de entrada y construcción del canal) ahora se declara en este workflow padre. -!!! note "Nota" +!!! info "Info" Nombrar el archivo de workflow de punto de entrada `main.nf` es una convención, no un requisito. @@ -878,19 +888,19 @@ Si hiciste todos los cambios correctamente, esto debería ejecutarse hasta compl ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -Esto significa que hemos actualizado exitosamente nuestro workflow HELLO para que sea componible. +Esto significa que hemos actualizado exitosamente nuestro workflow `HELLO` para que sea componible. ### Conclusión @@ -932,14 +942,16 @@ workflow HELLO { take: ch_samplesheet // canal: samplesheet leído desde --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Recopilar y guardar versiones de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -956,19 +968,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // canal: [ path(versions.yml) ] - } /* @@ -978,8 +987,8 @@ workflow HELLO { */ ``` -Las líneas destacadas definen la estructura del workflow componible: `workflow HELLO {`, `take:`, `main:` y `emit:`. -El bloque extenso entre las líneas 17–34 es más sustancial: maneja la captura de versiones de software usando topic channels, un mecanismo que nf-core está implementando en todos los pipelines en 2026. +Esta es la estructura del workflow componible: un bloque `workflow HELLO {` con nombre que incluye `take:`, `main:` y `emit:`. +El bloque bajo `// Collate and save software versions` es más sustancial: maneja la captura de versiones de software usando topic channels, un mecanismo que nf-core está implementando en todos los pipelines en 2026. Lo explicaremos en la Parte 4; por ahora, trátalo como código estándar que puedes dejar sin modificar. Necesitamos agregar el código relevante del workflow componible original que desarrollamos en la sección 2. @@ -991,7 +1000,7 @@ Vamos a abordar esto en las siguientes etapas: 3. Agregar la lógica del workflow al bloque `main` 4. Actualizar el bloque `emit` -!!! note "Nota" +!!! info "Info" Vamos a ignorar el bloque de captura de versiones por este primer paso. La Parte 4 explica cómo funciona. @@ -1079,9 +1088,10 @@ Dos observaciones más interesantes aquí: El proyecto nf-core tiene mucha funcionalidad preconstruida alrededor del concepto de samplesheet, que típicamente es un archivo CSV que contiene datos en columnas. Como eso es esencialmente lo que es nuestro archivo `greetings.csv`, mantendremos la declaración `take` actual como está, y simplemente actualizaremos el nombre del canal de entrada en el siguiente paso. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // canal: samplesheet leído desde --input + outdir ``` El manejo de entrada se hará antes de este workflow (no en este archivo de código). @@ -1111,20 +1121,21 @@ Como recordatorio, este es el código relevante en el workflow original, que no Necesitamos copiar el código que viene después de `main:` en la nueva versión del workflow. Ya hay algo de código allí que tiene que ver con capturar las versiones de las herramientas que ejecuta el workflow. Vamos a dejarlo solo por ahora (nos ocuparemos de las versiones de las herramientas más tarde). -Mantendremos la inicialización `ch_versions = channel.empty()` en la parte superior, luego insertaremos nuestra lógica de workflow, manteniendo el código de recopilación de versiones al final. +Mantendremos la inicialización `def ch_versions = channel.empty()` en la parte superior, luego insertaremos nuestra lógica de workflow, manteniendo el código de recopilación de versiones al final. Este orden tiene sentido porque en un pipeline real, los procesos emitirían información de versión que se agregaría al canal `ch_versions` a medida que el workflow se ejecuta. === "Después" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // canal: samplesheet leído desde --input + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // emitir un saludo sayHello(greeting_ch) @@ -1141,7 +1152,7 @@ Este orden tiene sentido porque en un pipeline real, los procesos emitirían inf // // Recopilar y guardar versiones de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1158,37 +1169,36 @@ Este orden tiene sentido porque en un pipeline real, los procesos emitirían inf "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // canal: [ path(versions.yml) ] - } ``` === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // canal: samplesheet leído desde --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Recopilar y guardar versiones de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1205,36 +1215,31 @@ Este orden tiene sentido porque en un pipeline real, los procesos emitirían inf "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // canal: [ path(versions.yml) ] - } ``` -Notarás que también agregamos una línea en blanco antes de `main:` para hacer el código más legible. - Esto se ve bien, pero todavía necesitamos actualizar el nombre del canal que estamos pasando al proceso `sayHello()` de `greeting_ch` a `ch_samplesheet` como se muestra a continuación, para coincidir con lo que está escrito bajo la palabra clave `take:`. === "Después" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // emitir un saludo (actualizado para usar la convención nf-core para samplesheets) sayHello(ch_samplesheet) ``` === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // emitir un saludo sayHello(greeting_ch) ``` @@ -1247,7 +1252,7 @@ Finalmente, necesitamos actualizar el bloque `emit` para incluir la declaración === "Después" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // canal: [ path(versions.yml) ] @@ -1255,12 +1260,12 @@ Finalmente, necesitamos actualizar el bloque `emit` para incluir la declaración === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // canal: [ path(versions.yml) ] ``` -Esto concluye las modificaciones que necesitamos hacer al workflow HELLO en sí mismo. +Esto concluye las modificaciones que necesitamos hacer al workflow `HELLO` en sí mismo. En este punto, hemos logrado la estructura general de código que nos propusimos implementar. ### Conclusión @@ -1324,7 +1329,8 @@ workflow CORE_HELLO { // WORKFLOW: Ejecutar pipeline // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1361,7 +1367,6 @@ workflow { // SUBWORKFLOW: Ejecutar tareas de finalización // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1377,7 +1382,7 @@ El proyecto nf-core hace un uso intensivo de subworkflows anidados, por lo que e Lo que importa aquí es que hay dos workflows definidos: -- `CORE_HELLO` es un envoltorio delgado para ejecutar el workflow HELLO que acabamos de terminar de adaptar en `core-hello/workflows/hello.nf`. +- `CORE_HELLO` es un envoltorio delgado para ejecutar el workflow `HELLO` que acabamos de terminar de adaptar en `core-hello/workflows/hello.nf`. - Un workflow sin nombre que llama a `CORE_HELLO` así como a otros dos subworkflows, `PIPELINE_INITIALISATION` y `PIPELINE_COMPLETION`. Aquí hay un diagrama de cómo se relacionan entre sí: @@ -1422,9 +1427,9 @@ Si abrimos ese archivo y nos desplazamos hacia abajo, llegamos a este fragmento versions = ch_versions ``` -Esta es la fábrica de canales que analiza el samplesheet y lo pasa en una forma que está lista para ser consumida por el workflow HELLO. +Esta es la fábrica de canales que analiza el samplesheet y lo pasa en una forma que está lista para ser consumida por el workflow `HELLO`. -!!! note "Nota" +!!! info "Info" La sintaxis anterior es un poco diferente de lo que hemos usado anteriormente, pero básicamente esto: @@ -1533,7 +1538,7 @@ Ahora podemos actualizar el archivo `test.config` de la siguiente manera: === "Después" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1595,13 +1600,53 @@ Y ya que estamos en eso, ajustemos los límites de recursos predeterminados para Esto completa las modificaciones de código que necesitamos hacer. -### 5.4. Ejecutar el pipeline con el perfil de prueba +### 5.4. Deshabilitar la validación de parámetros + +Reemplazamos el análisis de samplesheet de la plantilla con nuestra propia construcción de canal simple, pero la plantilla todavía incluye un `nextflow_schema.json` y `assets/schema_input.json` que describen un samplesheet basado en fastq. +Como aún no hemos adaptado esos esquemas a nuestro formato `greetings.csv`, necesitamos desactivar la validación de parámetros por ahora (la configuraremos correctamente más adelante). + +Abre `core-hello/nextflow.config` y establece `validate_params` en `false`: + +=== "Después" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "Antes" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +Establecemos esto en el archivo de configuración en lugar de en la línea de comandos porque a partir de Nextflow versión 26.04, todos los valores proporcionados en la línea de comandos se tipifican como strings. +Como resultado, los parámetros booleanos deben establecerse en un archivo de configuración o en un `-params-file` para tomar un valor genuino `true`/`false`. + +Por ejemplo, usar `--validate_params false` aquí se evaluaría como el **string** `"false"`, lo que deja la validación activada. + +!!! tip "Líneas de compatibilidad con el parser v2 en `nextflow.config`" + + Hablando de sintaxis v2, puede que notes estas dos líneas justo debajo del bloque `params` en el archivo de configuración: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + Estas son necesarias para la compatibilidad con el parser de sintaxis v2. + + - Con la sintaxis v2, las variables `params.*` no pueden referenciarse directamente dentro de las directivas `publishDir` en los módulos de proceso, por lo que `outputDir` se define aquí como una variable de configuración de nivel superior a la que esas directivas pueden acceder. + + - `workflow.output.mode` establece el modo de publicación predeterminado para el bloque de salida del workflow v2. + + Ambas son generadas automáticamente por la plantilla del pipeline nf-core y no necesitan ser modificadas. + +### 5.5. Ejecutar el pipeline con el perfil de prueba Eso fue mucho, ¡pero finalmente podemos intentar ejecutar el pipeline! -Ten en cuenta que tenemos que agregar `--validate_params false` a la línea de comando porque no configuramos la validación todavía (eso vendrá más tarde). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` Si has hecho todas las modificaciones correctamente, debería ejecutarse hasta completarse. @@ -1609,9 +1654,9 @@ Si has hecho todas las modificaciones correctamente, debería ejecutarse hasta c ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1623,10 +1668,10 @@ Si has hecho todas las modificaciones correctamente, debería ejecutarse hasta c Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1637,17 +1682,17 @@ Si has hecho todas las modificaciones correctamente, debería ejecutarse hasta c !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -Como puedes ver, esto produjo el resumen típico de nf-core al inicio gracias al subworkflow de inicialización, y las líneas para cada módulo ahora muestran los nombres completos PIPELINE:WORKFLOW:module. +Como puedes ver, esto produjo el resumen típico de nf-core al inicio gracias al subworkflow de inicialización, y las líneas para cada módulo ahora muestran los nombres completos `PIPELINE:WORKFLOW:module`. -### 5.5. Encontrar las salidas del pipeline +### 5.6. Encontrar las salidas del pipeline La pregunta ahora es: ¿dónde están las salidas del pipeline? Y la respuesta es bastante interesante: ahora hay dos lugares diferentes donde buscar los resultados. @@ -1663,17 +1708,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1683,7 +1728,7 @@ Esta vez ves todas las tareas que se ejecutaron como se esperaba. ![reporte de línea de tiempo de ejecución para el pipeline Hello](./img/execution_timeline_hello.png) -!!! note "Nota" +!!! info "Info" Una vez más, las tareas no se ejecutaron en paralelo porque estamos ejecutando en una máquina minimalista en Github Codespaces. Para ver que se ejecuten en paralelo, intenta aumentar la asignación de CPU de tu codespace y los límites de recursos en la configuración de prueba. diff --git a/docs/es/docs/hello_nf-core/03_use_module.md b/docs/es/docs/hello_nf-core/03_use_module.md index 5b721955e3..23b0944a02 100644 --- a/docs/es/docs/hello_nf-core/03_use_module.md +++ b/docs/es/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ Para demostrar cómo funciona esto, reemplazaremos el módulo personalizado `col Puede probar que se ejecuta correctamente ejecutando el siguiente comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ Navegue a la página de módulos en su navegador web y use la barra de búsqueda Como puede ver, hay bastantes resultados, muchos de ellos módulos diseñados para concatenar tipos de archivos muy específicos. Entre ellos, debería ver uno llamado `find_concatenate` que es de propósito general. -!!! note "Convención de nomenclatura de módulos" +!!! info "Convención de nomenclatura de módulos" El guion bajo (`_`) se usa como sustituto del carácter de barra diagonal (`/`) en los nombres de los módulos. @@ -120,9 +120,11 @@ Esto muestra documentación sobre el módulo, incluyendo sus entradas, salidas e | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ Esto muestra documentación sobre el módulo, incluyendo sus entradas, salidas e Esta es exactamente la misma información que puede encontrar en el sitio web. +Puede ignorar el mensaje `INFO Reinstalling modules found in 'modules.json' but missing from directory`; nf-core/tools 4.0.2 lo emite para cualquier módulo que consulte con `info`, esté o no instalado, y no tiene ningún efecto ya que el comando `info` no escribe ningún archivo. + ### 1.4. Instalar el módulo find/concatenate Ahora que hemos encontrado el módulo que queremos, necesitamos agregarlo al código fuente de nuestro pipeline. @@ -193,15 +197,13 @@ Ahora que hemos encontrado el módulo que queremos, necesitamos agregarlo al có La buena noticia es que el proyecto nf-core incluye algunas herramientas para facilitar esta parte. Específicamente, el comando `nf-core modules install` permite automatizar la recuperación del código y hacerlo disponible para su proyecto en un solo paso. -Navegue al directorio de su pipeline y ejecute el comando de instalación: +Asegúrese de que su directorio de trabajo actual sea la raíz del proyecto de pipeline `core-hello`, luego ejecute el comando de instalación: ```bash cd core-hello nf-core modules install find/concatenate ``` -La herramienta procederá a instalar el módulo. - ??? success "Salida del comando" ```console @@ -212,26 +214,20 @@ La herramienta procederá a instalar el módulo. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -El comando automáticamente: - -- Descarga los archivos del módulo a `modules/nf-core/find/concatenate/` -- Actualiza `modules.json` para rastrear el módulo instalado -- Le proporciona la declaración `include` correcta para usar en su workflow - -!!! tip "Consejo" - - Asegúrese siempre de que su directorio de trabajo actual sea la raíz de su proyecto de pipeline antes de ejecutar el comando de instalación del módulo. +El comando descarga los archivos del módulo a `modules/nf-core/find/concatenate/` y actualiza `modules.json` para rastrear el módulo instalado. +Puede ignorar el error `NotADirectoryError` al final; ocurre porque nf-core/tools 4.0.2 espera que cada módulo local resida en su propio directorio (`modules/local//main.nf`), mientras que `core-hello` todavía usa módulos locales de archivo único en esta etapa. +Sin embargo, el módulo `find/concatenate` se instala correctamente y `modules.json` se actualiza como se espera. +Convertiremos `cowpy` al diseño de directorio en la Parte 4. -Verifiquemos que el módulo se instaló correctamente: +Verifiquemos que los archivos del módulo estén en su lugar: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -También puede verificar la instalación pidiendo a la utilidad nf-core que liste los módulos instalados localmente: +También puede confirmar la instalación inspeccionando `modules.json`, que ahora lista `find/concatenate` bajo el repositorio nf-core/modules. + +??? abstract "Contenido del archivo" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +Esto confirma que el módulo `find/concatenate` ahora es parte del código fuente de su proyecto. +Sin embargo, para realmente usar el nuevo módulo, necesitamos importarlo en nuestro pipeline. + +Por último, también puede usar el comando `nf-core modules list local` para verificar qué módulos están actualmente rastreados en su pipeline. ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "Salida del comando" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -Esto confirma que el módulo `find/concatenate` ahora es parte del código fuente de su proyecto. - -Sin embargo, para realmente usar el nuevo módulo, necesitamos importarlo en nuestro pipeline. +Esto muestra `find/concatenate` en la tabla resultante junto con su repositorio, SHA de versión, mensaje y fecha. ### 1.5. Actualizar las importaciones de módulos @@ -302,7 +354,7 @@ Abra `core-hello/workflows/hello.nf` y realice la siguiente sustitución: === "Después" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ Abra `core-hello/workflows/hello.nf` y realice la siguiente sustitución: include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "Antes" @@ -345,7 +397,7 @@ En este punto, podría sentirse tentado a sumergirse y comenzar a editar código Vamos a abordar eso como una sección separada porque involucra un nuevo mecanismo que no hemos cubierto todavía: los mapas de metadatos. -!!! note "Nota" +!!! info "Info" Opcionalmente puede eliminar el archivo `collectGreetings.nf`: @@ -373,7 +425,7 @@ Esto nos permitirá determinar si podemos simplemente tratar el nuevo módulo co Idealmente, esto es algo que debería hacer _antes_ de instalar el módulo, pero bueno, más vale tarde que nunca. (Para su información, existe un comando `uninstall` para deshacerse de los módulos que decide que ya no quiere.) -!!! note "Nota" +!!! info "Info" El proceso FIND_CONCATENATE incluye un manejo bastante ingenioso de diferentes tipos de compresión, extensiones de archivo, etc., que no son estrictamente relevantes para lo que estamos tratando de mostrarle aquí, así que ignoraremos la mayor parte y nos enfocaremos solo en las partes que son importantes. @@ -512,7 +564,7 @@ Como se mencionó anteriormente, la configuración de entrada `tuple val(meta), Con suerte, puede comenzar a ver qué tan útil puede ser esto. No solo le permite nombrar salidas basadas en metadatos, sino que también puede hacer cosas como usarlo para aplicar diferentes valores de parámetros, y en combinación con operadores específicos, incluso puede agrupar, ordenar o filtrar datos a medida que fluyen a través del pipeline. -!!! note "Aprenda más sobre metadatos" +!!! info "Aprenda más sobre metadatos" Para una introducción completa sobre cómo trabajar con metadatos en workflows Nextflow, incluyendo cómo leer metadatos de hojas de muestras y usarlos para personalizar el procesamiento, consulte la misión secundaria [Metadatos en workflows](../side_quests/metadata/index.md). @@ -543,7 +595,7 @@ Ahora que sabe todo sobre los metamapas (o suficiente para los propósitos de es Por claridad, desglosaremos esto y cubriremos cada paso por separado. -!!! note "Nota" +!!! info "Info" Todos los cambios mostrados a continuación se realizan en la lógica del workflow en el bloque `main` en el archivo de workflow `core-hello/workflows/hello.nf`. @@ -570,8 +622,8 @@ Agreguemos estas líneas después de la llamada a `convertToUpper`, eliminando l === "Después" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // emitir un saludo + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // emitir un saludo (actualizado para usar la convención nf-core para hojas de muestras) sayHello(ch_samplesheet) // convertir el saludo a mayúsculas @@ -586,8 +638,8 @@ Agreguemos estas líneas después de la llamada a `convertToUpper`, eliminando l === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // emitir un saludo + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // emitir un saludo (actualizado para usar la convención nf-core para hojas de muestras) sayHello(ch_samplesheet) // convertir el saludo a mayúsculas @@ -608,8 +660,8 @@ A continuación, transforme el canal de archivos en un canal de tuplas que conte === "Después" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // emitir un saludo + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // emitir un saludo (actualizado para usar la convención nf-core para hojas de muestras) sayHello(ch_samplesheet) // convertir el saludo a mayúsculas @@ -627,8 +679,8 @@ A continuación, transforme el canal de archivos en un canal de tuplas que conte === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // emitir un saludo + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // emitir un saludo (actualizado para usar la convención nf-core para hojas de muestras) sayHello(ch_samplesheet) // convertir el saludo a mayúsculas @@ -654,8 +706,8 @@ Ahora llame a `FIND_CONCATENATE` en el canal recién creado: === "Después" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // emitir un saludo + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // emitir un saludo (actualizado para usar la convención nf-core para hojas de muestras) sayHello(ch_samplesheet) // convertir el saludo a mayúsculas @@ -676,8 +728,8 @@ Ahora llame a `FIND_CONCATENATE` en el canal recién creado: === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // emitir un saludo + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // emitir un saludo (actualizado para usar la convención nf-core para hojas de muestras) sayHello(ch_samplesheet) // convertir el saludo a mayúsculas @@ -704,8 +756,8 @@ Dado que `cowpy` aún no acepta tuplas de metadatos (arreglaremos esto en la sig === "Después" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // emitir un saludo + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // emitir un saludo (actualizado para usar la convención nf-core para hojas de muestras) sayHello(ch_samplesheet) // convertir el saludo a mayúsculas @@ -729,8 +781,8 @@ Dado que `cowpy` aún no acepta tuplas de metadatos (arreglaremos esto en la sig === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // emitir un saludo + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // emitir un saludo (actualizado para usar la convención nf-core para hojas de muestras) sayHello(ch_samplesheet) // convertir el saludo a mayúsculas @@ -753,7 +805,7 @@ La operación `#!groovy .map { meta, file -> file }` extrae el archivo de la tup Luego, es solo cuestión de pasar `ch_for_cowpy` a `cowpy` en lugar de `collectGreetings.out.outfile` en esa última línea. -!!! note "Nota" +!!! info "Info" En la siguiente parte del curso, actualizaremos `cowpy` para trabajar con tuplas de metadatos directamente, por lo que este paso de extracción ya no será necesario. @@ -762,7 +814,7 @@ Luego, es solo cuestión de pasar `ch_for_cowpy` a `cowpy` en lugar de `collectG Probemos que el workflow funciona con el módulo `find/concatenate` recién integrado: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` Esto debería ejecutarse razonablemente rápido. @@ -770,40 +822,40 @@ Esto debería ejecutarse razonablemente rápido. ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` Observe que `FIND_CONCATENATE` ahora aparece en la lista de ejecución de procesos en lugar de `collectGreetings`. diff --git a/docs/es/docs/hello_nf-core/04_make_module.md b/docs/es/docs/hello_nf-core/04_make_module.md index 3326d59e4e..78f4000c06 100644 --- a/docs/es/docs/hello_nf-core/04_make_module.md +++ b/docs/es/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ Después de eso, le mostraremos cómo usar la creación de módulos basada en pl Puede probar que se ejecuta correctamente ejecutando el siguiente comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ Abra el archivo del módulo `cowpy.nf` (en `core-hello/modules/local/`) y modifi === "Después" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Generate ASCII art with cowpy (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "Antes" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Generate ASCII art with cowpy (https://github.com/jeffbuttars/cowpy) process cowpy { ``` En este caso, el cambio a mayúsculas es completamente directo. -Si el nombre del proceso estuviera compuesto por varias palabras, por ejemplo si tuviéramos un proceso llamado MyCowpyTool originalmente en camelCase, la convención de nf-core sería usar guiones bajos para separarlas, resultando en MY_COWPY_TOOL. +Si el nombre del proceso estuviera compuesto por varias palabras, por ejemplo si tuviéramos un proceso llamado `MyCowpyTool` originalmente en camelCase, la convención de nf-core sería usar guiones bajos para separarlas, resultando en `MY_COWPY_TOOL`. #### 1.1.2. Actualizar la declaración de importación del módulo @@ -164,7 +164,7 @@ Así que ahora actualicemos las dos referencias al proceso en el bloque workflow // // Recopilar y guardar versiones de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ Así que ahora actualicemos las dos referencias al proceso en el bloque workflow // // Recopilar y guardar versiones de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ Asegúrese de hacer **ambos** cambios, de lo contrario obtendrá un error cuando Ejecutemos el flujo de trabajo para probar que todo está funcionando correctamente después de estos cambios. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ Regrese al archivo del módulo `cowpy.nf` y modifíquelo para aceptar tuplas de === "Después" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ Regrese al archivo del módulo `cowpy.nf` y modifíquelo para aceptar tuplas de === "Antes" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ Técnicamente esto no es requerido, pero es una buena práctica referirse a sali Ejecutemos el flujo de trabajo para probar que todo está funcionando correctamente después de estos cambios. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Puede ver que hicimos tres cambios. Como resultado, la interfaz del módulo ahora es más simple: solo espera las entradas esenciales de metadatos y archivos. -!!! note "Nota" +!!! info "Info" El operador `?:` a menudo se llama 'operador Elvis' porque parece una cara de Elvis Presley de lado, con el carácter `?` simbolizando la onda en su cabello. @@ -623,15 +623,15 @@ Probemos que el flujo de trabajo todavía funciona como se espera, especificando Ejecute este comando usando `kosh`, una de las opciones más... enigmáticas: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "Salida del comando" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ Para resumir los beneficios de este enfoque: - **Portabilidad**: Los módulos pueden reutilizarse sin opciones de herramientas codificadas - **Sin cambios en el flujo de trabajo**: Agregar o cambiar opciones de herramientas no requiere actualizar el código del flujo de trabajo -!!! note "Nota" +!!! info "Info" El sistema `ext.args` tiene capacidades adicionales poderosas no cubiertas aquí, incluyendo el cambio de valores de argumentos dinámicamente basado en metadatos. Consulte las [especificaciones de módulos nf-core](https://nf-co.re/docs/guidelines/components/modules) para más detalles. @@ -841,15 +841,15 @@ En caso de que se esté preguntando, el closure `ext.prefix` tiene acceso a la p Probemos que el flujo de trabajo todavía funciona como se espera. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ Abra el archivo del módulo `cowpy.nf` (en `core-hello/modules/local/`) y elimin Echemos un vistazo a lo que sucede si ejecutamos el pipeline ahora. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ Ahora el `core-hello-results` también contiene las salidas del módulo `COWPY`. Puede ver que Nextflow creó esta jerarquía de directorios basada en los nombres del flujo de trabajo y del módulo. -!!! note "Nota" +!!! info "Info" Es posible que note `hello_software_versions.yml` en `pipeline_info/`. Actualmente solo contiene información de versión de `FIND_CONCATENATE`, porque `COWPY` aún no reporta su versión. @@ -1098,9 +1098,9 @@ Dicho esto, puede decidir que desea organizar sus entradas de manera diferente, Para sobrescribir la directiva `publishDir` predeterminada, simplemente puede agregar sus propias directivas al archivo `conf/modules.config`. -Por ejemplo, podría sobrescribir el valor predeterminado para un solo proceso usando el selector `withName:`, como en este ejemplo donde agregamos una directiva `publishDir` personalizada para el proceso 'COWPY'. +Por ejemplo, podría sobrescribir el valor predeterminado para un solo proceso usando el selector `withName:`, como en este ejemplo donde agregamos una directiva `publishDir` personalizada para el proceso `COWPY`. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ No se necesitan cambios en el bloque de script — la versión se declara estát #### 1.6.2. Ejecutar el pipeline e inspeccionar el reporte de versiones ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -La recopilación del lado del flujo de trabajo — el bloque `Channel.topic("versions")` que vio en el flujo de trabajo de marcador de posición en la Parte 2 — se suscribe al topic y escribe este reporte combinado automáticamente. +La recopilación del lado del flujo de trabajo — el bloque `channel.topic("versions")` que vio en el flujo de trabajo de marcador de posición en la Parte 2 — se suscribe al topic y escribe este reporte combinado automáticamente. -!!! note "Compatibilidad con versiones anteriores" +!!! info "Compatibilidad con versiones anteriores" La rama `versions_file` en el bloque del topic channel del flujo de trabajo existe para manejar módulos que aún no han sido actualizados para usar `topic: versions` y todavía escriben un archivo `versions.yml` en el bloque de script con `emit: versions`. Ambos estilos son compatibles simultáneamente durante la transición. @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Patrón 1: Tuplas de metadatos ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ El código predeterminado ofrece alternar entre Docker y Singularity, pero vamos === "Antes" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Entorno Conda -Para el entorno Conda, el código del módulo especifica `conda "${moduleDir}/environment.yml"`, lo que significa que debe configurarse en el archivo `environment.yml`. +Para el entorno Conda, el código del módulo especifica `#!groovy conda "${moduleDir}/environment.yml"`, lo que significa que debe configurarse en el archivo `environment.yml`. La herramienta de creación de módulos nos advirtió que no pudo encontrar el paquete `cowpy` en Bioconda (el canal principal para herramientas de bioinformática). Sin embargo, `cowpy` está disponible en conda-forge, por lo que puede completar el `environment.yml` así: @@ -1428,7 +1431,7 @@ Actualice los bloques de entrada y salida: === "Después" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Actualice los bloques de entrada y salida: === "Antes" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` Esto especifica: @@ -1453,6 +1456,7 @@ Esto especifica: - El nombre del parámetro del archivo de entrada (`input_file` en lugar del genérico `input`) - El nombre del archivo de salida usando el patrón de prefijo configurable (`#!groovy ${prefix}.txt` en lugar del comodín `*`) - Un nombre de emit descriptivo (`cowpy_output` en lugar del genérico `output`) +- Una cadena de versión estática (`#!groovy val("1.1.5")`) en lugar del `#!groovy eval("cowpy --version")` de la plantilla, que coincide con el módulo manual de la sección 1.6 (la herramienta `cowpy` no expone un flag `--version`) Si está usando el servidor de lenguaje Nextflow para validar la sintaxis, la parte `#!groovy ${prefix}` será marcada como error en esta etapa porque aún no la hemos agregado al bloque de script. Pasemos a eso ahora. @@ -1517,7 +1521,7 @@ No se preocupe demasiado si esto parece misterioso; lo incluimos por completitud === "Antes" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1576,15 +1580,15 @@ Todo lo que necesitamos hacer para probar esta nueva versión del módulo `COWPY Ejecutemos el pipeline para probarlo. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Salida del comando" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1611,10 +1615,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/es/docs/hello_nf-core/05_input_validation.md b/docs/es/docs/hello_nf-core/05_input_validation.md index 5bab877b85..c02ceb9be6 100644 --- a/docs/es/docs/hello_nf-core/05_input_validation.md +++ b/docs/es/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ En esta quinta parte del curso de entrenamiento Hello nf-core, le mostramos cóm Puede probar que se ejecuta correctamente ejecutando el siguiente comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema es el sucesor del plugin nf-validation obsoleto y utiliza el estándar ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ Ahora apliquemos estos principios en la práctica, comenzando con la validación Comencemos agregando validación de parámetros a nuestro pipeline. Esto valida flags de línea de comandos como `--input`, `--outdir` y `--batch`. -### 1.1. Configurar la validación para omitir la validación de archivos de entrada +### 1.1. Habilitar la validación y omitir la validación de archivos de entrada La plantilla de pipeline nf-core viene con nf-schema ya instalado y configurado: - El plugin nf-schema se instala mediante el bloque `plugins{}` en `nextflow.config` -- La validación de parámetros está habilitada por defecto mediante `params.validate_params = true` +- La validación de parámetros se controla mediante `params.validate_params` - La validación se realiza mediante el subworkflow `UTILS_NFSCHEMA_PLUGIN` durante la inicialización del pipeline -El comportamiento de validación se controla a través del alcance `validation{}` en `nextflow.config`. +En las Partes 3 y 4 establecimos `validate_params = false` para que el pipeline pudiera ejecutarse antes de haber configurado ningún schema. +Ahora que estamos listos para agregar validación, el primer paso es activarla. -Dado que trabajaremos primero en la validación de parámetros (esta sección) y no configuraremos el schema de datos de entrada hasta la sección 2, necesitamos decirle temporalmente a nf-schema que omita la validación del contenido del archivo del parámetro `input`. +Abra `nextflow.config` y encuentre el parámetro `validate_params` (alrededor de la línea 37), y establézcalo en `true`: -Abra `nextflow.config` y encuentre el bloque `validation` (alrededor de la línea 247). Agregue `ignoreParams` para omitir la validación del archivo de entrada: +=== "Después" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "Antes" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +El comportamiento de validación en sí se controla a través del alcance `validation{}` en `nextflow.config`. + +Dado que trabajaremos primero en la validación de parámetros (esta sección) y no configuraremos el schema de datos de entrada hasta la sección 2, también necesitamos decirle temporalmente a nf-schema que omita la validación del contenido del archivo del parámetro `input`. + +Encuentre el bloque `validation` (alrededor de la línea 252) y agregue `ignoreParams` para omitir la validación del archivo de entrada: === "Después" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ Abra `nextflow.config` y encuentre el bloque `validation` (alrededor de la líne === "Antes" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ Esta configuración le dice a nf-schema que: - **`ignoreParams`**: Omita la validación del contenido del archivo del parámetro `input` (temporal; volveremos a habilitar esto en la sección 2) - **`monochromeLogs`**: Deshabilite la salida coloreada en mensajes de validación cuando esté establecido en `true` (controlado por `params.monochrome_logs`) -!!! note "¿Por qué ignorar el parámetro input?" +!!! info "¿Por qué ignorar el parámetro input?" El parámetro `input` en `nextflow_schema.json` tiene `"schema": "assets/schema_input.json"` que le dice a nf-schema que valide el *contenido* del archivo CSV de entrada contra ese schema. Dado que aún no hemos configurado ese schema, omitimos temporalmente esta validación. @@ -263,7 +280,7 @@ Debería ver algo como esto: | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -Debería ver que el parámetro `batch` se ha agregado al schema con el campo "required" ahora mostrando `["input", "outdir", "batch"]`. +Debería ver que el parámetro `batch` se ha agregado al schema con el campo `required` ahora mostrando `["input", "outdir", "batch"]`. ### 1.5. Probar la validación de parámetros @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ Abra `nextflow.config` y elimine la línea `ignoreParams` del bloque `validation === "Después" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ Abra `nextflow.config` y elimine la línea `ignoreParams` del bloque `validation === "Antes" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ Verifiquemos que nuestra validación funciona probando tanto entradas válidas c #### 2.7.1. Probar con entrada válida Primero, confirme que el pipeline se ejecuta correctamente con entrada válida. -¡Note que ya no necesitamos `--validate_params false` ya que la validación está funcionando! +Con `validate_params = true` y el schema de entrada en su lugar, tanto la validación de parámetros como la de datos de entrada ahora se ejecutan de verdad. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/es/docs/info/nxf_versions.md b/docs/es/docs/info/nxf_versions.md index eb09b02b06..8890174825 100644 --- a/docs/es/docs/info/nxf_versions.md +++ b/docs/es/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: A partir de la versión 3.0 del portal de capacitación, todos nuestros cursos de capacitación son compatibles con Nextflow versión 25.10.2 o posterior, a menos que se especifique lo contrario en la página de índice del curso. (Esto no incluye los materiales obsoletos o archivados que pueden no incluir un aviso de versión). -La versión de Nextflow cargada por defecto en nuestro entorno de capacitación es **Nextflow 25.10.4**. +La versión de Nextflow cargada por defecto en nuestro entorno de capacitación es **Nextflow 26.04.4**. Debido a que los cursos ahora utilizan entradas tipadas a nivel de workflow, así como directivas de salida a nivel de workflow, requieren el uso del analizador de sintaxis V2, **a menos que se especifique lo contrario**. +El analizador V2 es el predeterminado a partir de Nextflow 26.04 en adelante, por lo que en la versión que cargamos no necesitas habilitarlo manualmente. Si planeas usar el entorno que proporcionamos a través de [Github Codespaces](../envsetup/01_setup.md) o [devcontainers locales](../envsetup/03_devcontainer.md), no necesitas hacer nada a menos que se indique específicamente en las instrucciones del curso. -Sin embargo, si planeas trabajar en las capacitaciones en tu propio entorno ([Instalación manual](../envsetup/02_local.md)), deberás asegurarte de usar Nextflow versión 25.10.2 o posterior con el analizador de sintaxis v2 habilitado. +Sin embargo, si planeas trabajar en las capacitaciones en tu propio entorno ([Instalación manual](../envsetup/02_local.md)), deberás asegurarte de usar Nextflow versión 25.10.2 o posterior, y de habilitar el analizador de sintaxis v2 si estás usando una versión anterior a 26.04. ## Versiones anteriores de los materiales de capacitación @@ -40,7 +41,7 @@ Todo el código moderno de Nextflow usa DSL2. El analizador v1 es el original, más permisivo. El analizador v2 es más estricto y habilita nuevas características del lenguaje como tipado estático (entradas y salidas tipadas) y directivas de salida a nivel de workflow. El analizador v2 también proporciona mejores mensajes de error y detecta más errores en tiempo de análisis en lugar de en tiempo de ejecución. -El analizador v2 se convertirá en el predeterminado en Nextflow 26.04. +El analizador v2 es el predeterminado a partir de Nextflow 26.04 en adelante. En resumen: DSL2 es el lenguaje que escribes; la versión del analizador de sintaxis determina qué tan estrictamente se interpreta ese lenguaje y qué características avanzadas están disponibles. @@ -52,21 +53,22 @@ Para más información sobre cómo actualizar tu versión de Nextflow, consulta ### Habilitar el analizador de sintaxis v2 +A partir de Nextflow 26.04 en adelante, el analizador v2 es el predeterminado, por lo que los pasos a continuación solo son necesarios en versiones anteriores a 26.04. + Para **habilitar** el analizador de sintaxis v2 para tu sesión actual, ejecuta el siguiente comando en tu terminal: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Para hacer esto permanente (mientras v2 se convierte en el predeterminado en Nextflow 26.04), agrega el comando export a tu perfil de shell (`~/.bashrc`, `~/.zshrc`, etc.): +Para hacer esto permanente, agrega el comando export a tu perfil de shell (`~/.bashrc`, `~/.zshrc`, etc.): ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -Ten en cuenta que la variable de entorno `NXF_SYNTAX_PARSER=v2` es un requisito temporal. -A partir de Nextflow 26.04 en adelante, el analizador v2 se convertirá en el predeterminado y esta configuración ya no será necesaria. +Ten en cuenta que en versiones de Nextflow anteriores a 26.04, la variable de entorno `NXF_SYNTAX_PARSER=v2` es necesaria para acceder a las características de v2 utilizadas en estos cursos. ### Deshabilitar el analizador de sintaxis v2 diff --git a/docs/es/docs/nextflow_run/01_basics.md b/docs/es/docs/nextflow_run/01_basics.md index bd6f3f83b8..3c3ffc4df9 100644 --- a/docs/es/docs/nextflow_run/01_basics.md +++ b/docs/es/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "Salida del comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Si su salida de consola se ve algo así, ¡felicidades, acaba de ejecutar su primer workflow de Nextflow! @@ -115,19 +121,20 @@ Si su salida de consola se ve algo así, ¡felicidades, acaba de ejecutar su pri Esto se mencionó al inicio del curso, pero tal vez lo pasó por alto. Consulte el material de ayuda [Versiones de Nextflow](../info/nxf_versions.md). - En resumen, si está usando Nextflow `25.10` entonces necesita habilitar el analizador de lenguaje v2: + El analizador v2 es el predeterminado a partir de Nextflow 26.04 en adelante, por lo que solo verá esto en versiones anteriores. + En una versión anterior a 26.04 necesita habilitar el analizador de lenguaje v2: ```bash export NXF_SYNTAX_PARSER=v2 ``` -La salida más importante aquí es la última línea, que está resaltada en la salida anterior: +La parte más importante aquí es la línea resaltada: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ ``` -Esto nos dice que el process `sayHello` fue ejecutado exitosamente una vez (`1 of 1 ✔`). +Esto nos dice que el proceso `sayHello` fue ejecutado exitosamente una vez (`1 of 1 ✔`). Genial, pero puede estar preguntándose: ¿dónde está la salida? @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` Debería ver que sus salidas ahora se publican en un directorio llamado `hello_results` en lugar de `results`: @@ -196,7 +209,7 @@ Ahora vamos a echar un vistazo bajo el capó para ver dónde ejecutó Nextflow r ### 2.4. Encontrar la salida original y los registros en el directorio `work/` -Cuando ejecuta un workflow, Nextflow crea un 'directorio de tarea' distinto para cada invocación individual de cada process en el workflow (=cada paso en el pipeline). +Cuando ejecuta un workflow, Nextflow crea un 'directorio de tarea' distinto para cada invocación individual de cada proceso en el workflow (=cada paso en el pipeline). Para cada uno, preparará las entradas necesarias, ejecutará la(s) instrucción(es) relevante(s) y escribirá las salidas y archivos de registro dentro de ese único directorio, que se nombra automáticamente usando un hash para hacerlo único. Todos estos directorios de tareas vivirán bajo un directorio llamado `work` dentro de su directorio actual (donde está ejecutando el comando). @@ -206,11 +219,11 @@ Eso puede sonar confuso, así que veamos cómo se ve en la práctica. Volviendo a la salida de consola del workflow que ejecutamos antes, teníamos esta línea: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` ¿Ve cómo la línea comienza con `[a3/1e1535]`? -Esa es una forma truncada de la ruta del directorio de tarea para esa llamada de process, y le dice dónde encontrar la salida de la llamada del process `sayHello` dentro de la ruta del directorio `work/`. +Esa es una forma truncada de la ruta del directorio de tarea para esa llamada de proceso, y le dice dónde encontrar la salida de la llamada del proceso `sayHello` dentro de la ruta del directorio `work/`. Puede encontrar la ruta completa escribiendo el siguiente comando (reemplazando `a3/1e1535` con lo que ve en su propia terminal) y presionando la tecla tab para autocompletar la ruta o agregando un asterisco: @@ -261,9 +274,9 @@ Veamos qué hay ahí. Hay dos conjuntos de directorios en `work/`, de las dos ejecuciones diferentes del pipeline que hemos hecho. Cada ejecución de tarea obtiene su propio directorio aislado para trabajar. -En este caso el pipeline hizo lo mismo ambas veces, así que los contenidos de cada directorio de tarea son idénticos +En este caso el pipeline hizo lo mismo ambas veces, así que los contenidos de cada directorio de tarea son idénticos. -Debería reconocer inmediatamente el archivo `output.txt`, que es de hecho la salida original del process `sayHello` que se publicó en el directorio `results`. +Debería reconocer inmediatamente el archivo `output.txt`, que es de hecho la salida original del proceso `sayHello` que se publicó en el directorio `results`. Si lo abre, encontrará el saludo `Hello World!` nuevamente. ```console title="work/a3/1e153543b0a7f9d2c4735ddb4ab231/output.txt" @@ -275,11 +288,11 @@ Hello World! Estos son los archivos auxiliares y de registro que Nextflow escribió como parte de la ejecución de la tarea: - **`.command.begin`**: Archivo centinela creado tan pronto como se lanza la tarea. -- **`.command.err`**: Mensajes de error (`stderr`) emitidos por la llamada del process -- **`.command.log`**: Salida de registro completa emitida por la llamada del process -- **`.command.out`**: Salida regular (`stdout`) por la llamada del process -- **`.command.run`**: Script completo ejecutado por Nextflow para ejecutar la llamada del process -- **`.command.sh`**: El comando que realmente ejecutó la llamada del process +- **`.command.err`**: Mensajes de error (`stderr`) emitidos por la llamada del proceso +- **`.command.log`**: Salida de registro completa emitida por la llamada del proceso +- **`.command.out`**: Salida regular (`stdout`) por la llamada del proceso +- **`.command.run`**: Script completo ejecutado por Nextflow para ejecutar la llamada del proceso +- **`.command.sh`**: El comando que realmente ejecutó la llamada del proceso - **`.exitcode`**: El código de salida resultante del comando El archivo `.command.sh` es especialmente útil porque le muestra el comando principal que Nextflow ejecutó, sin incluir toda la contabilidad y configuración de tarea/entorno. @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "Salida del comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` La salida de consola debería verse familiar, pero hay una cosa que es un poco diferente comparado con antes. @@ -767,7 +786,7 @@ En la línea de salida de consola `[a3/7be2fa] SAYHELLO | 1 of 1 ✔`, ¿qué re - [x] La ruta truncada al directorio de trabajo de la tarea - [ ] La suma de verificación del archivo de salida -Más información: [2.4. Encontrar la salida original y los registros en el directorio `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +Más información: [2.3. Encontrar la salida original y los registros en el directorio `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ Más información: [2.4. Encontrar la salida original y los registros en el dire - [ ] Contiene mensajes de error de tareas fallidas - [ ] Lista los archivos de entrada preparados para la tarea -Más información: [2.4. Encontrar la salida original y los registros en el directorio `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +Más información: [2.3. Encontrar la salida original y los registros en el directorio `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ Más información: [2.4. Encontrar la salida original y los registros en el dire - [ ] Nextflow previene la sobrescritura y falla - [ ] Son respaldados automáticamente -Más información: [2.5. Re-ejecutar el workflow con diferentes saludos](#24-re-run-the-workflow-with-different-greetings) +Más información: [2.4. Re-ejecutar el workflow con diferentes saludos](#24-re-run-the-workflow-with-different-greetings) ¿Qué indica esta salida de consola? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] La tarea falló y fue omitida diff --git a/docs/es/docs/nextflow_run/02_pipeline.md b/docs/es/docs/nextflow_run/02_pipeline.md index 2ffd0f8011..f6eedb13b0 100644 --- a/docs/es/docs/nextflow_run/02_pipeline.md +++ b/docs/es/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Emocionantemente, esto parece indicar que se hicieron '3 of 3' llamadas para el process, lo cual es alentador, ya que había tres filas de datos en el CSV que proporcionamos como entrada. @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "Salida del comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Esta vez vemos las tres ejecuciones de process y sus subdirectorios de trabajo asociados listados en la salida. @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "Salida del comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` Puede ver que como se prometió, se ejecutaron múltiples pasos como parte del workflow; los primeros dos (`sayHello` y `convertToUpper`) presumiblemente se ejecutaron en cada saludo individual, y el tercero (`collectGreetings`) se habrá ejecutado solo una vez, en las salidas de las tres llamadas `convertToUpper`. @@ -670,13 +706,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "Salida del comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` Debería ver nuevas salidas finales nombradas con su nombre de lote personalizado. @@ -921,13 +975,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` Notará que las ejecuciones de process todas se almacenaron en caché exitosamente, lo que significa que Nextflow reconoció que ya ha hecho el trabajo solicitado, aunque el código se haya dividido y el archivo principal del workflow se haya renombrado. @@ -1075,20 +1147,20 @@ Puede ver que el sistema de archivos dentro del contenedor es diferente del sist Desde dentro del contenedor, puede ejecutar el comando `cowpy` directamente. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "Salida del comando" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` Esto produce arte ASCII del personaje de vaca predeterminado (o 'cowacter') con un globo de diálogo que contiene el texto que especificamos. @@ -1097,22 +1169,22 @@ Ahora que ha probado el uso básico, puede intentar darle algunos parámetros. Por ejemplo, la documentación de la herramienta dice que podemos establecer el personaje con `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Salida del comando" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1298,15 +1370,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` Los primeros tres pasos se almacenaron en caché ya que los hemos ejecutado antes, pero el process `cowpy` es nuevo así que realmente se ejecuta. diff --git a/docs/es/docs/nextflow_run/03_config.md b/docs/es/docs/nextflow_run/03_config.md index af258bc3cc..3cc84c92b6 100644 --- a/docs/es/docs/nextflow_run/03_config.md +++ b/docs/es/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` Esto todavía produce la misma salida que anteriormente. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` Esto creará un nuevo conjunto de directorios bajo `tux-run/` incluyendo `tux-run/work/` y `tux-run/results/`. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` El archivo de salida final debería contener el personaje stegosaurus diciendo los saludos. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` Esto todavía produce la misma salida que anteriormente, excepto que esta vez encontramos nuestras salidas bajo `results_config/outdir/`. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` Esto todavía produce la misma salida que anteriormente, excepto que esta vez encontramos nuestras salidas bajo `results_config/pnames/`, y están agrupadas por process. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` Esto todavía produce la misma salida que anteriormente, excepto que esta vez encontramos nuestras salidas bajo `results_config/outmode/`. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "Salida del comando" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` Esto debería funcionar sin problemas y producir las mismas salidas que anteriormente bajo `results_config/conda`. @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` Como puede ver, esto nos permite alternar entre configuraciones muy convenientemente en tiempo de ejecución. @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` Esto usará Docker donde sea posible y producirá salidas bajo `results_config/test`, y esta vez el personaje es el dúo cómico `dragonandcow`. @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/es/docs/nf4_science/_template/02_single_sample.md b/docs/es/docs/nf4_science/_template/02_single_sample.md index 94c32e80b4..782450842a 100644 --- a/docs/es/docs/nf4_science/_template/02_single_sample.md +++ b/docs/es/docs/nf4_science/_template/02_single_sample.md @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/es/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/es/docs/nf4_science/genomics/02_per_sample_variant_calling.md index c33bb0e7d9..902a3d8812 100644 --- a/docs/es/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/es/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` Puedes verificar que el archivo de índice se haya generado correctamente mirando en el directorio de trabajo o en el directorio de resultados. @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` Ahora si miramos la salida de la consola, vemos los dos procesos listados. @@ -891,13 +911,32 @@ Algo curioso: esto _podría funcionar_, O _podría fallar_. Por ejemplo, aquí h ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Si tu ejecución del workflow tuvo éxito, ejecútalo nuevamente hasta que obtengas un error como este: @@ -905,9 +944,9 @@ Si tu ejecución del workflow tuvo éxito, ejecútalo nuevamente hasta que obten ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ Esta vez (y cada vez) todo debería ejecutarse correctamente: ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` El directorio de resultados ahora contiene tanto archivos BAM como BAI para cada muestra (de la tupla), junto con las salidas VCF: @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Esto debería producir el mismo resultado que antes. Nuestro workflow simple de llamado de variantes ahora tiene todas las características básicas que queríamos. diff --git a/docs/es/docs/nf4_science/genomics/03_joint_calling.md b/docs/es/docs/nf4_science/genomics/03_joint_calling.md index aa4b55eca0..5a73b59e16 100644 --- a/docs/es/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/es/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` La salida de Nextflow se ve igual que antes, pero los archivos `.g.vcf` y sus archivos de índice ahora están organizados en subdirectorios. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` Los primeros dos pasos están en caché de la ejecución anterior, y el nuevo paso `GATK_JOINTGENOTYPING` se ejecuta una vez en las entradas recolectadas de las tres muestras. diff --git a/docs/es/docs/nf4_science/imaging/01_basics.md b/docs/es/docs/nf4_science/imaging/01_basics.md index 978110a87a..1d07297b48 100644 --- a/docs/es/docs/nf4_science/imaging/01_basics.md +++ b/docs/es/docs/nf4_science/imaging/01_basics.md @@ -20,12 +20,12 @@ nextflow run hello-world.nf --greeting 'Hello World!' La salida de su consola debería verse algo así: ```console title="Output" linenums="1" - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` ¡Felicidades, acaba de ejecutar su primer workflow de Nextflow! @@ -33,7 +33,7 @@ executor > local (1) La salida más importante aquí es la última línea (línea 6): ```console title="Output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Esto nos dice que el proceso `sayHello` fue ejecutado exitosamente una vez (`1 of 1 ✔`). @@ -83,20 +83,20 @@ Eso puede sonar confuso, así que veamos cómo se ve eso en la práctica. Volviendo a la salida de la consola para el workflow que ejecutamos anteriormente, teníamos esta línea: -```console title="Extracto de la salida del comando" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Excerpt of command output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` -¿Ve cómo la línea comienza con `[a3/7be2fa]`? +¿Ve cómo la línea comienza con `[71/8143bd]`? Esa es una forma truncada de la ruta del directorio de tarea para esa llamada de proceso, y le dice dónde encontrar la salida de la llamada al proceso `sayHello` dentro de la ruta del directorio `work/`. -Puede encontrar la ruta completa escribiendo el siguiente comando (reemplazando `a3/7be2fa` con lo que ve en su propia terminal) y presionando la tecla tab para autocompletar la ruta o agregando un asterisco: +Puede encontrar la ruta completa escribiendo el siguiente comando (reemplazando `71/8143bd` con lo que ve en su propia terminal) y presionando la tecla tab para autocompletar la ruta o agregando un asterisco: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -Esto debería producir la ruta completa del directorio: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +Esto debería producir la ruta completa del directorio: `work/71/8143bd5ed3420e23c5f0dc1a05056d` Echemos un vistazo a lo que hay ahí. @@ -116,8 +116,8 @@ Los nombres exactos de los subdirectorios serán diferentes en su sistema. ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -136,7 +136,7 @@ Si lo abre, encontrará el saludo `Hello World!` nuevamente.
Contenido del archivo output.txt -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,10 +159,9 @@ El archivo `.command.sh` es especialmente útil porque muestra el comando princi
Contenido del archivo -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
@@ -357,14 +356,14 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Busque el bit `cached:` que se ha agregado en la línea de estado del proceso (línea 5), lo que significa que Nextflow ha reconocido que ya ha hecho este trabajo y simplemente reutilizó el resultado de la ejecución exitosa anterior. +Busque el bit `cached:` que se ha agregado en la línea de estado del proceso, lo que significa que Nextflow ha reconocido que ya ha hecho este trabajo y simplemente reutilizó el resultado de la ejecución exitosa anterior. También puede ver que el hash del subdirectorio de trabajo es el mismo que en la ejecución anterior. Nextflow literalmente le está señalando la ejecución anterior y diciendo "Ya hice eso allí". diff --git a/docs/es/docs/nf4_science/imaging/02_run_molkart.md b/docs/es/docs/nf4_science/imaging/02_run_molkart.md index 2e71282750..e29ce77c52 100644 --- a/docs/es/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/es/docs/nf4_science/imaging/02_run_molkart.md @@ -64,32 +64,40 @@ Esto crea un directorio `molkart/` que contiene el código fuente completo del p Típicamente, ejecutaría pipelines de nf-core directamente desde GitHub usando `nextflow run nf-core/molkart -r 1.2.0`. Nextflow descarga automáticamente la versión del pipeline solicitada para usted en `$HOME/.nextflow/assets/nf-core/molkart` y lo ejecuta desde allí. - Sin embargo, para este entrenamiento, estamos clonando el pipeline a un directorio local diferente para que podamos inspeccionar el código más fácilmente. + Sin embargo, para esta capacitación, estamos clonando el pipeline a un directorio local diferente para que podamos inspeccionar el código más fácilmente. ### 2.1. Comprender los requisitos de contenedores Antes de ejecutar el pipeline completo, aprendamos por qué los contenedores son esenciales para los pipelines de nf-core. -Intentemos ejecutar el pipeline usando el conjunto de datos de prueba y los parámetros de la configuración de prueba de molkart: +Proporcionaremos los parámetros del pipeline usando un archivo de parámetros. +Un archivo de parámetros es un archivo YAML que lista cada parámetro y su valor, lo que mantiene los valores tipados (como los enteros) intactos y mantiene la línea de comandos corta. -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +Ya se proporciona un archivo `params.yaml` en el directorio de trabajo: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` -Desglosemos estos parámetros: +Estos parámetros son: + +- `input`: Ruta a la hoja de muestras que contiene metadatos de muestras +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: Parámetros para el relleno de patrón de cuadrícula +- `clahe_pyramid_tile`: Tamaño del kernel para mejora de contraste +- `segmentation_method`: Qué algoritmo(s) usar para la segmentación celular +- `outdir`: Dónde guardar los resultados + +Intentemos ejecutar el pipeline usando estos parámetros: -- `--input`: Ruta a la hoja de muestras que contiene metadatos de muestras -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: Parámetros para el relleno de patrón de cuadrícula -- `--clahe_pyramid_tile`: Tamaño del kernel para mejora de contraste -- `--segmentation_method`: Qué algoritmo(s) usar para la segmentación celular -- `--outdir`: Dónde guardar los resultados +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "¡Este comando fallará - eso es intencional!" @@ -172,17 +180,10 @@ process { } ``` -Ahora ejecute el pipeline nuevamente con el mismo comando: +Ahora ejecute el pipeline nuevamente, esta vez ejecutando los tres métodos de segmentación para poder compararlos más adelante: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` Esta vez, Nextflow: @@ -209,12 +210,13 @@ Mientras se ejecuta el pipeline, verá una salida similar a esta: ??? success "Salida del comando" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ Mientras se ejecuta el pipeline, verá una salida similar a esta: |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ Mientras se ejecuta el pipeline, verá una salida similar a esta: https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,10 +300,10 @@ La línea del executor `executor > local (22)` le dice: Cada línea de proceso muestra: -- **Hash** (`[1a/2b3c4d]`): Identificador del directorio de trabajo (como antes) +- **Hash** (`[b4/e57ff1]`): Identificador del directorio de trabajo (como antes) - **Nombre del proceso**: Ruta completa del módulo y nombre del proceso - **Identificador de entrada**: Nombre de muestra entre paréntesis -- **Progreso**: Porcentaje completo y conteo (por ejemplo, `1 of 1 ✔`) +- **Progreso**: Conteo de tareas y estado de finalización (por ejemplo, `1 of 1 ✔`) ### Conclusión @@ -372,7 +369,7 @@ El informe incluye: - Métricas de calidad de segmentación - Número de células y puntos detectados -!!! Tip +!!! Tip "Consejo" Los informes MultiQC se incluyen típicamente en todos los pipelines de nf-core. Siempre proporcionan una visión general de alto nivel de la ejecución del pipeline y la calidad de los datos. @@ -426,7 +423,7 @@ Esto muestra: - Uso de CPU y memoria - Qué tareas fueron cacheadas vs. ejecutadas -!!! Tip +!!! Tip "Consejo" Estos informes son increíblemente útiles para optimizar la asignación de recursos y solucionar problemas de rendimiento. @@ -447,7 +444,7 @@ Al igual que con nuestro ejemplo de Hello World, todo el trabajo real ocurre en ### 4.1. Comprender la estructura del directorio de trabajo El directorio de trabajo contiene un subdirectorio para cada tarea que fue ejecutada. -Para este pipeline con 12 tareas, habrá 12 subdirectorios de trabajo. +Para esta ejecución del pipeline con 22 tareas, habrá 22 subdirectorios de trabajo. Liste el directorio de trabajo: @@ -477,7 +474,7 @@ La diferencia clave con Hello World: - Los archivos de salida pueden ser bastante grandes (máscaras de segmentación, imágenes procesadas) - Múltiples archivos de entrada y salida por tarea -!!! Tip +!!! Tip "Consejo" Si un proceso falla, puede navegar a su directorio de trabajo, examinar `.command.err` para mensajes de error e incluso re-ejecutar `.command.sh` manualmente para depurar el problema. @@ -507,7 +504,7 @@ Una de las características más poderosas de Nextflow es la capacidad de reanud Cuando ejecuta un pipeline con `-resume`, Nextflow: 1. Verifica el caché para cada tarea -2. Si las entradas, código y parámetros son idénticos, reutiliza el resultado cacheado +2. Si las entradas, el código y los parámetros son idénticos, reutiliza el resultado cacheado 3. Solo re-ejecuta tareas que cambiaron o fallaron Esto es esencial para pipelines de larga ejecución donde las fallas pueden ocurrir tarde en la ejecución. @@ -517,30 +514,29 @@ Esto es esencial para pipelines de larga ejecución donde las fallas pueden ocur Ejecute el mismo comando nuevamente, pero agregue `-resume`: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -Debería ver una salida como: +Debería ver una salida como: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -Note `cached: 2` o `cached: 1` para cada proceso - ¡nada fue re-ejecutado! +Note la anotación `cached: N` en cada proceso de preprocesamiento y segmentación: esas tareas fueron reutilizadas en lugar de re-ejecutadas. ### 5.3. Cuándo resume es útil @@ -551,7 +547,7 @@ Resume es particularmente valioso cuando: - Su conexión de red se interrumpe durante la descarga de datos - Desea agregar salidas adicionales sin rehacer el cómputo -!!! Warning +!!! Warning "Advertencia" Resume solo funciona si no ha cambiado los datos de entrada, el código del pipeline o los parámetros. Si cambia cualquiera de estos, Nextflow correctamente re-ejecutará las tareas afectadas. diff --git a/docs/es/docs/nf4_science/imaging/03_inputs.md b/docs/es/docs/nf4_science/imaging/03_inputs.md index d378af9bd7..955c4f4b20 100644 --- a/docs/es/docs/nf4_science/imaging/03_inputs.md +++ b/docs/es/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Ahora aprenderemos dos enfoques mejores para gestionar entradas: **archivos de p ### 1.1. El problema con líneas de comandos largas -Recordemos nuestro comando de la Parte 2: +En la Parte 2 ya usamos un archivo de parámetros para mantener el comando corto y conservar los valores escritos (como los parámetros enteros de preprocesamiento) intactos: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -Esto funciona, pero es difícil de reproducir, compartir o modificar. +Pasar muchos parámetros individualmente en la línea de comandos es difícil de reproducir, compartir o modificar. ¿Qué pasa si necesita ejecutar el mismo análisis nuevamente el próximo mes? ¿Qué pasa si un colaborador quiere usar exactamente su configuración? +Un archivo de parámetros resuelve esto. -### 1.2. Solución: Use un archivo de parámetros +### 1.2. El archivo de parámetros -Cree un archivo llamado `params.yaml`: +Este es el archivo `params.yaml` que hemos estado usando: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -Ahora su comando se convierte en: +Cada parámetro se escribe como un par `clave: valor`. +Escribir los enteros sin comillas (por ejemplo `mindagap_tilesize: 90`) preserva su tipo entero, que la validación de parámetros del pipeline requiere. + +Su comando se convierte en: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -¡Eso es todo! El archivo de parámetros documenta su configuración exacta y facilita la reejecución o el compartir. +El archivo de parámetros documenta su configuración exacta y facilita la reejecución o el compartir. ### 1.3. Anulación de parámetros @@ -125,7 +122,7 @@ sample,nuclear_image,spot_table,membrane_image mem_only,data/nuclear.tiff,data/spots.txt,data/membrane.tiff ``` -!!! warning "Advertencia" +!!! Warning "Advertencia" Observe que las rutas en la hoja de muestras son relativas a donde **ejecuta** Nextflow, no a donde se encuentra la hoja de muestras. diff --git a/docs/es/docs/nf4_science/imaging/04_config.md b/docs/es/docs/nf4_science/imaging/04_config.md index 6f617536a2..41c1c92f82 100644 --- a/docs/es/docs/nf4_science/imaging/04_config.md +++ b/docs/es/docs/nf4_science/imaging/04_config.md @@ -131,15 +131,16 @@ Como estamos usando `-resume`, Nextflow verificará si algo cambió desde la úl Si los parámetros, entradas y código son los mismos, todas las tareas se recuperarán de la caché y el pipeline se completará casi instantáneamente. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -¡Observa que todos los procesos muestran `cached: 2` o `cached: 1` - nada fue re-ejecutado! +Observa la anotación `cached: N` en cada proceso - las tareas de preprocesamiento y segmentación almacenadas en caché no fueron re-ejecutadas. ### 2.4. Perfiles de prueba diff --git a/docs/es/docs/nf4_science/rnaseq/02_single-sample.md b/docs/es/docs/nf4_science/rnaseq/02_single-sample.md index eb4693668d..e86799483a 100644 --- a/docs/es/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/es/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` Esto debería ejecutarse muy rápidamente si trabajó en la Parte 1 y ya ha descargado el contenedor. @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` Esto también debería ejecutarse muy rápidamente, ya que estamos ejecutando en un archivo de entrada tan pequeño. @@ -802,10 +831,10 @@ Agregue una declaración de parámetro para el archivo de índice del genoma en ```groovy title="rnaseq.nf" linenums="11" hl_lines="5-6" params { - // Primary input + // Entrada principal input: Path - // Reference genome archive + // Archivo de índice del genoma de referencia hisat2_index_zip: Path } ``` @@ -814,7 +843,7 @@ Agregue una declaración de parámetro para el archivo de índice del genoma en ```groovy title="rnaseq.nf" linenums="11" params { - // Primary input + // Entrada principal input: Path } ``` @@ -850,7 +879,7 @@ Tal como hicimos para `reads` en la sección 1.1.2, agregue un valor predetermin El parámetro está listo; ahora podemos crear el proceso de alineamiento. -### 3.2. Escribir el proceso de alineamiento y llamarlo en el flujo de trabajo +### 3.2. Escribir el proceso de alineamiento y llamarlo en el workflow Como antes, necesitamos completar la definición del proceso, importar el módulo y agregar la llamada al proceso. @@ -866,7 +895,7 @@ Adelante, complete la definición del proceso por su cuenta usando la informaci #!/usr/bin/env nextflow /* - * Align reads to a reference genome + * Alinear lecturas a un genoma de referencia */ process HISAT2_ALIGN { @@ -889,7 +918,7 @@ Adelante, complete la definición del proceso por su cuenta usando la informaci #!/usr/bin/env nextflow /* - * Align reads to a reference genome + * Alinear lecturas a un genoma de referencia */ process HISAT2_ALIGN { @@ -924,7 +953,7 @@ Actualice `rnaseq.nf` para importar el nuevo módulo: === "Después" ```groovy title="rnaseq.nf" linenums="3" hl_lines="4" - // Module INCLUDE statements + // Declaraciones INCLUDE de módulos include { FASTQC } from './modules/fastqc.nf' include { TRIM_GALORE } from './modules/trim_galore.nf' include { HISAT2_ALIGN } from './modules/hisat2_align.nf' @@ -933,12 +962,12 @@ Actualice `rnaseq.nf` para importar el nuevo módulo: === "Antes" ```groovy title="rnaseq.nf" linenums="3" - // Module INCLUDE statements + // Declaraciones INCLUDE de módulos include { FASTQC } from './modules/fastqc.nf' include { TRIM_GALORE } from './modules/trim_galore.nf' ``` -A continuación, agregaremos la llamada al proceso al flujo de trabajo. +A continuación, agregaremos la llamada al proceso al workflow. #### 3.2.3. Llamar al proceso de alineamiento @@ -951,16 +980,16 @@ Usamos `#!groovy file(params.hisat2_index_zip)` para proporcionar el archivo de workflow { main: - // Create input channel from a file path + // Crear canal de entrada desde una ruta de archivo read_ch = channel.fromPath(params.input) - // Initial quality control + // Control de calidad inicial FASTQC(read_ch) - // Adapter trimming and post-trimming QC + // Recorte de adaptadores y control de calidad posterior al recorte TRIM_GALORE(read_ch) - // Alignment to a reference genome + // Alineamiento al genoma de referencia HISAT2_ALIGN(TRIM_GALORE.out.trimmed_reads, file(params.hisat2_index_zip)) ``` @@ -970,17 +999,17 @@ Usamos `#!groovy file(params.hisat2_index_zip)` para proporcionar el archivo de workflow { main: - // Create input channel from a file path + // Crear canal de entrada desde una ruta de archivo read_ch = channel.fromPath(params.input) - // Initial quality control + // Control de calidad inicial FASTQC(read_ch) - // Adapter trimming and post-trimming QC + // Recorte de adaptadores y control de calidad posterior al recorte TRIM_GALORE(read_ch) ``` -El proceso de alineamiento ahora está conectado al flujo de trabajo. +El proceso de alineamiento ahora está conectado al workflow. ### 3.3. Actualizar el manejo de salida @@ -1074,9 +1103,9 @@ Agregue entradas para los destinos de alineamiento en el bloque `output {}`, pub La configuración de salida está completa. -### 3.4. Ejecutar el flujo de trabajo +### 3.4. Ejecutar el workflow -El flujo de trabajo ahora incluye los tres pasos de procesamiento: control de calidad, recorte y alineamiento. +El workflow ahora incluye los tres pasos de procesamiento: control de calidad, recorte y alineamiento. ```bash nextflow run rnaseq.nf -profile test @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` Puede encontrar las salidas de alineamiento en el directorio de resultados. @@ -1107,7 +1161,7 @@ ENCSR000COQ1_1_trimmed.bam ENCSR000COQ1_1_trimmed.hisat2.log Esto completa el procesamiento básico que necesitamos aplicar a cada muestra. -_Agregaremos la agregación de informes MultiQC en la Parte 3, después de que hayamos modificado el flujo de trabajo para aceptar múltiples muestras a la vez._ +_Agregaremos la agregación de informes MultiQC en la Parte 3, después de que hayamos modificado el workflow para aceptar múltiples muestras a la vez._ --- @@ -1119,4 +1173,4 @@ Sabe cómo envolver todos los pasos principales para procesar muestras de RNAseq ¡Tome un descanso! Eso fue mucho. -Cuando se sienta renovado, diríjase a la [Parte 3](./03_multi-sample.md), donde aprenderá cómo modificar el flujo de trabajo para procesar múltiples muestras en paralelo, agregar informes de control de calidad en todos los pasos para todas las muestras y habilitar la ejecución del flujo de trabajo en datos de RNAseq de extremo pareado. +Cuando se sienta renovado, diríjase a la [Parte 3](./03_multi-sample.md), donde aprenderá cómo modificar el workflow para procesar múltiples muestras en paralelo, agregar informes de control de calidad en todos los pasos para todas las muestras y habilitar la ejecución del workflow en datos de RNAseq de extremo pareado. diff --git a/docs/es/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/es/docs/nf4_science/rnaseq/03_multi-sample.md index 2bd7ef61d3..8423b01ced 100644 --- a/docs/es/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/es/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "Salida del comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` Esta vez cada paso se ejecuta 6 veces, una vez para cada muestra en el archivo CSV. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` Una sola llamada a MULTIQC se ha agregado después de las llamadas a procesos en caché. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -575,18 +701,18 @@ Adaptar el flujo de trabajo para manejar datos de RNAseq de extremos pareados. ## 3. Habilitar el procesamiento de datos de RNAseq de extremos pareados -Actualmente nuestro flujo de trabajo solo puede manejar datos de RNAseq de un solo extremo. +Actualmente nuestro workflow solo puede manejar datos de RNAseq de un solo extremo. Es cada vez más común ver datos de RNAseq de extremos pareados, así que queremos poder manejar eso. -Hacer que el flujo de trabajo sea completamente agnóstico del tipo de datos requeriría usar características del lenguaje Nextflow un poco más avanzadas, así que no vamos a hacerlo aquí, pero podemos hacer una versión de procesamiento de extremos pareados para demostrar qué necesita ser adaptado. +Hacer que el workflow sea completamente agnóstico del tipo de datos requeriría usar características del lenguaje Nextflow un poco más avanzadas, así que no vamos a hacerlo aquí, pero podemos hacer una versión de procesamiento de extremos pareados para demostrar qué necesita ser adaptado. -### 3.1. Copiar el flujo de trabajo y actualizar las entradas +### 3.1. Copiar el workflow y actualizar las entradas -Comenzamos copiando el archivo del flujo de trabajo de un solo extremo y actualizándolo para datos de extremos pareados. +Comenzamos copiando el archivo del workflow de un solo extremo y actualizándolo para datos de extremos pareados. -#### 3.1.1. Copiar el archivo del flujo de trabajo +#### 3.1.1. Copiar el archivo del workflow -Cree una copia del archivo del flujo de trabajo para usar como punto de partida para la versión de extremos pareados. +Cree una copia del archivo del workflow para usar como punto de partida para la versión de extremos pareados. ```bash cp rnaseq.nf rnaseq_pe.nf @@ -726,7 +852,7 @@ Este módulo necesita cambios más sustanciales: - La entrada cambia de una sola ruta a una tupla de dos rutas - El comando agrega la bandera `--paired` y toma ambos archivos de lectura -- La salida cambia para reflejar las convenciones de nomenclatura diferentes de Trim Galore para extremos pareados, produciendo reportes FastQC separados para cada archivo de lectura +- La salida cambia para reflejar las convenciones de nomenclatura de extremos pareados de Trim Galore, produciendo reportes FastQC separados para cada archivo de lectura === "Después" @@ -953,9 +1079,9 @@ Actualice las entradas correspondientes en el bloque `output {}`: } ``` -El flujo de trabajo de extremos pareados ahora está completamente actualizado y listo para ejecutar. +El workflow de extremos pareados ahora está completamente actualizado y listo para ejecutar. -### 3.7. Ejecutar el flujo de trabajo +### 3.7. Ejecutar el workflow No usamos `-resume` ya que esto no usaría la caché, y hay el doble de datos para procesar que antes, pero aún así debería completarse en menos de un minuto. @@ -966,25 +1092,97 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "Salida del comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` -Ahora tenemos dos versiones ligeramente divergentes de nuestro flujo de trabajo, una para datos de lecturas de un solo extremo y una para datos de extremos pareados. -El siguiente paso lógico sería hacer que el flujo de trabajo acepte cualquier tipo de datos sobre la marcha, lo cual está fuera del alcance de este curso, pero podríamos abordar eso en un seguimiento. +Ahora tenemos dos versiones ligeramente divergentes de nuestro workflow, una para datos de lecturas de un solo extremo y una para datos de extremos pareados. +El siguiente paso lógico sería hacer que el workflow acepte cualquier tipo de datos sobre la marcha, lo cual está fuera del alcance de este curso, pero podríamos abordar eso en un seguimiento. --- ### Conclusión -Usted sabe cómo adaptar un flujo de trabajo de una sola muestra para paralelizar el procesamiento de múltiples muestras, generar un reporte de control de calidad completo y adaptar el flujo de trabajo para usar datos de lecturas de extremos pareados. +Usted sabe cómo adaptar un workflow de una sola muestra para paralelizar el procesamiento de múltiples muestras, generar un reporte de control de calidad completo y adaptar el workflow para usar datos de lecturas de extremos pareados. ### ¿Qué sigue? diff --git a/docs/es/docs/side_quests/debugging/index.md b/docs/es/docs/side_quests/debugging/index.md index d940016a66..2a050f70a4 100644 --- a/docs/es/docs/side_quests/debugging/index.md +++ b/docs/es/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. Uso de palabras clave o directivas de proceso incorrectas @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. Uso de nombres de variables incorrectos @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ Si obtienes un error de 'No such variable', puedes corregirlo ya sea definiendo val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // Definir variables en código Groovy antes del script @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Uso incorrecto de variables Bash @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Variables Groovy vs Bash" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` Mantén tus canales de entrada definidos dentro del bloque workflow y, en general, sigue cualquier otra recomendación que haga la extensión. @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -889,7 +889,7 @@ El mensaje de error indica claramente que la llamada esperaba 1 argumento pero r process PROCESS_FILES { input: - val sample_name // El proceso espera solo 1 entrada + val sample_name // El proceso espera solo 1 canal de entrada output: path "${sample_name}_output.txt" @@ -926,7 +926,7 @@ Para este ejemplo específico, el proceso espera un solo canal y no requiere el process PROCESS_FILES { input: - val sample_name // El proceso espera solo 1 entrada + val sample_name // El proceso espera solo 1 canal de entrada output: path "${sample_name}_output.txt" @@ -955,7 +955,7 @@ Para este ejemplo específico, el proceso espera un solo canal y no requiere el process PROCESS_FILES { input: - val sample_name // El proceso espera solo 1 entrada + val sample_name // El proceso espera solo 1 canal de entrada output: path "${sample_name}_output.txt" @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` Más comúnmente que en este ejemplo, podrías agregar entradas adicionales a un proceso y olvidar actualizar la llamada al workflow en consecuencia, lo que puede llevar a este tipo de error. Afortunadamente, este es uno de los errores más fáciles de entender y corregir, ya que el mensaje de error es bastante claro sobre la discrepancia. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "Salida del comando" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` ¡Este workflow se completa sin error, pero solo procesa una muestra! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` Ahora deberías ver las tres muestras siendo procesadas en lugar de solo una. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "Salida del comando" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. Técnicas de depuración de canales @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. Software faltante @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "Salida del comando" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "Nota" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker Examinemos `bad_resources.nf`: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // ERROR: Límite de tiempo poco realista input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -Si te aseguras de leer tus mensajes de error, fallos como este no deberían desconcertarte por mucho tiempo. Pero asegúrate de entender los requisitos de recursos de los comandos que estás ejecutando para poder configurar tus directivas de recursos apropiadamente. +Con el executor `local`, el error es menos explícito que lo que sería con un planificador: obtienes `process hasn't exited` y `WARN: Killing running tasks` en lugar de un mensaje que mencione el límite de tiempo. La conexión que debes hacer es que Nextflow termina una tarea cuando supera los recursos que le asignaste, por lo que cuando un proceso se termina sin un error a nivel de script, revisa sus directivas de recursos. Aquí el culpable es la directiva `time`, que es demasiado baja para el trabajo que realiza el proceso. Asegúrate de entender los requisitos de recursos de los comandos que estás ejecutando para poder configurar tus directivas de recursos apropiadamente. ### 3.4. Técnicas de depuración de procesos @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### Revisar el código @@ -2249,16 +2237,20 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - Este error críptico indica un problema de análisis alrededor de las líneas 11-12 en el bloque `params{}`. El analizador v2 detecta problemas estructurales temprano. + El analizador apunta a la línea 25 (`script:`), pero el verdadero culpable está justo encima: la coma al final después de la declaración `output:` en la línea 23 hace que el analizador espere otra salida, por lo que falla cuando llega a `script:`. Este es el primero de varios errores de sintaxis a resolver. Aplica el método de depuración de cuatro fases que has aprendido: @@ -2300,7 +2292,7 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración ``` ??? solution "Solución" - El `buggy_workflow.nf` contiene 9 o 10 errores distintos (dependiendo de cómo los cuentes) que cubren todas las categorías principales de depuración. Aquí hay un desglose sistemático de cada error y cómo corregirlo. + El `buggy_workflow.nf` contiene 10 errores distintos que cubren todas las categorías principales de depuración. Aquí hay un desglose sistemático de cada error y cómo corregirlo, en el orden en que realmente los encuentras en Nextflow 26.04. El compilador resuelve el workflow en dos pasadas: primero analiza la sintaxis, luego verifica estáticamente que cada variable esté definida. Por lo tanto, primero se corrigen los errores de sintaxis, luego un conjunto de errores de variables no definidas, antes de que el workflow se ejecute y comiencen los errores en tiempo de ejecución. Comencemos con esos errores de sintaxis: @@ -2315,6 +2307,8 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración path "${sample_id}_result.txt" ``` + Con la coma eliminada, el analizador llega al final del archivo buscando la llave que debería cerrar `processFiles` y reporta `Unexpected input: ''`. + **Error 2: Error de sintaxis - Llave de cierre faltante** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración } // Agregar la llave de cierre faltante ``` + Ahora la sintaxis se analiza correctamente, por lo que se ejecuta el verificador de tipos estático. Reporta todas las variables no definidas a la vez, antes de que el workflow se ejecute: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + Estas cuatro líneas corresponden a tres errores distintos: los Errores 3, 4 y 5 a continuación. El último de ellos, `i`, es una variable Bash que el verificador de tipos no puede distinguir de una variable Nextflow, por lo que aparece aquí en tiempo de compilación en lugar de como un fallo en tiempo de ejecución. Corrige los tres antes de volver a ejecutar. + **Error 3: Error de nombre de variable** ```groovy linenums="26" echo "Processing: ${sample}" // ERROR: debería ser sample_id @@ -2348,14 +2353,23 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // ERROR: sample_ids no está definida ``` - **Corrección:** Usa el canal correcto y extrae los IDs de muestra + **Corrección:** Usa el canal correcto ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - En este punto el workflow se ejecutará, pero seguiremos obteniendo errores (por ejemplo, `Path value cannot be null` en `processFiles`), causados por una estructura de canal incorrecta. + **Error 5: Error de escape de variable Bash** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // ERROR: $i parece una variable Nextflow no definida + ``` + **Corrección:** Escapa la variable Bash para que Nextflow la deje para el shell + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + Con esos errores resueltos, el workflow compila y comienza a ejecutarse. El primer error en tiempo de ejecución proviene de `processFiles`, que espera una tupla pero recibe un valor simple: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **Error 5: Error de estructura de canal - Salida de map incorrecta** + **Error 6: Error de estructura de canal - Salida de map incorrecta** ```groovy linenums="83" .map { row -> row.sample_id } // ERROR: processFiles espera una tupla ``` @@ -2364,29 +2378,18 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - Pero esto romperá nuestra corrección para ejecutar `heavyProcess()` arriba, por lo que necesitaremos usar un map para pasar solo los IDs de muestra a ese proceso: + Esto corrige `processFiles`, pero `input_ch` ahora emite una tupla de dos elementos, y `heavyProcess` sigue recibiendo la tupla completa donde espera un valor único. La tupla se renderiza en el script como `[sample_005, /path/sample_005.fastq.gz]`, lo que rompe el comando Bash con un error de sintaxis y un estado de salida 2. - **Error 6: Estructura de canal incorrecta para heavyProcess** + **Error 7: Estructura de canal incorrecta para heavyProcess** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // ERROR: input_ch ahora tiene 2 elementos por emisión - heavyProcess solo necesita 1 (el primero) + heavy_ch = heavyProcess(input_ch) // ERROR: input_ch ahora emite una tupla de 2 elementos; heavyProcess solo necesita el primero ``` - **Corrección:** Usa el canal correcto y extrae los IDs de muestra + **Corrección:** Pasa solo los IDs de muestra ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - Ahora avanzamos un poco más pero recibimos un error sobre `No such variable: i`, porque no escapamos una variable Bash. - - **Error 7: Error de escape de variable Bash** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // ERROR: $i no está escapado - ``` - **Corrección:** Escapa la variable bash - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - Ahora obtenemos `Process exceeded running time limit (1ms)`, por lo que corregimos el límite de tiempo de ejecución para el proceso relevante: + Ahora `heavyProcess` se ejecuta, pero alcanza su límite de tiempo. En el executor `local`, el mensaje es `process hasn't exited` (junto con un mensaje `WARN: Killing running tasks`) en lugar de un timeout explícito, así que relaciona la tarea cancelada con su directiva `time`: **Error 8: Error de configuración de recursos** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración time '100 s' ``` - A continuación tenemos un error de `Missing output file(s)` que resolver: + A continuación tenemos un error de `Missing output file(s)` que resolver, porque el script escribe `${sample_id}.txt` pero la declaración de salida espera `${sample_id}_heavy.txt`: **Error 9: Discrepancia en el nombre del archivo de salida** ```groovy linenums="49" @@ -2408,18 +2411,19 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración done > ${sample_id}_heavy.txt ``` - Los primeros dos procesos se ejecutaron, pero no el tercero. + El workflow ahora se completa sin errores, pero la salida `files` está vacía: `handleFiles` nunca se ejecutó. Su canal de entrada, `channel.fromPath("*.txt")`, no coincide con ningún archivo en el directorio de lanzamiento, por lo que el proceso simplemente se omite en lugar de fallar explícitamente. - **Error 10: Discrepancia en el nombre del archivo de salida** + **Error 10: Fuente de canal incorrecta** ```groovy linenums="88" - file_ch = handleFiles(heavy_ch) + file_ch = channel.fromPath("*.txt") // Error: intenta tomar la entrada del directorio actual en lugar de un proceso + handleFiles(file_ch) ``` **Corrección:** Toma la salida del proceso anterior ```groovy linenums="88" file_ch = handleFiles(heavy_ch) ``` - Con eso, el workflow completo debería ejecutarse. + Con eso, el workflow completo se ejecuta de principio a fin y las tres salidas están pobladas. **Workflow corregido completo:** ```groovy linenums="1" @@ -2470,7 +2474,7 @@ Ahora es el momento de poner en práctica el enfoque sistemático de depuración script: """ # Simular cómputo intensivo - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/es/docs/side_quests/dev_environment/index.md b/docs/es/docs/side_quests/dev_environment/index.md index 013a64b2d9..44b7e6ce9a 100644 --- a/docs/es/docs/side_quests/dev_environment/index.md +++ b/docs/es/docs/side_quests/dev_environment/index.md @@ -5,6 +5,7 @@ :material-information-outline:{ .ai-translation-notice-icon } Traducción asistida por IA - [más información y sugerencias](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) + Los Entornos de Desarrollo Integrados (IDEs) modernos pueden transformar radicalmente su experiencia de desarrollo con Nextflow. Esta misión secundaria se enfoca específicamente en aprovechar VS Code y su extensión de Nextflow para escribir código más rápido, detectar errores temprano y navegar workflows complejos de manera eficiente. !!! note "Esto no es un tutorial tradicional" @@ -77,7 +78,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "Sobre los archivos de ejemplo" @@ -102,7 +103,7 @@ Si usa una Mac, algunos (no todos) los atajos de teclado usarán "cmd" en lugar Para instalar la extensión manualmente: 1. Abra VS Code -2. Vaya a la vista de Extensiones haciendo clic en el ícono de extensiones a la izquierda: ![ícono de extensiones](../img/extensions_icon.png) (atajo `Ctrl/Cmd+Shift+X` si está ejecutando VSCode localmente) +2. Vaya a la vista de Extensiones haciendo clic en el ícono de extensiones a la izquierda: ![ícono de extensiones](../img/extensions_icon.png) (atajo `Ctrl/Cmd+Shift+X` si está ejecutando VS Code localmente) 3. Busque "Nextflow" 4. Instale la extensión oficial de Nextflow @@ -307,7 +308,7 @@ La navegación eficiente es crucial cuando se trabaja con workflows complejos qu } ``` -### 4.1. Ir a la definición +### 4.1. Ir a la Definición Si pasa el cursor sobre el nombre de un proceso como `FASTQC`, verá una ventana emergente con la interfaz del módulo (entradas y salidas): @@ -332,9 +333,9 @@ Ahora exploremos la navegación en un workflow más complejo usando `complex_wor 5. Navegue hacia atrás nuevamente 6. Navegue al proceso `TRIM_GALORE` en el bloque del workflow. Este está definido en línea, por lo que no lo llevará a un archivo separado, pero aún le mostrará la definición del proceso y podrá navegar de vuelta a donde estaba. -### 4.2. Navegación de símbolos +### 4.2. Navegación de Símbolos -Con `complex_workflow.nf` aún abierto, puede obtener una descripción general de todos los símbolos en el archivo escribiendo `@` en la barra de búsqueda en la parte superior de VSCode (el atajo de teclado es `Ctrl/Cmd+Shift+O`, pero puede que no funcione en Codespaces). Esto abre el panel de navegación de símbolos, que lista todos los símbolos en el archivo actual: +Con `complex_workflow.nf` aún abierto, puede obtener una descripción general de todos los símbolos en el archivo escribiendo `@` en la barra de búsqueda en la parte superior de VS Code (el atajo de teclado es `Ctrl/Cmd+Shift+O`, pero puede que no funcione en Codespaces). Esto abre el panel de navegación de símbolos, que lista todos los símbolos en el archivo actual: ![Navegación de símbolos](../img/symbols.png) @@ -346,7 +347,7 @@ Esto muestra: Comience a escribir para filtrar los resultados. -### 4.3. Buscar todas las referencias +### 4.3. Buscar Todas las Referencias Comprender dónde se usa un proceso o variable en toda su base de código puede ser muy útil. Por ejemplo, si desea encontrar todas las referencias al proceso `FASTQC`, comience navegando a su definición. Puede hacerlo abriendo `modules/fastqc.nf` directamente, o usando la característica de navegación rápida de VS Code con `Ctrl/Cmd+clic` como hicimos anteriormente. Una vez en la definición del proceso, haga clic derecho en el nombre del proceso `FASTQC` y seleccione "Find All References" del menú contextual para ver todas las instancias donde se usa. @@ -354,7 +355,7 @@ Comprender dónde se usa un proceso o variable en toda su base de código puede Esta característica muestra todas las instancias donde se hace referencia a `FASTQC` dentro de su espacio de trabajo, incluyendo su uso en los dos workflows distintos. Esta información es crucial para evaluar el impacto potencial de las modificaciones al proceso `FASTQC`. -### 4.4. Panel de esquema +### 4.4. Panel de Esquema El panel de Esquema, ubicado en la barra lateral del Explorador (haga clic en ![ícono del Explorador](../img/files_icon.png)), proporciona una descripción general conveniente de todos los símbolos en su archivo actual. Esta característica le permite navegar y gestionar rápidamente la estructura de su código mostrando funciones, variables y otros elementos clave en una vista jerárquica. @@ -548,7 +549,7 @@ Si su proyecto es un repositorio git (como este), VS Code muestra: - Vistas de diferencias en línea - Capacidades de confirmación y envío -Abra el panel de Control de código fuente usando el botón de control de código fuente (![ícono de control de código fuente](../img/source_control_icon.png)) (`Ctrl+Shift+G` o `Cmd+Shift+G` si está trabajando con VSCode localmente) para ver los cambios de git y confirmar directamente en el editor. +Abra el panel de Control de código fuente usando el botón de control de código fuente (![Ícono de control de código fuente](../img/source_control_icon.png)) (`Ctrl+Shift+G` o `Cmd+Shift+G` si está trabajando con VS Code localmente) para ver los cambios de git y confirmar directamente en el editor. ![Panel de control de código fuente](../img/source_control.png) diff --git a/docs/es/docs/side_quests/essential_scripting_patterns/index.md b/docs/es/docs/side_quests/essential_scripting_patterns/index.md index 1a72a9bd23..ba952bd501 100644 --- a/docs/es/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/es/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, Usaremos este conjunto de datos realista para explorar técnicas de programación prácticas que encontrará en workflows reales de bioinformática. - - - - #### Lista de verificación de preparación ¿Cree que está listo para comenzar? @@ -112,9 +108,19 @@ Comience con un workflow simple que solo lee el archivo CSV (ya lo hemos hecho p ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "Salida del comando" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Agregando el Operador Map @@ -148,7 +162,7 @@ Así es como se ve esa operación map: === "Después" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ Así es como se ve esa operación map: === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ Ahora vamos a escribir lógica de **scripting** dentro de nuestro closure para t === "Después" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ Ahora vamos a escribir lógica de **scripting** dentro de nuestro closure para t === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ Realice el siguiente cambio: === "Después" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ Realice el siguiente cambio: === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ Agreguemos una línea para crear una versión simplificada de nuestros metadatos === "Después" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ Agreguemos una línea para crear una versión simplificada de nuestros metadatos === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Esto muestra tanto los metadatos completos mostrados por la operación `view()` como el subconjunto extraído que imprimimos con `println`. @@ -392,7 +412,7 @@ Generemos una estructura de canal que comprenda una tupla de 2 elementos: el map === "Después" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -411,7 +431,7 @@ Generemos una estructura de canal que comprenda una tupla de 2 elementos: el map === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -487,9 +507,9 @@ nextflow run collect.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -503,7 +523,7 @@ Ahora veamos el método `collect` en una List en acción. Modifique `collect.nf` === "Después" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - agrupa múltiples emisiones del canal en una sola @@ -521,7 +541,7 @@ Ahora veamos el método `collect` en una List en acción. Modifique `collect.nf` === "Antes" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - agrupa múltiples emisiones del canal en una sola @@ -545,9 +565,9 @@ nextflow run collect.nf ??? success "Salida del comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -616,9 +636,9 @@ nextflow run collect.nf ??? success "Salida del comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -677,7 +697,7 @@ Realice el siguiente cambio en su workflow `main.nf` existente: === "Después" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // Scripting para transformación de datos def sample_meta = [ @@ -704,7 +724,7 @@ Realice el siguiente cambio en su workflow `main.nf` existente: === "Antes" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // Scripting para transformación de datos def sample_meta = [ @@ -747,13 +767,19 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Esto muestra los metadatos enriquecidos a partir de los nombres de archivos. @@ -800,8 +826,9 @@ Luego modifique el bloque `workflow` para conectar el canal `ch_samples` al proc === "Después" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -828,13 +855,23 @@ Luego modifique el bloque `workflow` para conectar el canal `ch_samples` al proc } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "Antes" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -857,9 +894,18 @@ Luego modifique el bloque `workflow` para conectar el canal `ch_samples` al proc ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -872,28 +918,41 @@ nextflow run main.nf ??? failure "Salida del comando" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` Puede ver que el proceso está intentando ejecutar `fastp` con un valor `null` para el segundo archivo de entrada, lo que está causando que falle. Esto se debe a que nuestro conjunto de datos contiene lecturas de extremo único, pero el proceso está codificado para esperar lecturas de extremo pareado (dos archivos de entrada a la vez). @@ -957,18 +1016,24 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` ¡Se ve bien! Si verificamos los comandos reales que se ejecutaron (personalice según el hash de su tarea): ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Podemos ver que Nextflow eligió correctamente el comando para lecturas de extremo único: @@ -980,7 +1045,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Otro uso común de la lógica de script dinámica se puede ver en [el módulo de Genómica de Nextflow for Science](../../nf4_science/genomics/03_joint_calling.md). En ese módulo, el proceso GATK que se llama puede tomar múltiples archivos de entrada, pero cada uno debe ir precedido de `-V` para formar una línea de comando correcta. El proceso usa scripting para transformar una colección de archivos de entrada (`all_gvcfs`) en los argumentos de comando correctos: @@ -1027,11 +1092,12 @@ Incluya el proceso en su `main.nf` y agréguelo al workflow: === "Después" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1058,15 +1124,25 @@ Incluya el proceso en su `main.nf` y agréguelo al workflow: ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Antes" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1092,17 +1168,44 @@ Incluya el proceso en su `main.nf` y agréguelo al workflow: } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` Ahora ejecute el workflow y verifique los informes generados en `results/reports/`. Deberían contener información básica sobre cada muestra. - +```bash +nextflow run main.nf +``` ??? success "Salida del comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` ¿Pero qué pasa si queremos agregar información sobre cuándo y dónde ocurrió el procesamiento? Modifiquemos el proceso para usar variables del **shell** y algo de sustitución de comandos para incluir el usuario actual, el nombre del host y la fecha en el informe: @@ -1135,11 +1238,18 @@ Si ejecuta esto, notará un error -- Nextflow intenta interpretar `#!groovy ${US ??? failure "Salida del comando" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Necesitamos escaparla para que Bash pueda manejarla en su lugar. @@ -1199,7 +1309,7 @@ Para ilustrar cómo se ve eso con nuestro workflow existente, realice la modific === "Después" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1226,22 +1336,33 @@ Para ilustrar cómo se ve eso con nuestro workflow existente, realice la modific } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Antes" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1268,6 +1389,15 @@ Para ilustrar cómo se ve eso con nuestro workflow existente, realice la modific ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1293,13 +1423,22 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` La salida debería mostrar ambos procesos completándose con éxito. El workflow ahora es mucho más limpio y fácil de mantener, con toda la lógica compleja de procesamiento de metadatos encapsulada en la función `separateMetadata`. @@ -1365,26 +1504,35 @@ nextflow run main.nf -ansi-log false ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` Puede verificar el comando exacto de `docker` que se ejecutó para ver la asignación de CPU para cualquier tarea dada: ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` Debería ver algo como: ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` En este ejemplo hemos elegido una muestra que solicitó 2 CPUs (`--cpu-shares 2048`), porque era una muestra de alta profundidad, pero debería ver diferentes asignaciones de CPU dependiendo de la profundidad de la muestra. Pruebe esto también para las otras tareas. @@ -1438,7 +1586,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` Esto indica que el proceso fue terminado por exceder los límites de memoria. @@ -1526,7 +1674,7 @@ Incluya el nuevo módulo de `modules/trimgalore.nf`: === "Después" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1544,7 +1692,7 @@ Incluya el nuevo módulo de `modules/trimgalore.nf`: === "Antes" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1562,14 +1710,26 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` Aquí hemos usado expresiones condicionales pequeñas pero poderosas dentro del operador `.branch{}` para enrutar muestras según sus metadatos. Las muestras humanas con alta cobertura pasan por `FASTP`, mientras que todas las demás muestras pasan por `TRIMGALORE`. @@ -1589,7 +1749,7 @@ Agregue lo siguiente antes de la operación branch: === "Después" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1609,7 +1769,7 @@ Agregue lo siguiente antes de la operación branch: === "Antes" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1630,21 +1790,31 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -Debido a que hemos elegido un filtro que excluye algunas muestras, se ejecutaron menos tareas. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +En este caso las tres muestras satisfacen el filtro, por lo que todas continúan en el pipeline. +Un umbral más estricto excluiría las muestras de baja profundidad y reduciría el número de tareas que se ejecutan. La expresión de filtro `meta.id && meta.organism && meta.depth >= 25000000` combina veracidad con comparaciones explícitas: @@ -1716,13 +1886,13 @@ nextflow run main.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` Esto falla con una NullPointerException. @@ -1772,7 +1942,27 @@ nextflow run main.nf ??? success "Salida del comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` ¡Sin fallos! El workflow ahora maneja el campo faltante de forma elegante. Cuando `row.run_id` es `null`, el operador `?.` previene la llamada a `.toUpperCase()`, y `run_id` se convierte en `null` en lugar de causar una excepción. @@ -1816,7 +2006,7 @@ También agregue un operador `view()` en el workflow para ver los resultados: === "Después" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1825,7 +2015,7 @@ También agregue un operador `view()` en el workflow para ver los resultados: === "Antes" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1880,7 +2070,7 @@ Cree una función de validación antes de su bloque de workflow, llámela desde === "Después" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1898,6 +2088,7 @@ Cree una función de validación antes de su bloque de workflow, llámela desde } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1911,6 +2102,7 @@ Cree una función de validación antes de su bloque de workflow, llámela desde ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1923,9 +2115,9 @@ nextflow run main.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1942,9 +2134,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1958,7 +2150,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "Salida del comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Esta vez se ejecuta con éxito. @@ -1997,14 +2209,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2035,7 +2257,7 @@ Agregue el manejador de eventos a su archivo `main.nf`, dentro de su definición === "Después" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2051,15 +2273,21 @@ Agregue el manejador de eventos a su archivo `main.nf`, dentro de su definición println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "Antes" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2074,29 +2302,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Hagámoslo más útil agregando lógica condicional: === "Después" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2119,12 +2362,15 @@ Hagámoslo más útil agregando lógica condicional: println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "Antes" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2140,34 +2386,53 @@ Hagámoslo más útil agregando lógica condicional: println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` Ahora obtenemos un resumen aún más informativo, incluyendo un mensaje de éxito/fallo y el directorio de salida si se especificó: - +```bash +nextflow run main.nf +``` ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` También puede escribir el resumen en un archivo usando operaciones de archivo: @@ -2337,7 +2602,10 @@ Aplicar estos patrones en su propio trabajo le permitirá construir workflows ro - Llamar a la función con nombre en un workflow - ```groovy + ````groovy + workflow { + ch_samples = channel.fromPath("./data/samples.csv") + .splitCsv(header: true)```groovy workflow { ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -2345,7 +2613,7 @@ Aplicar estos patrones en su propio trabajo le permitirá construir workflows ro ch_fastp = FASTP(ch_samples) } - ``` + ```` 4. **Directivas de Recursos Dinámicas con Closures**: Exploró el uso de closures en las directivas de procesos para la asignación adaptativa de recursos basada en las características de la entrada. diff --git a/docs/es/docs/side_quests/metadata/index.md b/docs/es/docs/side_quests/metadata/index.md index 26af853192..7f3e55769e 100644 --- a/docs/es/docs/side_quests/metadata/index.md +++ b/docs/es/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Como puedes ver, el operador ha construido un map de pares clave-valor para cada fila del archivo CSV, con los encabezados de columna como claves para los valores correspondientes. @@ -265,9 +271,9 @@ Por ejemplo, podríamos acceder al ID del archivo con `id` o a la ruta del archi Y esto es lo que puedes esperar ver en la salida: ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Esto muestra que podemos acceder a los valores de la columna `character` para cada fila. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Como puedes ver, `COWPY` se ejecutó en cada archivo usando el personaje correcto para cada uno. @@ -654,12 +679,25 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` La salida son los mismos siete archivos `cowpy-*.txt` que antes, ahora producidos con una llamada más simple a `COWPY`. @@ -744,7 +782,7 @@ Reestructuremos la operación `map` para producir una tupla `[meta, file]`: === "Antes" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -770,9 +808,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -781,6 +819,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Cada elemento del canal es ahora una tupla de dos elementos: el meta map primero, el archivo segundo. @@ -792,7 +836,7 @@ Cada elemento del canal es ahora una tupla de dos elementos: el meta map primero ] ``` -Si más adelante agregamos una columna `language` a la hoja de datos, estará disponible como `meta.language` sin necesidad de cambiar la definición de entrada del proceso. +Si más adelante agregamos una columna `language` a la hoja de datos e incluimos el campo en la operación `map` (por ejemplo, `language: row.language`), estará disponible como `meta.language` sin necesidad de cambiar la definición de entrada del proceso. #### 1.5.3. Actualizar el proceso `COWPY` para usar el meta map @@ -891,12 +935,25 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` El directorio de resultados ahora contiene los archivos de arte ASCII. @@ -1044,20 +1101,33 @@ nextflow run main.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` Ahora tenemos una predicción del idioma para cada archivo del conjunto de datos. @@ -1206,19 +1276,32 @@ nextflow run main.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` ¡Sí, eso es correcto! @@ -1311,7 +1394,7 @@ Puntos clave: -#### 2.3.2. Ejecutar el workflow +#### 2.3.2. Ejecutar el workflow: Ejecuta el workflow para verificar que funciona: @@ -1322,19 +1405,32 @@ nextflow run main.nf -resume ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` El meta map ahora contiene cuatro campos: `id`, `character`, `lang` y `lang_group`. @@ -1445,13 +1541,26 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` El directorio de resultados ahora está organizado por familia lingüística, con cada archivo nombrado según el idioma detectado: @@ -1509,18 +1618,19 @@ Cuando Nextflow sustituye `#!groovy ${meta.character}` en el comando, la herrami ??? failure "Salida del comando" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1540,7 +1650,7 @@ Cuando Nextflow sustituye `#!groovy ${meta.character}` en el comando, la herrami cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1564,28 +1674,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -La clave `character` nunca se crea en el meta map. -Cuando el script del proceso evalúa `#!groovy ${meta.character}`, la clave faltante devuelve `null`, y Nextflow literalmente sustituye la cadena `null` en el comando: +Nuestra operación `map` escribe explícitamente `#!groovy character: row.character`, por lo que la clave `character` se crea igualmente en el meta map, pero acceder a una columna que no existe en la fila analizada devuelve `null`, de modo que su valor se convierte en `null`. +Cuando el script del proceso evalúa `#!groovy ${meta.character}`, Nextflow literalmente sustituye la cadena `null` en el comando: ??? failure "Salida del comando" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1610,7 +1721,7 @@ Cuando el script del proceso evalúa `#!groovy ${meta.character}`, la clave falt TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/es/docs/side_quests/nf_test/index.md b/docs/es/docs/side_quests/nf_test/index.md index dbff5cdb77..208977694a 100644 --- a/docs/es/docs/side_quests/nf_test/index.md +++ b/docs/es/docs/side_quests/nf_test/index.md @@ -1,18 +1,3 @@ -I need to update the existing Spanish translation based on the diff. Let me identify the specific changes: - -1. Link `../hello_nextflow/README.md` → `../../hello_nextflow/index.md` -2. Link `../envsetup/index.md` → `../../envsetup/index.md` -3. Link `../hello_nextflow/00_orientation.md` → `../../hello_nextflow/00_orientation.md` -4. Link `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` -5. Link `../hello_nextflow/index.md` → `../../hello_nextflow/index.md` -6. Remove `publishDir 'results', mode: 'copy'` from `sayHello` process -7. Remove `publishDir 'results', mode: 'copy'` from `convertToUpper` process -8. Add `main:` to workflow block and add `publish:` section and `output {}` block -9. `Holà` → `Hola` in file assertions -10. `!!!warning` → `!!! warning` -11. Link `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` (in section 2.1) -12. Link `../` → `../index.md` in "What's next?" at the end - # Pruebas con nf-test :material-information-outline:{ .ai-translation-notice-icon } Traducción asistida por IA - [más información y sugerencias](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) @@ -34,7 +19,7 @@ Las pruebas le permiten verificar sistemáticamente que cada parte de su pipelin Hay muchos tipos diferentes de pruebas que podemos escribir: -1. **Pruebas a nivel de módulo**: Para procesos individuales +1. **Pruebas a nivel de proceso**: Para procesos individuales 2. **Pruebas a nivel de workflow**: Para un único workflow 3. **Pruebas a nivel de pipeline**: Para el pipeline en su conjunto 4. **Pruebas de rendimiento**: Para la velocidad y eficiencia del pipeline @@ -42,16 +27,16 @@ Hay muchos tipos diferentes de pruebas que podemos escribir: Probar procesos individuales es análogo a las pruebas unitarias en otros lenguajes. Probar el workflow o el pipeline completo es análogo a lo que se llama pruebas de integración en otros lenguajes, donde probamos las interacciones de los componentes. -[**nf-test**](https://www.nf-test.com/) es una herramienta que le permite escribir pruebas a nivel de módulo, workflow y pipeline. En resumen, le permite verificar sistemáticamente que cada parte individual del pipeline funciona como se espera, _de forma aislada_. +[**nf-test**](https://www.nf-test.com/) es una herramienta que le permite escribir pruebas a nivel de proceso, workflow y pipeline. En resumen, le permite verificar sistemáticamente que cada parte individual del pipeline funciona como se espera, _de forma aislada_. ### Objetivos de aprendizaje -En esta misión secundaria, aprenderá a usar nf-test para escribir una prueba a nivel de workflow para el pipeline, así como pruebas a nivel de módulo para los tres procesos que invoca. +En esta misión secundaria, aprenderá a usar nf-test para escribir una prueba a nivel de workflow para el pipeline, así como pruebas a nivel de proceso para los dos procesos que invoca. Al finalizar esta misión secundaria, podrá usar las siguientes técnicas de manera efectiva: - Inicializar nf-test en su proyecto -- Generar pruebas a nivel de módulo y a nivel de workflow +- Generar pruebas a nivel de proceso y a nivel de workflow - Agregar tipos comunes de aserciones - Entender cuándo usar snapshots vs. aserciones de contenido - Ejecutar pruebas para un proyecto completo @@ -65,6 +50,16 @@ Antes de abordar esta misión secundaria, debe: - Haber completado el tutorial [Hello Nextflow](../../hello_nextflow/index.md) o un curso equivalente para principiantes. - Estar familiarizado con los conceptos y mecanismos básicos de Nextflow (procesos, canales, operadores, trabajo con archivos, metadatos) +!!! warning "Requisito de versión de nf-test" + + Las pruebas a nivel de proceso requieren **nf-test 0.9.3 o posterior**. Las versiones anteriores (incluida la 0.9.2) generan código de arnés de prueba incompatible con el analizador de sintaxis estricto que Nextflow usa por defecto a partir de la versión 26.04, lo que provoca un error `Script compilation failed` en lugar del resultado de prueba esperado. + + Verifique su versión con `nf-test version`. Si necesita actualizar: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. Primeros pasos @@ -96,7 +91,8 @@ Encontrará un archivo de workflow principal y un archivo CSV llamado `greetings ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` Para una descripción detallada de los archivos, consulte el [calentamiento de Hello Nextflow](../../hello_nextflow/00_orientation.md). @@ -126,21 +122,23 @@ Puede ver el código completo del workflow a continuación. ??? example "Código del flujo de trabajo" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * Parámetros del pipeline - */ + * Parámetros del pipeline + */ params.input_file = "greetings.csv" /* - * Usa echo para imprimir 'Hello World!' en la salida estándar - */ + * Usa echo para imprimir 'Hello World!' en la salida estándar + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -149,15 +147,15 @@ Puede ver el código completo del workflow a continuación. } /* - * Usa una utilidad de reemplazo de texto para convertir el saludo a mayúsculas - */ + * Usa una utilidad de reemplazo de texto para convertir el saludo a mayúsculas + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -198,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` ¡FELICIDADES! ¡Acaba de ejecutar una prueba! @@ -450,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` ¡Éxito! El pipeline se ejecuta exitosamente y la prueba pasa. ¡Ejecútelo tantas veces como quiera y siempre obtendrá el mismo resultado! @@ -475,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -549,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` ¡Éxito! El pipeline se ejecuta exitosamente y la prueba pasa. Ahora hemos comenzado a probar los detalles del pipeline, además del estado general. @@ -634,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` ¡Éxito! Las pruebas pasan porque el pipeline se completó exitosamente, el número correcto de procesos se ejecutó y los archivos de salida fueron creados. Esto también debería mostrarle cuán útil es proporcionar esos nombres informativos para sus pruebas. @@ -745,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -815,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -823,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` ¡Éxito! La prueba pasa porque el proceso `sayHello` se ejecutó exitosamente y la salida fue creada. @@ -873,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` ¡Éxito! La prueba pasa porque el proceso `sayHello` se ejecutó exitosamente y la salida coincidió con el snapshot. @@ -966,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. Probar el proceso `convertToUpper` @@ -1013,10 +1040,10 @@ Esta es una prueba similar a la del proceso `sayHello`, pero está probando el p Ahora necesitamos proporcionar un único archivo de entrada al proceso convertToUpper, que incluya algún texto que queramos convertir a mayúsculas. Hay muchas formas de hacer esto: - Podríamos crear un archivo dedicado para la prueba -- Podríamos reutilizar el archivo data/greetings.csv existente +- Podríamos reutilizar el archivo greetings.csv existente - Podríamos crearlo sobre la marcha dentro de la prueba -Por ahora, reutilicemos el archivo data/greetings.csv existente usando el ejemplo que usamos con la prueba a nivel de pipeline. Como antes, podemos nombrar la prueba para reflejar mejor lo que estamos probando, pero esta vez dejemos que 'capture' el contenido en lugar de verificar cadenas específicas (como hicimos en el otro proceso). +Por ahora, reutilicemos el archivo greetings.csv existente usando el ejemplo que usamos con la prueba a nivel de pipeline. Como antes, podemos nombrar la prueba para reflejar mejor lo que estamos probando, pero esta vez dejemos que 'capture' el contenido en lugar de verificar cadenas específicas (como hicimos en el otro proceso). === "Después" @@ -1085,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1093,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` Tenga en cuenta que hemos creado un archivo de snapshot para el proceso `convertToUpper` en `tests/main.converttoupper.nf.test.snap`. Si ejecutamos la prueba nuevamente, deberíamos ver que nf-test pasa de nuevo. @@ -1112,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### Conclusión @@ -1154,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` ¡Mire eso! Ejecutamos 4 pruebas, 1 para cada proceso y 2 para todo el pipeline con un solo comando. ¡Imagine lo poderoso que es esto en una base de código grande! @@ -1208,7 +1235,7 @@ Consulte la [documentación de nf-test](https://www.nf-test.com/) para conocer f - Agregar aserciones más completas a sus pruebas - Escribir pruebas para casos límite y condiciones de error - Configurar integración continua para ejecutar pruebas automáticamente -- Aprender sobre otros tipos de pruebas como pruebas de workflow y de módulo +- Aprender sobre otros tipos de pruebas como pruebas de workflow, de rendimiento y de estrés - Explorar técnicas de validación de contenido más avanzadas **Recuerde:** Las pruebas son documentación viva de cómo debe comportarse su código. Cuantas más pruebas escriba, y cuanto más específicas sean sus aserciones, más seguro podrá estar de la confiabilidad de su pipeline. diff --git a/docs/es/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/es/docs/side_quests/plugin_development/01_plugin_basics.md index 9cf52679f9..5ed836ba0f 100644 --- a/docs/es/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/es/docs/side_quests/plugin_development/01_plugin_basics.md @@ -511,7 +511,7 @@ Actualice `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -534,7 +534,7 @@ El plugin produce varios mensajes INFO y WARN durante la ejecución. Estos son normales para un ejemplo pequeño que se ejecuta en una máquina local: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -600,7 +600,7 @@ Agregue un bloque `co2footprint` a `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -614,7 +614,7 @@ Agregue un bloque `co2footprint` a `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -635,11 +635,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: La advertencia de zona desapareció. El plugin ahora usa la intensidad de carbono específica de GB (163.92 gCO₂eq/kWh) en lugar del valor global de respaldo (480.0 gCO₂eq/kWh). -!!! note "Nota" - - También puede ver un mensaje `WARN: Unrecognized config option 'co2footprint.location'`. - Esto es cosmético y puede ignorarse sin problema; el plugin sigue leyendo el valor correctamente. - En la Parte 6, creará un ámbito de configuración para su propio plugin. Este plugin funciona completamente a través del mecanismo observer, conectándose a los eventos del ciclo de vida del workflow para recopilar métricas de recursos y generar su reporte cuando el pipeline finaliza. diff --git a/docs/es/docs/side_quests/plugin_development/02_create_project.md b/docs/es/docs/side_quests/plugin_development/02_create_project.md index 2c91136367..2a6731b102 100644 --- a/docs/es/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/es/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ Debería ver: ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ La más importante es el bloque `nextflowPlugin`: ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ Actualícelo para que coincida con su versión instalada de Nextflow y garantiza ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ Actualícelo para que coincida con su versión instalada de Nextflow y garantiza ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **Las advertencias son esperadas.** diff --git a/docs/es/docs/side_quests/plugin_development/03_custom_functions.md b/docs/es/docs/side_quests/plugin_development/03_custom_functions.md index 4d77a3de20..77e931776f 100644 --- a/docs/es/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/es/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/es/docs/side_quests/plugin_development/04_build_and_test.md b/docs/es/docs/side_quests/plugin_development/04_build_and_test.md index d7e578a983..e89021401a 100644 --- a/docs/es/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/es/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **¿Dónde están los resultados de las pruebas?** Gradle oculta la salida detallada cuando todas las pruebas pasan. diff --git a/docs/es/docs/side_quests/plugin_development/05_observers.md b/docs/es/docs/side_quests/plugin_development/05_observers.md index b257f80ee5..c37f8de0d9 100644 --- a/docs/es/docs/side_quests/plugin_development/05_observers.md +++ b/docs/es/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "Salida" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/es/docs/side_quests/plugin_development/06_configuration.md b/docs/es/docs/side_quests/plugin_development/06_configuration.md index fb2d47f6da..9f2a4c6d47 100644 --- a/docs/es/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/es/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ La construcción falla: ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` En Groovy (y Java), debe _declarar_ una variable antes de usarla. diff --git a/docs/es/docs/side_quests/plugin_development/index.md b/docs/es/docs/side_quests/plugin_development/index.md index cf15041550..402b49b8f3 100644 --- a/docs/es/docs/side_quests/plugin_development/index.md +++ b/docs/es/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ No se requiere experiencia previa en Java o Groovy. **Directorio de trabajo:** `side-quests/plugin_development` +#### Abra el espacio de código de capacitación + +Si aún no lo ha hecho, asegúrese de abrir el entorno de capacitación como se describe en la [Configuración del entorno](../../envsetup/index.md). + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Objetivos de aprendizaje Al finalizar esta capacitación, será capaz de: diff --git a/docs/es/docs/side_quests/splitting_and_grouping/index.md b/docs/es/docs/side_quests/splitting_and_grouping/index.md index b8d47a03d9..58c0347a1f 100644 --- a/docs/es/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/es/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ Aplica estos cambios a `main.nf`: === "Después" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ A continuación, consideraremos la situación en la que quieres unir por múltip ### 3.2. Unir por múltiples campos -Tenemos 2 réplicas para la muestra A, pero solo 1 para las muestras B y C. En este caso pudimos unirlas efectivamente usando el campo `id`, pero ¿qué pasaría si estuvieran desincronizadas? ¡Podríamos mezclar las muestras normales y tumorales de diferentes réplicas! +Tenemos 2 réplicas para patientA, pero solo 1 para patientB y patientC. En este caso pudimos unirlas efectivamente usando el campo `id`, pero ¿qué pasaría si estuvieran desincronizadas? ¡Podríamos mezclar las muestras normales y tumorales de diferentes réplicas! Para evitar esto, podemos unir por múltiples campos. En realidad hay múltiples formas de lograr esto, pero nos centraremos en crear una nueva clave de unión que incluya tanto el `id` de la muestra como el número de `replicate`. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + Dado que el closure ahora envuelve cada ruta con `file()`, las entradas de archivo aparecen como rutas absolutas resueltas en lugar de los nombres de archivo simples de la hoja de muestras. + Usar un closure con nombre nos permite reutilizar la misma transformación en múltiples lugares, reduciendo el riesgo de errores y haciendo el código más legible y fácil de mantener. ### 3.5. Reducir la duplicación de datos @@ -723,21 +725,21 @@ Tenemos muchos datos duplicados en nuestro workflow. Cada elemento en las muestr ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "Salida del comando" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ En esta sección, has aprendido: ## 5. Agregar muestras usando `groupTuple` -En las secciones anteriores, aprendimos cómo dividir datos de un archivo de entrada y filtrar por campos específicos (en nuestro caso muestras normales y tumorales). Pero esto solo cubre un tipo de unión. ¿Qué pasa si queremos agrupar muestras por un atributo específico? Por ejemplo, en lugar de unir pares normal-tumor coincidentes, podríamos querer procesar todas las muestras de "sampleA" juntas independientemente de su tipo. Este patrón es común en workflows de bioinformática donde puedes querer procesar muestras relacionadas por separado por razones de eficiencia antes de comparar o combinar los resultados al final. +En las secciones anteriores, aprendimos cómo dividir datos de un archivo de entrada y filtrar por campos específicos (en nuestro caso muestras normales y tumorales). Pero esto solo cubre un tipo de unión. ¿Qué pasa si queremos agrupar muestras por un atributo específico? Por ejemplo, en lugar de unir pares normal-tumor coincidentes, podríamos querer procesar todas las muestras de "patientA" juntas independientemente de su tipo. Este patrón es común en workflows de bioinformática donde puedes querer procesar muestras relacionadas por separado por razones de eficiencia antes de comparar o combinar los resultados al final. Nextflow incluye métodos integrados para hacer esto, el principal que veremos es `groupTuple`. @@ -1008,7 +1014,7 @@ El primer paso es similar a lo que hicimos en la sección anterior. Debemos aisl ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Dominar estas operaciones de canal te permitirá construir pipelines flexibles y 2. **Dividir datos en canales separados:** Usamos `filter` para dividir datos en flujos independientes basados en el campo `type` ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Unir muestras coincidentes:** Usamos `join` para recombinar muestras relacionadas basándonos en los campos `id` y `repeat` @@ -1199,31 +1205,31 @@ Dominar estas operaciones de canal te permitirá construir pipelines flexibles y - Unir dos canales por clave (primer elemento de la tupla) ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Extraer clave de unión y unir por este valor ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - Unir por múltiples campos usando subMap + - Unir por múltiples campos usando `subMap` ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Distribuir a través de intervalos:** Usamos `combine` para crear productos cartesianos de muestras con intervalos genómicos para procesamiento paralelo. ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Agregar por claves de agrupación:** Usamos `groupTuple` para agrupar por el primer elemento en cada tupla, recopilando así las muestras que comparten los campos `id` e `interval` y fusionando las réplicas técnicas. diff --git a/docs/es/docs/side_quests/workflows_of_workflows/index.md b/docs/es/docs/side_quests/workflows_of_workflows/index.md index 0cb6c46fbc..2ad34d7b59 100644 --- a/docs/es/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/es/docs/side_quests/workflows_of_workflows/index.md @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` Para hacerlo componible con otros workflows, hay algunas cosas que necesitan cambiar. ### 1.2. Hacer el workflow componible -Para hacer un workflow componible, cuatro cosas deben cambiar: -el workflow recibe un nombre, las entradas se mueven a un bloque `take:`, las salidas se mueven a un bloque `emit:`, -y los bloques independientes `publish:`/`output {}` se eliminan (pertenecen al entry workflow). +Para hacer un workflow componible, tres cosas deben cambiar: +el workflow recibe un nombre, las entradas se mueven a un bloque `take:` y las salidas se mueven a un bloque `emit:` +(reemplazando los bloques independientes `publish:`/`output {}`, que pertenecen al entry workflow). Veamos estos cambios uno por uno. @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "Contenido del directorio" @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` Para hacerlo componible con `GREETING_WORKFLOW`, se aplican los mismos tres cambios de la sección 1.2. @@ -477,7 +514,7 @@ include { REVERSE_TEXT } from '../modules/reverse_text' workflow TRANSFORM_WORKFLOW { take: - input_ch // Canal de entrada con mensajes + input_ch // Canal de entrada con saludos main: // Aplica las transformaciones en secuencia @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "Contenido del directorio" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "Contenido del archivo" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` El pipeline funciona de extremo a extremo: el saludo ha sido convertido a mayúsculas e invertido. diff --git a/docs/es/docs/side_quests/working_with_files/index.md b/docs/es/docs/side_quests/working_with_files/index.md index 3a1c2c02ea..1272a8f6b6 100644 --- a/docs/es/docs/side_quests/working_with_files/index.md +++ b/docs/es/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Como puede ver, Nextflow imprimió la ruta en cadena exactamente como la escribimos. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Esta vez, verá la ruta absoluta completa en lugar de la ruta relativa que proporcionamos como entrada. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Puede ver los diversos atributos del archivo impresos en la consola. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Esto muestra que podemos operar sobre el archivo correctamente dentro de un proceso. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Esta es la parte importante: @@ -545,12 +570,13 @@ nextflow run main.nf ??? failure "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -578,9 +604,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Esto muestra muchos detalles sobre el error porque el proceso está configurado para mostrar información de depuración, como se mencionó anteriormente. @@ -694,9 +720,9 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -704,9 +730,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` ¡Funciona! Puede ver que muy poco ha cambiado. @@ -815,16 +847,11 @@ Una forma ingenua de hacerlo sería combinar el método `file()` con [`channel.o ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` Eso funciona, pero es engorroso. -!!! tip "Consejo: Cuándo usar `file()` vs `channel.fromPath()`" - - - Use `file()` cuando necesite un único objeto Path para manipulación directa (verificar si un archivo existe, leer sus atributos, o pasarlo a una única invocación de proceso) - - Use `channel.fromPath()` cuando necesite un canal que pueda contener múltiples archivos, especialmente con patrones glob, o cuando los archivos fluirán a través de múltiples procesos - Aquí es donde entra [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath): una fábrica de canales conveniente que agrupa toda la funcionalidad que necesitamos para generar un canal a partir de una o más cadenas de archivos estáticas, así como patrones glob. ### 3.1. Agregar la fábrica de canales @@ -879,11 +906,17 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Como puede ver, la ruta del archivo se está cargando como un objeto de tipo `Path` en el canal. @@ -891,6 +924,11 @@ Esto es similar a lo que habría hecho `file()`, excepto que ahora tenemos un ca Usar `channel.fromPath()` es una forma conveniente de crear un nuevo canal poblado con una lista de archivos. +!!! tip "Consejo: Cuándo usar `file()` vs `channel.fromPath()`" + + - Use `file()` cuando necesite un único objeto Path para manipulación directa (verificar si un archivo existe, leer sus atributos, o pasarlo a una única invocación de proceso) + - Use `channel.fromPath()` cuando necesite un canal que pueda contener múltiples archivos, especialmente con patrones glob, o cuando los archivos fluirán a través de múltiples procesos + ### 3.2. Ver atributos de los archivos en el canal En nuestra primera aproximación al uso de la fábrica de canales, simplificamos el código y solo imprimimos el nombre del archivo. @@ -936,12 +974,12 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -949,6 +987,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Y ahí está, los mismos resultados que antes pero ahora tenemos el archivo en un canal, por lo que podemos agregar más. @@ -1005,12 +1049,12 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1026,6 +1070,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Como puede ver, ahora tenemos dos objetos Path en nuestro canal, lo que muestra que Nextflow ha realizado la expansión de nombres de archivo correctamente, y ha cargado y procesado ambos archivos como se esperaba. @@ -1110,19 +1160,25 @@ nextflow run main.nf ??? success "Salida del comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Cada elemento en el canal es ahora una tupla que contiene el `simpleName` y el objeto de archivo original. @@ -1166,19 +1222,25 @@ nextflow run main.nf ??? success "Salida del comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ahora la tupla para cada elemento en nuestro canal contiene la lista de metadatos (_p. ej._ `[patientA, rep1, normal, R1, 001]`) y el objeto de archivo original. @@ -1267,19 +1329,25 @@ nextflow run main.nf ??? success "Salida del comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ahora los metadatos están claramente etiquetados (_p. ej._ `[id:patientA, replicate:1, type:normal, readNum:2]`) por lo que es mucho más fácil saber qué es qué. @@ -1339,10 +1407,10 @@ Actualicemos el workflow `main.nf` en consecuencia: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* ¡Comentamos el mapeo por ahora, volveremos a él! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1357,13 +1425,13 @@ Actualicemos el workflow `main.nf` en consecuencia: === "Antes" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // Cargar archivos con channel.fromFilePairs + // Cargar archivos con channel.fromPath ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1385,12 +1453,11 @@ nextflow run main.nf ??? failure "Salida del comando" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1400,9 +1467,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` ¡Vaya, esta vez la ejecución falló! @@ -1453,11 +1520,17 @@ nextflow run main.nf ??? success "Salida del comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` ¡Esta vez el workflow se ejecuta con éxito! @@ -1478,10 +1551,10 @@ Descomente la operación map en el workflow y realice los siguientes cambios: // Cargar archivos con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1498,10 +1571,10 @@ Descomente la operación map en el workflow y realice los siguientes cambios: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* ¡Comentamos el mapeo por ahora, volveremos a él! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1528,11 +1601,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Y ahí está: tenemos el map de metadatos (`[id:patientA, replicate:1, type:normal]`) en la primera posición de la tupla de salida, seguido de la tupla de archivos pareados, como se pretendía. @@ -1644,10 +1723,10 @@ En el workflow principal, reemplace el operador `.view()` con `#!groovy .set { c // Cargar archivos con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1666,10 +1745,10 @@ En el workflow principal, reemplace el operador `.view()` con `#!groovy .set { c // Cargar archivos con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1688,11 +1767,17 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Esto confirma que ahora podemos referirnos al canal por nombre. @@ -1716,10 +1801,10 @@ En el workflow principal, realice los siguientes cambios en el código: // Cargar archivos con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1749,10 +1834,10 @@ En el workflow principal, realice los siguientes cambios en el código: // Cargar archivos con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1786,12 +1871,19 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` Las salidas se publican en un directorio `results`, así que eche un vistazo allí. @@ -1851,12 +1943,26 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` El directorio de resultados ahora debería contener resultados para todos los datos disponibles. @@ -1887,7 +1993,7 @@ Realice el siguiente cambio en el bloque `output {}`: === "Después" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1895,7 +2001,7 @@ Realice el siguiente cambio en el bloque `output {}`: === "Antes" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1913,12 +2019,26 @@ nextflow run main.nf ??? success "Salida del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` Revise el directorio de resultados ahora: @@ -2071,7 +2191,7 @@ Aplicar estas técnicas en su propio trabajo le permitirá construir workflows m 5. **Simplificación con channel.fromFilePairs:** Usamos `channel.fromFilePairs()` para emparejar automáticamente archivos relacionados y extraer metadatos de los IDs de los pares de archivos. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Uso de operaciones de archivos en procesos:** Integramos operaciones de archivos en procesos de Nextflow con el manejo adecuado de entradas, usando el bloque `output {}` para organizar las salidas basándose en metadatos. @@ -2081,10 +2201,10 @@ Aplicar estas técnicas en su propio trabajo le permitirá construir workflows m ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], diff --git a/docs/fr/docs/hello_nextflow/01_hello_world.md b/docs/fr/docs/hello_nextflow/01_hello_world.md index 4df7efe549..cefc6afc4c 100644 --- a/docs/fr/docs/hello_nextflow/01_hello_world.md +++ b/docs/fr/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "Sortie de la commande" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -La sortie du terminal devrait sembler familière. Extérieurement, rien n'a changé. +La sortie du terminal se termine maintenant par un résumé `Outputs:` listant les sorties publiées et le répertoire dans lequel elles ont été écrites. -Cependant, vérifiez votre explorateur de fichiers : cette fois, Nextflow a créé un nouveau répertoire appelé `results/`. +Vérifiez votre explorateur de fichiers : cette fois, Nextflow a également créé un nouveau répertoire appelé `results/`. ??? abstract "Contenu du répertoire" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Cette fois, le résultat est écrit sous le sous-répertoire spécifié. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Cette fois, si vous regardez les résultats, le fichier est une vraie copie au lieu d'un simple lien symbolique. @@ -767,19 +785,19 @@ Dans le bloc process, faites la modification de code suivante : === "Après" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "Avant" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` Le symbole `$` et les accolades (`{ }`) indiquent à Nextflow que c'est un nom de variable qui doit être remplacé par la valeur d'entrée réelle (=interpolé). @@ -811,15 +829,15 @@ Dans le bloc workflow, faites la modification de code suivante : === "Après" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // émettre une salutation - sayHello(params.input) + // émettre une salutation + sayHello(params.input) ``` === "Avant" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // émettre une salutation - sayHello() + // émettre une salutation + sayHello() ``` Cela indique à Nextflow d'exécuter le **process** `sayHello` sur la valeur fournie via le paramètre `--input`. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Si vous avez fait toutes ces modifications correctement, vous devriez obtenir une autre exécution réussie. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "Si cela n'a pas fonctionné" @@ -936,7 +966,8 @@ nextflow run hello-world.nf Cela a été mentionné au début du cours, mais vous l'avez peut-être manqué. Consultez le matériel d'aide sur les [versions de Nextflow](../info/nxf_versions.md). - En bref, si vous utilisez Nextflow `25.10`, vous devez activer l'analyseur de langage v2 : + L'analyseur v2 est celui par défaut à partir de Nextflow 26.04, vous ne rencontrerez donc ce problème que sur des versions antérieures. + Sur une version antérieure à 26.04, vous devez activer l'analyseur de langage v2 : ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Encore une fois, vous devriez trouver la sortie mise à jour correspondante dans votre répertoire de résultats. @@ -1004,8 +1041,6 @@ Savoir comment lancer des workflows et récupérer les sorties est très bien, m Ici, nous vous montrons comment utiliser la fonctionnalité [`-resume`](https://nextflow.io/docs/latest/cache-and-resume.html) lorsque vous devez relancer le même workflow, comment inspecter le journal des exécutions passées avec [`nextflow log`](https://nextflow.io/docs/latest/reference/cli.html#log), et comment supprimer les anciens répertoires de travail avec [`nextflow clean`](https://nextflow.io/docs/latest/reference/cli.html#clean). - - ### 4.1. Relancer un workflow avec `-resume` Parfois, vous allez vouloir relancer un pipeline que vous avez déjà lancé précédemment sans refaire les étapes qui se sont déjà terminées avec succès. @@ -1022,17 +1057,23 @@ Il y a deux avantages clés à faire cela : Pour l'utiliser, ajoutez simplement `-resume` à votre commande et exécutez-la : ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "Sortie de la commande" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` La sortie console devrait sembler familière, mais il y a une chose qui est un peu différente par rapport à avant. diff --git a/docs/fr/docs/hello_nextflow/02_hello_channels.md b/docs/fr/docs/hello_nextflow/02_hello_channels.md index 6462acbfc2..2791c10702 100644 --- a/docs/fr/docs/hello_nextflow/02_hello_channels.md +++ b/docs/fr/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` Comme précédemment, vous trouverez le fichier de sortie nommé `output.txt` dans le répertoire `results/hello_channels` (comme spécifié dans le bloc `output` du script de workflow, montré ci-dessus). @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Si vous avez fait les deux modifications correctement, vous devriez obtenir une exécution réussie. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "Sortie de la commande" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Comme vous pouvez le voir, cela affiche le contenu du canal dans la console. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "Sortie de la commande" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Cela semble avoir bien fonctionné. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Cette fois nous voyons les trois exécutions de processus et leurs sous-répertoires de travail associés listés dans la sortie. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` En revenant à la vue résumée, la sortie est à nouveau résumée sur une ligne. @@ -605,8 +652,6 @@ Jetez un œil au répertoire `results` pour voir si toutes les salutations de so └── output.txt ``` -Oui ! Et chacune a le contenu attendu. - ??? abstract "Contenu du fichier" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "Sortie de la commande" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -941,16 +986,25 @@ nextflow run hello-channels.nf ??? success "Sortie de la commande" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Cette fois ça fonctionne ET nous donne l'aperçu supplémentaire de ce à quoi ressemble le contenu du canal avant et après l'exécution de l'opérateur `flatten()`. @@ -1024,11 +1078,13 @@ Faites la modification suivante à la déclaration du paramètre : === "Avant" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Paramètres du pipeline */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` Cela suppose que le fichier est co-localisé avec le code du workflow. @@ -1095,9 +1151,9 @@ nextflow run hello-channels.nf ??? failure "Sortie de la commande" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1198,12 +1254,12 @@ nextflow run hello-channels.nf ??? failure "Sortie de la commande" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1318,12 +1374,12 @@ nextflow run hello-channels.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1331,6 +1387,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` Cette fois cela devrait s'exécuter sans erreur. diff --git a/docs/fr/docs/hello_nextflow/03_hello_workflow.md b/docs/fr/docs/hello_nextflow/03_hello_workflow.md index 08723d20fa..a750ece420 100644 --- a/docs/fr/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/fr/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` Comme précédemment, vous trouverez les fichiers de sortie à l'emplacement spécifié dans le bloc `output`. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` Il y a maintenant une ligne supplémentaire dans la sortie de la console qui correspond au nouveau processus que nous venons d'ajouter. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "Sortie de la commande" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + La sortie du terminal se termine désormais également par un bloc récapitulatif `Outputs:`. Nous l'avons omis ici pour nous concentrer sur les lignes d'état des processus. + Il s'exécute avec succès, y compris la troisième étape. Cependant, regardez le nombre d'appels pour `collectGreetings()` sur la dernière ligne. @@ -627,8 +651,8 @@ Maintenant, regardez le contenu du fichier de sortie final. ??? abstract "Contenu du fichier" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` Oh non. L'étape de collecte a été exécutée individuellement sur chaque message de bienvenue, ce qui N'EST PAS ce que nous voulions. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ Enfin, vous pouvez regarder le contenu du fichier de sortie pour vous assurer qu ??? abstract "Contenu du fichier" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` Il s'exécute avec succès et produit la sortie désirée : ??? abstract "Contenu du fichier" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` Si vous regardez dans le répertoire `results/hello_workflow/`, vous trouverez le nouveau fichier de rapport, `trio-report.txt`. @@ -1273,5 +1326,5 @@ Lors de la fourniture de plusieurs entrées à un processus, qu'est-ce qui doit - [x] L'ordre des entrées doit correspondre à l'ordre défini dans le bloc d'entrée - [ ] Seules deux entrées peuvent être fournies à la fois -En savoir plus : [3. Passer des paramètres supplémentaires à un processus](#3-pass-more-than-one-input-to-a-process) +En savoir plus : [3. Passer des paramètres supplémentaires à un processus](#3-pass-additional-parameters-to-a-process) diff --git a/docs/fr/docs/hello_nextflow/04_hello_modules.md b/docs/fr/docs/hello_nextflow/04_hello_modules.md index f87eec6606..1dffccda12 100644 --- a/docs/fr/docs/hello_nextflow/04_hello_modules.md +++ b/docs/fr/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` Comme précédemment, vous trouverez les fichiers de sortie dans le répertoire spécifié dans le bloc `output` (ici, `results/hello_modules/`). @@ -172,7 +187,7 @@ Insérons cela au-dessus du bloc `params` et remplissons-le de manière appropri * Paramètres du pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ Insérons cela au-dessus du bloc `params` et remplissons-le de manière appropri * Paramètres du pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ Insérez la déclaration d'importation au-dessus du bloc `params` et remplissez- * Paramètres du pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ Insérez la déclaration d'importation au-dessus du bloc `params` et remplissez- * Paramètres du pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ Insérez la déclaration d'importation au-dessus du bloc `params` et remplissez- * Paramètres du pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ Insérez la déclaration d'importation au-dessus du bloc `params` et remplissez- * Paramètres du pipeline */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/fr/docs/hello_nextflow/05_hello_containers.md b/docs/fr/docs/hello_nextflow/05_hello_containers.md index f6da8e559e..d6428df51e 100644 --- a/docs/fr/docs/hello_nextflow/05_hello_containers.md +++ b/docs/fr/docs/hello_nextflow/05_hello_containers.md @@ -3,7 +3,7 @@ :material-information-outline:{ .ai-translation-notice-icon } Traduction assistée par IA - [en savoir plus et suggérer des améliorations](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md)
- +
/// caption @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` Comme précédemment, vous trouverez les fichiers de sortie dans le répertoire spécifié dans le bloc `output` (`results/hello_containers/`). @@ -259,22 +273,22 @@ Maintenant que vous êtes à l'intérieur du conteneur, vous pouvez exécuter la Par exemple, la documentation de l'outil dit que nous pouvons changer le personnage (« cowacter ») avec `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Sortie de la commande" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "Sortie de la commande (éditée pour la clarté)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` Cette fois, cela fonctionne effectivement ! diff --git a/docs/fr/docs/hello_nextflow/06_hello_config.md b/docs/fr/docs/hello_nextflow/06_hello_config.md index 9619435d32..c1576cb1e2 100644 --- a/docs/fr/docs/hello_nextflow/06_hello_config.md +++ b/docs/fr/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Comme précédemment, vous trouverez les fichiers de sortie dans le répertoire spécifié dans le bloc `output` (`results/hello_config/`). @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Cela produit toujours la même sortie qu'avant. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` Cela créera un nouvel ensemble de répertoires sous `tux-run/` incluant `tux-run/work/` et `tux-run/results/`. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` Le fichier de sortie final devrait contenir le personnage stegosaurus disant les messages de bienvenue. @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Cela publie les sorties dans `custom-outdir-cli/` au lieu de `results/` : @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` Cela publie les sorties dans `custom-outdir-config-2/rep2/`, avec le chemin de base spécifié _et_ le sous-répertoire du nom de lot _et_ les résultats groupés par processus : @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Cela publie les sorties dans `config-output-mode/`, et ce sont toujours toutes de vraies copies, pas des liens symboliques. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "Sortie de la commande" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` Cela devrait fonctionner sans problème et produire les mêmes sorties qu'avant sous `custom-outdir-config/conda`. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Comme vous pouvez le voir, cela nous permet de basculer entre les configurations très facilement à l'exécution. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` Cela utilisera Docker quand c'est possible et produira des sorties sous `custom-outdir-config/test`, et cette fois le personnage est le duo comique `dragonandcow`. diff --git a/docs/fr/docs/hello_nf-core/00_orientation.md b/docs/fr/docs/hello_nf-core/00_orientation.md index 160217877b..91a03a5790 100644 --- a/docs/fr/docs/hello_nf-core/00_orientation.md +++ b/docs/fr/docs/hello_nf-core/00_orientation.md @@ -22,25 +22,20 @@ Si vous suivez ce cours par vous-même, veuillez vous familiariser avec les [not ### Exigences de version -Cette formation est conçue pour **Nextflow 25.10.2** ou version ultérieure **avec l'analyseur de syntaxe v2 DÉSACTIVÉ**. +Cette formation fonctionne avec **Nextflow 25.10.2** ou version ultérieure **avec l'analyseur de syntaxe v2**, qui est le comportement par défaut à partir de Nextflow 26.04. +Dans notre environnement de formation, vous n'avez rien à faire : il exécute Nextflow 26.04.4 avec l'analyseur v2. Si vous utilisez un environnement local ou personnalisé, consultez les [notes de version](../info/nxf_versions.md). -#### Si vous utilisez notre environnement de formation : - -Vous DEVEZ exécuter la commande suivante avant d'aller plus loin : - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### Si vous utilisez un environnement local ou personnalisé : - -Veuillez vous assurer d'utiliser les paramètres corrects comme documenté [ici](../info/nxf_versions.md). - -La formation nécessite en outre **nf-core tools 3.5.2**. +La formation nécessite en outre **nf-core tools 4.0.2**. Si vous utilisez une version différente des outils nf-core, vous pourriez rencontrer des difficultés à suivre. Vous pouvez vérifier quelle version est installée dans votre environnement à l'aide de la commande `nf-core --version`. +!!! warning "Compatibilité avec l'analyseur v2" + + De nombreux pipelines nf-core ne prennent pas encore en charge l'analyseur de syntaxe v2. + Si vous exécutez un pipeline nf-core autre que ceux utilisés dans ce cours et rencontrez des erreurs, vous devrez peut-être passer à l'analyseur v1 en définissant `export NXF_SYNTAX_PARSER=v1`. + Consultez les [notes de version](../info/nxf_versions.md) pour plus de détails. + ## Préparez-vous à travailler Une fois votre codespace en cours d'exécution, vous devez faire deux choses avant de vous plonger dans la formation : définir votre répertoire de travail pour ce cours spécifique et examiner les ressources fournies. @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ Nous utilisons des sections repliables comme celle-ci pour inclure la sortie de - **Le fichier `greetings.csv`** est un CSV contenant des données colonnes minimales que nous utilisons à des fins de test. +- **Le fichier `custom.config`** est un exemple de fichier de configuration Nextflow utilisé dans la Partie 1 pour illustrer les remplacements de ressources de processus et `ext.args`. + +- **Le fichier `malformed_samplesheet.csv`** est une feuille d'échantillons intentionnellement incorrecte utilisée dans la Partie 1 pour illustrer la validation des entrées. + +- **Le fichier `my_params.yml`** est un exemple de fichier de paramètres utilisé dans la Partie 1 pour illustrer comment passer des paramètres booléens à un pipeline. + - **Le répertoire `original-hello`** contient une copie du code source produit en suivant la série de formation complète Hello Nextflow (avec Docker activé). - **Le répertoire `solutions`** contient les scripts de workflow complétés qui résultent de chaque étape du cours. @@ -112,7 +116,7 @@ Pensez-vous être prêt·e à vous lancer ? - [ ] Je comprends l'objectif de ce cours et ses prérequis - [ ] Mon environnement est opérationnel -- [ ] Je me suis assuré que l'analyseur de syntaxe est défini sur **v1** +- [ ] J'utilise nf-core tools 4.0.2 (à vérifier avec `nf-core --version`) - [ ] J'ai défini mon répertoire de travail de manière appropriée Si vous pouvez cocher toutes les cases, vous êtes prêt·e à commencer. diff --git a/docs/fr/docs/hello_nf-core/01_run_demo.md b/docs/fr/docs/hello_nf-core/01_run_demo.md index 0cdcfa8320..a7f5fa2729 100644 --- a/docs/fr/docs/hello_nf-core/01_run_demo.md +++ b/docs/fr/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ L'onglet `Introduction` fournit un aperçu du pipeline, incluant une représenta ![carte de métro du pipeline](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. Exemple de ligne de commande @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow effectue un `pull` du code du pipeline, c'est-à-dire qu'il télécharge le dépôt complet sur votre disque local. @@ -106,40 +107,73 @@ nextflow list Vous pouvez essayer de récupérer quelques autres pipelines pour voir comment ils apparaissent dans la liste lorsque vous en avez plusieurs. -#### 1.2.3. Trouver vos pipelines dans `$NXF_HOME/assets/` +#### 1.2.3. Trouver l'emplacement du pipeline téléchargé Vous remarquerez que les fichiers ne se trouvent pas dans votre répertoire de travail actuel. -Par défaut, Nextflow les enregistre dans `$NXF_HOME/assets`. +Par défaut, Nextflow enregistre les pipelines récupérés dans `$NXF_HOME/assets`. + +Pour trouver l'emplacement d'un pipeline spécifique, interrogez Nextflow directement : ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "Sortie de la commande" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "Note" +!!! info "Info" Le chemin complet peut différer sur votre système si vous n'utilisez pas notre environnement de formation. Nextflow garde intentionnellement le code source téléchargé 'à l'écart' sur le principe que ces pipelines doivent être utilisés davantage comme des bibliothèques que comme du code avec lequel vous interagiriez directement. +En coulisses, Nextflow stocke chaque pipeline récupéré comme un dépôt git dans `$NXF_HOME/assets/.repos/`, et extrait le code pour chaque révision dans un sous-répertoire `clones//`. +Comme `.repos` est un répertoire caché, un simple `tree -L 2 $NXF_HOME/assets/` semblera vide. + #### 1.2.4. Créer un lien symbolique pour accéder facilement au code source Nous n'allons pas examiner le code en détail, mais jetons-y un coup d'œil rapide pour avoir une idée de l'organisation générale. -Pour faciliter la navigation dans le code source du pipeline, créez un lien symbolique vers le répertoire assets : +Pour faciliter la navigation dans le code source du pipeline, créez un lien symbolique pointant vers la copie extraite du pipeline : ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -Cela crée un raccourci qui vous permet d'explorer le code avec `tree -L 2 pipelines` ou d'ouvrir des fichiers directement. +Cela crée un raccourci qui vous permet d'explorer le code avec `tree -L 2 pipelines/nf-core/demo` ou d'ouvrir des fichiers directement. #### 1.2.5. Aperçu de l'organisation du code @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` Comme vous pouvez le voir, il se passe beaucoup de choses là-dedans, dont la plupart ne vous concernent pas. @@ -211,7 +247,7 @@ De manière pratique, chaque pipeline nf-core est fourni avec un profil de test. Il s'agit d'un ensemble minimal de paramètres de configuration permettant au pipeline de s'exécuter en utilisant un petit jeu de données de test hébergé dans le dépôt [nf-core/test-datasets](https://github.com/nf-core/test-datasets). C'est un excellent moyen d'essayer rapidement un pipeline à petite échelle. -!!! note "Note" +!!! tip "Astuce" Le système de profils de configuration de Nextflow vous permet de basculer facilement entre différents moteurs de conteneurs ou environnements d'exécution. Pour plus de détails, consultez [Hello Nextflow Partie 6 : Configuration](../hello_nextflow/06_hello_config.md). @@ -220,10 +256,10 @@ C'est un excellent moyen d'essayer rapidement un pipeline à petite échelle. C'est une bonne pratique de vérifier ce que spécifie le profil de test d'un pipeline avant de l'exécuter. Le profil `test` pour `nf-core/demo` se trouve dans le fichier de configuration `conf/test.config`. -Vous pouvez le trouver localement dans le code source du pipeline téléchargé par `nextflow pull` : +Vous pouvez le trouver localement dans le code source du pipeline téléchargé par `nextflow pull`, via le lien symbolique `pipelines` créé à la section 1.2.4 : ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` Voici le contenu de ce fichier : @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Données d'entrée - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` C'est ce qu'on appelle une feuille d'échantillons (samplesheet), et c'est la forme d'entrée la plus courante pour les pipelines nf-core. +Ne vous inquiétez pas si vous n'êtes pas familier·ère avec les formats et types de données, ce n'est pas important pour la suite. -!!! note "Note" - - Ne vous inquiétez pas si vous n'êtes pas familier·ère avec les formats et types de données, ce n'est pas important pour la suite. - -Cela confirme donc que nous avons tout ce dont nous avons besoin pour essayer le pipeline. +Nous avons maintenant tout ce dont nous avons besoin pour essayer le pipeline. ### 2.2. Exécuter le pipeline -Décidons d'utiliser Docker pour le système de conteneurs et `demo-results` comme répertoire de sortie, et nous sommes prêt·es à exécuter la commande de test : +Comme indiqué ci-dessus, nous pouvons utiliser l'exemple de commande de test presque tel quel ; nous devons simplement spécifier quel système de packaging logiciel utiliser et quel nom donner au répertoire de sortie. +Nous utiliserons Docker pour le système de conteneurs et `demo-results`, respectivement. + +Avec cela, nous pouvons exécuter la commande de test : ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ Si votre sortie correspond à celle-ci, félicitations ! Vous venez d'exécuter Vous remarquerez qu'il y a beaucoup plus de sortie console que lorsque vous exécutez un pipeline Nextflow basique. Il y a un en-tête qui inclut un résumé de la version du pipeline, des entrées et sorties, et quelques éléments de configuration. -!!! note "Note" +!!! info "Info" Votre sortie affichera des horodatages, des noms d'exécution et des chemins de fichiers différents, mais la structure globale et l'exécution des processus devraient être similaires. Remarquez la ligne en haut de la sortie : ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` Cela vous indique quelle révision du pipeline a été utilisée. @@ -379,7 +417,7 @@ Comme nous n'avons pas spécifié de version, Nextflow a utilisé le dernier com Pour des exécutions reproductibles, vous devriez fixer une version spécifique en utilisant le flag `-r` : ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` Cela garantit que le même code de pipeline est utilisé à chaque fois, indépendamment des nouveaux commits ou versions. @@ -388,14 +426,15 @@ Pour cette formation, nous omettons `-r` par souci de simplicité, mais en produ Passons maintenant à la sortie d'exécution, et jetons un coup d'œil aux lignes qui nous indiquent quels processus ont été exécutés : ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Cela nous indique que trois processus ont été exécutés, correspondant aux trois outils présentés dans la page de documentation du pipeline sur le site web nf-core : FASTQC, SEQTK_TRIM et MULTIQC. +Cela nous indique que quatre processus ont été exécutés, correspondant aux quatre outils présentés dans la page de documentation du pipeline sur le site web nf-core : `FASTQC`, `SEQTK_TRIM`, `MULTIQC` et `COWPY`. Les noms complets des processus tels qu'affichés ici, comme `NFCORE_DEMO:DEMO:MULTIQC`, sont plus longs que ce que vous avez pu voir dans le matériel d'introduction Hello Nextflow. Ils incluent les noms de leurs workflows parents et reflètent la modularité du code du pipeline. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` Cela peut sembler beaucoup. -Pour en savoir plus sur les sorties du pipeline `nf-core/demo`, consultez sa [page de documentation](https://nf-co.re/demo/1.1.0/docs/output/). +Pour en savoir plus sur les sorties du pipeline `nf-core/demo`, consultez sa [page de documentation](https://nf-co.re/demo/1.2.0/docs/output/). À ce stade, ce qui est important d'observer est que les résultats sont organisés par module, et il y a en plus un répertoire appelé `pipeline_info` contenant divers rapports horodatés sur l'exécution du pipeline. @@ -443,7 +485,7 @@ Par exemple, le fichier `execution_timeline_*` vous montre quels processus ont ![rapport de chronologie d'exécution](./img/execution_timeline.png) -!!! note "Note" +!!! info "Info" Ici, les tâches n'ont pas été exécutées en parallèle car nous fonctionnons sur une machine minimaliste dans Github Codespaces. Pour voir ces tâches s'exécuter en parallèle, essayez d'augmenter l'allocation CPU de votre codespace et les limites de ressources dans la configuration de test. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,29 +596,103 @@ Dans les pipelines Nextflow simples, `--help` ne fonctionne que si le développe Comme abordé dans [Hello Config](../hello_nextflow/06_hello_config.md), vous pouvez définir les valeurs des paramètres sur la ligne de commande avec `--nom_param` ou regrouper un ensemble de paramètres dans un fichier YAML et le passer avec `-params-file`. Les deux approches fonctionnent de la même manière avec les pipelines nf-core. -Par exemple, pour ignorer l'étape de rognage : +Par exemple, pour ignorer l'étape de rognage, nous souhaitons définir le paramètre booléen `skip_trim` à `true`. +Un fichier de paramètres appelé `my_params.yml` est fourni dans votre répertoire de travail avec cette valeur déjà définie : + +```yaml title="my_params.yml" +skip_trim: true +``` + +Passez-le avec `-params-file` : ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "Sortie de la commande" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` Le processus `SEQTK_TRIM` n'apparaît plus dans la sortie. -!!! info "Info" +!!! warning "Avertissement : limitations importantes concernant les entrées de paramètres" + + **Définir des paramètres booléens sur la ligne de commande** + + À partir de la version 26.04 de Nextflow, toutes les valeurs fournies sur la ligne de commande sont typées comme des chaînes de caractères. + Pour un paramètre booléen comme `skip_trim`, le passer comme un flag seul (`--skip_trim`) ou comme `--skip_trim true` est évalué comme la **chaîne** `"true"`, ce qui échoue à la validation du schéma : + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + Pour définir un paramètre booléen à une valeur `true`/`false` authentique, utilisez un `-params-file` comme indiqué ci-dessus, ou définissez-le dans un fichier de configuration. + Les paramètres de type string, integer et file-path ne sont pas affectés et peuvent toujours être définis directement sur la ligne de commande. + Ce cours utilise ce modèle tout au long pour les paramètres booléens. + + **Utiliser des fichiers de configuration personnalisés** Bien qu'il soit techniquement possible de définir des paramètres du pipeline dans un fichier de configuration personnalisé passé avec `-c`, cela peut ne pas remplacer les valeurs par défaut déjà définies dans le propre `nextflow.config` du pipeline, selon les règles de priorité de configuration de Nextflow. L'utilisation de `--nom_param` sur la ligne de commande ou de `-params-file` est plus fiable, car ces méthodes ont toujours la priorité. - **En règle générale :** si un paramètre apparaît dans la sortie de `--help`, définissez-le via la ligne de commande ou un fichier de paramètres plutôt que dans un fichier de configuration. + En règle générale : si un paramètre apparaît dans la sortie de `--help`, définissez-le via la ligne de commande ou un fichier de paramètres plutôt que dans un fichier de configuration. #### 3.1.3. Validation des paramètres @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` Le pipeline s'exécute quand même, mais l'avertissement vous alerte immédiatement que `--foobar` n'est pas un paramètre reconnu. -Cela permet de détecter les fautes de frappe comme `--outDir` au lieu de `--outdir` avant de gaspiller du temps de calcul à se demander pourquoi la sortie s'est retrouvée au mauvais endroit. +Cela permet de détecter les fautes de frappe comme `--outDir` au lieu de `--outdir`, ce qui peut vous éviter de perdre du temps et des ressources de calcul. ##### 3.1.3.2. Valeurs de paramètres invalides @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` Le pipeline s'arrête avant qu'aucun processus ne s'exécute, vous évitant une exécution échouée ou incorrecte. -Les paramètres booléens doivent être passés comme des flags (`--skip_trim`) sans valeur, ou définis à `true`/`false` dans un fichier de paramètres. +Comme indiqué à la section 3.1.2, les paramètres booléens doivent être définis à une valeur `true`/`false` authentique dans un fichier de paramètres plutôt que passés sur la ligne de commande, car les valeurs en ligne de commande sont typées comme des chaînes de caractères. #### 3.1.4. Validation des entrées @@ -637,7 +756,7 @@ Nous abordons également cela plus en détail dans la [Partie 5 : Validation des Le pipeline `nf-core/demo` attend un fichier CSV avec les colonnes `sample`, `fastq_1` et `fastq_2`. Cela est défini dans un fichier de schéma (`assets/schema_input.json`) qui spécifie la structure attendue, les types de colonnes et les contraintes. -??? abstract "assets/schema_input.json" +??? abstract "Fichier de schéma pour les entrées" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Cela est défini dans un fichier de schéma (`assets/schema_input.json`) qui sp Le schéma spécifie que `sample` et `fastq_1` sont obligatoires, tandis que `fastq_2` est optionnel (prenant en charge les données paired-end et single-end). Les chemins de fichiers sont validés pour leur existence et leur extension. -##### 3.1.4.1. Créer une feuille d'échantillons invalide - -Créez une feuille d'échantillons avec une colonne manquante et un chemin de fichier inexistant : +Pour illustrer cela, une feuille d'échantillons malformée appelée `malformed_samplesheet.csv` est fournie dans votre répertoire de travail : ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` Cette feuille d'échantillons est dépourvue de la colonne obligatoire `fastq_1` et contient un chemin de fichier inexistant dans `fastq_2`. -Ces deux problèmes produiront des erreurs de validation à l'étape suivante. - -##### 3.1.4.2. Exécuter le pipeline demo avec la feuille d'échantillons invalide -Exécutez le pipeline demo en utilisant `malformed_samplesheet.csv` comme entrée. +Exécutez le pipeline demo en utilisant `malformed_samplesheet.csv` comme entrée : ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -724,15 +839,28 @@ La configuration au sens strict contrôle **comment** le pipeline s'exécute : l Les pipelines nf-core incluent une configuration par défaut dans `nextflow.config` et le répertoire `conf/`. Avant de remplacer quoi que ce soit, il est utile de savoir où se trouvent les valeurs par défaut. -Vous avez déjà vu dans la section 2.1 que le code source du pipeline se trouve dans `$NXF_HOME/assets`. -Listez les fichiers de configuration pour voir ce qui est disponible : +Vous avez déjà vu à la section 2.1 que le code source du pipeline se trouve dans `$NXF_HOME/assets`. +En utilisant le lien symbolique `pipelines` de la section 1.2.4, listez les fichiers de configuration pour voir ce qui est disponible : ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -743,7 +871,7 @@ Les fichiers de configuration les plus importants sont : - **`conf/base.config`** : Définit des labels de ressources (`process_low`, `process_medium`, `process_high`) qui attribuent des CPUs, de la mémoire et du temps aux processus. Lorsque vous constatez qu'un processus utilise plus de ressources que prévu, c'est là que se trouvent ces valeurs par défaut. - **`conf/modules.config`** : Définit les arguments des outils par processus (`ext.args`) et les paramètres de publication des sorties (`publishDir`). Ouvrez ce fichier pour voir quels arguments chaque outil reçoit par défaut. -- **`conf/test.config`** : Le profil de test que vous avez utilisé dans la section 2.1, qui limite les ressources via `resourceLimits` et définit une feuille d'échantillons de test. Activé avec `-profile test`. +- **`conf/test.config`** : Le profil de test que vous avez utilisé à la section 2.1, qui limite les ressources via `resourceLimits` et définit une feuille d'échantillons de test. Activé avec `-profile test`. Il existe également un `conf/test_full.config` pour exécuter le pipeline avec un jeu de données de test de taille complète, utile pour les benchmarks. Le fichier central `nextflow.config` charge tous les fichiers ci-dessus et définit les valeurs par défaut appropriées pour tout. @@ -752,56 +880,18 @@ Si vous souhaitez modifier l'un des paramètres spécifiés dans ces fichiers, n Créez plutôt votre propre fichier de configuration et passez-le avec `-c`. Les valeurs que vous spécifiez remplaceront les valeurs par défaut définies dans ces autres fichiers. -Passons en revue quelques exercices pour mettre cela en pratique. +Essayons cela en pratique. -#### 3.2.1. Modifier l'allocation des ressources pour un processus +#### 3.2.1. Personnaliser les ressources des processus et les arguments des outils -Le pipeline demo attribue des ressources en utilisant des labels définis dans `base.config`. -Par exemple, `FASTQC` utilise le label `process_medium`, qui alloue 6 CPUs et 36 Go de mémoire. +Les modules nf-core prennent en charge deux types courants de remplacement de configuration : **l'allocation des ressources** (CPUs, mémoire, temps) et les **arguments des outils** via `ext.args`. -Le profil de test limite les ressources via `resourceLimits`, mais vous pouvez également remplacer les ressources pour des processus spécifiques. +De nombreux outils en ligne de commande ont des arguments qui ne sont pas suffisamment courants pour être exposés comme paramètres du pipeline. +La convention `ext.args` vous permet de passer ces arguments à l'outil sous-jacent via un fichier de configuration. -Créez un fichier appelé `custom.config` : +Le fichier `custom.config` fourni dans votre répertoire de travail illustre ces deux types de remplacement : ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -Exécutez le pipeline avec votre configuration personnalisée : - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "Sortie de la commande" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -Le flag `-c` ajoute votre configuration par-dessus la configuration intégrée du pipeline. - -#### 3.2.2. Définir les valeurs des arguments des outils avec `ext.args` - -De nombreux outils en ligne de commande ont des arguments qui ne sont pas obligatoires et ne sont donc pas configurés comme paramètres du pipeline, sauf s'ils sont très couramment utilisés. -Pour ces arguments d'outils, les modules nf-core utilisent une convention Nextflow appelée `ext.args` pour passer des arguments à l'outil sous-jacent via un fichier de configuration. - -Par exemple, ajoutons un argument de rognage au module `SEQTK_TRIM` en utilisant `ext.args`. - -##### 3.2.2.1. Mettre à jour la configuration personnalisée - -Mettez à jour votre `custom.config` : - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -Cela indique à `seqtk trimfq` de rogner 5 bases au début de chaque lecture en plus du rognage par qualité. +Le premier bloc remplace l'allocation des ressources de `FASTQC`. +Par défaut, `FASTQC` utilise le label `process_medium` de `base.config`, qui alloue 6 CPUs et 36 Go de mémoire ; ici nous le limitons à 2 CPUs et 4 Go. -##### 3.2.2.2. Exécuter le pipeline +Le second bloc passe un argument supplémentaire à `SEQTK_TRIM` via `ext.args`. +Le flag `-b 5` indique à `seqtk trimfq` de rogner 5 bases au début de chaque lecture en plus du rognage par qualité. -Exécutez à nouveau le pipeline avec cette configuration pour voir l'effet : +Exécutez le pipeline avec cette configuration : ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "Sortie de la commande" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Pour vérifier que l'argument a bien été appliqué, trouvez le hash du répertoire de travail de `SEQTK_TRIM` dans la sortie d'exécution (par exemple `work/ab/cd1234...`) et vérifiez le fichier `.command.sh` à l'intérieur : +Le flag `-c` ajoute votre configuration par-dessus la configuration intégrée du pipeline. + +Pour vérifier que le remplacement `ext.args` a bien pris effet, trouvez le hash du répertoire de travail de `SEQTK_TRIM` dans la sortie d'exécution (par exemple `work/17/428668...`) et vérifiez le fichier `.command.sh` à l'intérieur : ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "Sortie de la commande" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` -Vous devriez voir `-b 5` dans la commande `seqtk trimfq`, confirmant que votre remplacement `ext.args` a bien pris effet. +Vous devriez voir `-b 5` dans la commande `seqtk trimfq`. -##### 3.2.2.3. Remplacer les valeurs par défaut - -Certains modules ont `ext.args` déjà défini par défaut. -Par exemple, le module `FASTQC` est configuré avec `ext.args = '--quiet'` par défaut (défini dans `conf/modules.config`). +Une chose importante à savoir concernant `ext.args` : si un module a déjà une valeur par défaut définie, votre valeur la **remplacera complètement** plutôt que de s'y ajouter. +Par exemple, le module `FASTQC` est configuré avec `ext.args = '--quiet'` par défaut (défini dans `conf/modules.config`) : ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -Si vous fournissez une valeur pour `ext.args` via un fichier de configuration personnalisé, cette valeur remplacera complètement la valeur par défaut définie pour ce processus. - -Ainsi, par exemple, si la valeur par défaut était `'--quiet'` et que vous définissez `ext.args = '--kmers 8'`, le flag `--quiet` ne sera plus appliqué. +Si vous définissez `ext.args = '--kmers 8'` pour `FASTQC`, le flag `--quiet` ne sera plus appliqué. Pour conserver les deux, définissez `ext.args = '--quiet --kmers 8'`. -Cela signifie que vous êtes responsable de vérifier quelle est la configuration par défaut des outils auxquels vous souhaitez fournir des valeurs d'arguments avec `ext.args`. +Vous devez toujours vérifier la configuration par défaut d'un module avant de remplacer `ext.args`. ### À retenir @@ -878,4 +976,6 @@ Vous savez comment obtenir de l'aide depuis un pipeline nf-core, définir des pa ### Et ensuite ? -Faites une pause ! Lorsque vous vous sentez prêt·e, passez à la Partie 2, où vous créerez votre propre pipeline compatible nf-core à partir de zéro. +Si vous souhaitez uniquement exécuter des pipelines nf-core, vous avez terminé ! + +Si vous souhaitez apprendre à développer vos propres pipelines selon les standards nf-core, faites une pause, puis passez à la Partie 2 lorsque vous vous sentez prêt·e. Vous apprendrez à créer votre propre pipeline compatible nf-core en utilisant les outils basés sur le template nf-core. diff --git a/docs/fr/docs/hello_nf-core/02_rewrite_hello.md b/docs/fr/docs/hello_nf-core/02_rewrite_hello.md index 3727a565fa..dee267a65e 100644 --- a/docs/fr/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/fr/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Si vous n'êtes pas familier·ère avec le pipeline Hello ou si vous avez besoin - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "Note" - - Assurez-vous d'être dans le répertoire `hello-nf-core` dans votre terminal. - --- ## 1. Examiner la structure du code du pipeline @@ -30,6 +26,7 @@ Le projet nf-core impose des directives strictes sur la façon dont les pipeline Avant de nous attaquer à notre projet de création de pipeline, nous devons comprendre cette structure et cette organisation. Examinons donc comment le code du pipeline est organisé dans le dépôt `nf-core/demo`, en utilisant le lien symbolique `pipelines` que nous avons créé dans la Partie 1. +Assurez-vous d'être dans le répertoire `hello-nf-core` dans votre terminal. Pour rappel, vous pouvez utiliser `tree` ou l'explorateur de fichiers pour trouver et ouvrir le répertoire `nf-core/demo`. @@ -82,7 +79,7 @@ Voici à quoi ressemblent les relations entre les composants de code pertinents Le workflow sans nom dans `main.nf` est appelé script de _point d'entrée_. Il sert d'enveloppe pour deux types de workflows imbriqués : le workflow `DEMO` contenant la logique d'analyse réelle, situé dans `workflows/demo.nf`, et un ensemble de workflows de maintenance situés sous `subworkflows/`. Le workflow `demo.nf` fait appel à des **modules** situés sous `modules/` ; ceux-ci contiennent les **processus** qui effectueront les étapes d'analyse réelles. -!!! note "Note" +!!! info "Info" Les sous-workflows ne se limitent pas aux fonctions de maintenance, et ils peuvent utiliser des modules de processus. @@ -107,7 +104,7 @@ Nous couvrirons les différences pertinentes dans la prochaine partie de ce cour Le workflow `demo.nf` fait appel à des **modules** situés sous `modules/`, que nous allons examiner ensuite. -!!! note "Note" +!!! info "Info" Certains workflows d'analyse nf-core affichent des niveaux d'imbrication supplémentaires en faisant appel à des sous-workflows de niveau inférieur. Cela est principalement utilisé pour regrouper deux modules ou plus couramment utilisés ensemble en segments de pipeline facilement réutilisables. @@ -266,13 +263,20 @@ Une fois que la TUI se ferme, vous devriez voir la sortie de console suivante. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -Il n'y a pas de confirmation explicite dans la sortie de console que la création du pipeline a réussi, mais vous devriez voir un nouveau répertoire appelé `core-hello`. +Une fois que la TUI a terminé, l'outil indique qu'il a créé le pipeline et généré sa configuration de conteneur : + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +Vous devriez maintenant voir un nouveau répertoire appelé `core-hello`. Visualisez le contenu du nouveau répertoire pour voir combien de travail vous vous êtes épargné·e en utilisant le modèle. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "Contenu du répertoire" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` Cela fait beaucoup de fichiers ! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +Les lignes `WARN: Unrecognized config option 'validation.*'` proviennent de la version du plugin nf-schema épinglée dans le modèle fraîchement créé. +Elles sont sans conséquence et n'affectent pas l'exécution. + Cela vous montre que tout le câblage de base est en place. Alors où sont les sorties ? Y en a-t-il ? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -435,7 +446,7 @@ Regardons de plus près. Celui-ci sert de substitut pour notre workflow d'analyse, avec certaines fonctionnalités nf-core déjà en place. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -454,14 +465,16 @@ workflow HELLO { take: ch_samplesheet // canal : samplesheet lu depuis --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Rassembler et enregistrer les versions des logiciels // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -478,19 +491,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -503,15 +513,15 @@ workflow HELLO { Par rapport à un workflow Nextflow basique comme celui développé dans [Hello Nextflow](../hello_nextflow/index.md), vous remarquerez quelques nouveautés ici (lignes surlignées ci-dessus) : - Le bloc workflow a un nom -- Les entrées du workflow sont déclarées en utilisant le mot-clé `take:` et la construction du canal est déplacée vers le workflow parent +- Les entrées du workflow sont déclarées en utilisant le mot-clé `take:` (ici un canal de samplesheet et un répertoire de sortie), et la construction du canal est déplacée vers le workflow parent - Le contenu du workflow est placé à l'intérieur d'un bloc `main:` - Les sorties sont déclarées en utilisant le mot-clé `emit:` Ce sont des fonctionnalités optionnelles de Nextflow qui rendent le workflow **composable**, ce qui signifie qu'il peut être appelé depuis un autre workflow. -??? note "Le bloc `Channel.topic`" +??? note "Le bloc `channel.topic`" - Vous avez peut-être remarqué le bloc `def topic_versions = Channel.topic("versions")` qui commence à la ligne 17. + Vous avez peut-être remarqué le bloc `def topic_versions = channel.topic("versions")` qui commence à la ligne 28. Il s'agit d'un code de maintenance standard qui collecte automatiquement les informations de version des logiciels depuis tous les modules. nf-core déploie ce mécanisme dans tous les pipelines en 2026, vous le verrez donc dans tous les nouveaux pipelines à l'avenir. La Partie 4 de ce cours explique son fonctionnement en détail. @@ -575,15 +585,15 @@ nextflow run original-hello/hello.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` Si cela fonctionne, vous êtes prêt·e à commencer. @@ -704,7 +714,7 @@ Pendant que nous y sommes, nous pouvons également commenter la ligne `params.gr params.character = 'turkey' ``` -!!! note "Note" +!!! info "Info" Si vous avez l'extension du serveur de langage Nextflow installée, le vérificateur de syntaxe éclairera votre code avec des lignes ondulées rouges. C'est parce que si vous mettez une déclaration `take:`, vous devez aussi avoir un `main:`. @@ -851,7 +861,7 @@ Il y a deux observations importantes à faire ici : - La syntaxe pour appeler le workflow importé est essentiellement la même que la syntaxe pour appeler des modules. - Tout ce qui est lié à l'acheminement des entrées dans le workflow (paramètre d'entrée et construction de canal) est maintenant déclaré dans ce workflow parent. -!!! note "Note" +!!! info "Info" Nommer le fichier de workflow de point d'entrée `main.nf` est une convention, pas une exigence. @@ -878,19 +888,19 @@ Si vous avez effectué toutes les modifications correctement, cela devrait s'ex ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -Cela signifie que nous avons réussi à mettre à niveau notre workflow HELLO pour le rendre composable. +Cela signifie que nous avons réussi à mettre à niveau notre workflow `HELLO` pour le rendre composable. ### À retenir @@ -932,14 +942,16 @@ workflow HELLO { take: ch_samplesheet // canal : samplesheet lu depuis --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Rassembler et enregistrer les versions des logiciels // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -956,19 +968,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -978,8 +987,8 @@ workflow HELLO { */ ``` -Les lignes surlignées définissent la structure du workflow composable : `workflow HELLO {`, `take:`, `main:` et `emit:`. -Le grand bloc entre les lignes 17–34 est plus substantiel : il gère la capture des versions des logiciels en utilisant des topic channels, un mécanisme que nf-core déploie dans tous les pipelines en 2026. +Voici la structure du workflow composable : un bloc nommé `workflow HELLO {` avec `take:`, `main:` et `emit:`. +Le bloc sous `// Collate and save software versions` est plus substantiel : il gère la capture des versions des logiciels en utilisant des topic channels, un mécanisme que nf-core déploie dans tous les pipelines en 2026. Nous l'expliquerons dans la Partie 4 ; pour l'instant, considérez-le comme du code standard que vous pouvez laisser tel quel. Nous devons ajouter le code pertinent de la version composable du workflow original que nous avons développée dans la section 2. @@ -991,7 +1000,7 @@ Nous allons aborder cela dans les étapes suivantes : 3. Ajouter la logique du workflow au bloc `main` 4. Mettre à jour le bloc `emit` -!!! note "Note" +!!! info "Info" Nous allons ignorer le bloc de capture de version pour cette première passe. La Partie 4 explique son fonctionnement. @@ -1079,9 +1088,10 @@ Deux autres observations intéressantes ici : Le projet nf-core a beaucoup de fonctionnalités préconçues autour du concept de samplesheet, qui est typiquement un fichier CSV contenant des données en colonnes. Puisque c'est essentiellement ce qu'est notre fichier `greetings.csv`, nous garderons la déclaration `take` actuelle telle quelle, et mettrons simplement à jour le nom du canal d'entrée à l'étape suivante. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // canal : samplesheet lu depuis --input + outdir ``` La gestion des entrées sera effectuée en amont de ce workflow (pas dans ce fichier de code). @@ -1111,20 +1121,21 @@ Pour rappel, voici le code pertinent dans le workflow original, qui n'a pas beau Nous devons copier le code qui vient après `main:` dans la nouvelle version du workflow. Il y a déjà du code là-dedans qui a à voir avec la capture des versions des outils qui sont exécutés par le workflow. Nous allons laisser cela tranquille pour l'instant (nous traiterons les versions d'outils plus tard). -Nous garderons l'initialisation `ch_versions = channel.empty()` en haut, puis insérerons notre logique de workflow, en gardant le code de collecte des versions à la fin. +Nous garderons l'initialisation `def ch_versions = channel.empty()` en haut, puis insérerons notre logique de workflow, en gardant le code de collecte des versions à la fin. Cet ordonnancement a du sens car dans un vrai pipeline, les processus émettraient des informations de version qui seraient ajoutées au canal `ch_versions` pendant l'exécution du workflow. === "Après" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // canal : samplesheet lu depuis --input + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // émettre une salutation sayHello(greeting_ch) @@ -1141,7 +1152,7 @@ Cet ordonnancement a du sens car dans un vrai pipeline, les processus émettraie // // Rassembler et enregistrer les versions des logiciels // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1158,37 +1169,36 @@ Cet ordonnancement a du sens car dans un vrai pipeline, les processus émettraie "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` === "Avant" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // canal : samplesheet lu depuis --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Rassembler et enregistrer les versions des logiciels // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1205,36 +1215,31 @@ Cet ordonnancement a du sens car dans un vrai pipeline, les processus émettraie "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` -Vous remarquerez que nous avons également ajouté une ligne vide avant `main:` pour rendre le code plus lisible. - Cela semble très bien, mais nous devons encore mettre à jour le nom du canal que nous passons au processus `sayHello()` de `greeting_ch` à `ch_samplesheet` comme montré ci-dessous, pour correspondre à ce qui est écrit sous le mot-clé `take:`. === "Après" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) ``` === "Avant" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // émettre une salutation sayHello(greeting_ch) ``` @@ -1247,7 +1252,7 @@ Enfin, nous devons mettre à jour le bloc `emit` pour inclure la déclaration de === "Après" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // channel: [ path(versions.yml) ] @@ -1255,12 +1260,12 @@ Enfin, nous devons mettre à jour le bloc `emit` pour inclure la déclaration de === "Avant" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // channel: [ path(versions.yml) ] ``` -Ceci conclut les modifications que nous devons apporter au workflow HELLO lui-même. +Ceci conclut les modifications que nous devons apporter au workflow `HELLO` lui-même. À ce stade, nous avons atteint la structure globale du code que nous nous étions fixés pour objectif. ### À retenir @@ -1324,7 +1329,8 @@ workflow CORE_HELLO { // WORKFLOW: Run pipeline // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1361,7 +1367,6 @@ workflow { // SUBWORKFLOW: Run completion tasks // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1377,7 +1382,7 @@ Le projet nf-core fait un usage intensif de sous-workflows imbriqués, donc cett Ce qui compte ici, c'est qu'il y a deux workflows définis : -- `CORE_HELLO` est une enveloppe mince pour exécuter le workflow HELLO que nous venons de finir d'adapter dans `core-hello/workflows/hello.nf`. +- `CORE_HELLO` est une enveloppe mince pour exécuter le workflow `HELLO` que nous venons de finir d'adapter dans `core-hello/workflows/hello.nf`. - Un workflow sans nom qui appelle `CORE_HELLO` ainsi que deux autres sous-workflows, `PIPELINE_INITIALISATION` et `PIPELINE_COMPLETION`. Voici un diagramme de la façon dont ils sont liés les uns aux autres : @@ -1422,9 +1427,9 @@ Si nous ouvrons ce fichier et faisons défiler vers le bas, nous arrivons à ce versions = ch_versions ``` -C'est la fabrique de canaux qui analyse le samplesheet et le transmet sous une forme prête à être consommée par le workflow HELLO. +C'est la fabrique de canaux qui analyse le samplesheet et le transmet sous une forme prête à être consommée par le workflow `HELLO`. -!!! note "Note" +!!! info "Info" La syntaxe ci-dessus est un peu différente de ce que nous avons utilisé précédemment, mais fondamentalement ceci : @@ -1533,7 +1538,7 @@ Maintenant nous pouvons mettre à jour le fichier `test.config` comme suit : === "Après" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1595,13 +1600,53 @@ Et pendant que nous y sommes, resserrons les limites de ressources par défaut p Cela termine les modifications de code que nous devons effectuer. -### 5.4. Exécuter le pipeline avec le profil de test +### 5.4. Désactiver la validation des paramètres + +Nous avons remplacé l'analyse du samplesheet du modèle par notre propre construction de canal simple, mais le modèle fournit toujours un `nextflow_schema.json` et un `assets/schema_input.json` décrivant un samplesheet basé sur des fichiers FASTQ. +Comme nous n'avons pas encore adapté ces schémas à notre format `greetings.csv`, nous devons désactiver la validation des paramètres pour l'instant (nous la configurerons correctement plus tard). + +Ouvrez `core-hello/nextflow.config` et définissez `validate_params` à `false` : + +=== "Après" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "Avant" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +Nous définissons cela dans le fichier de configuration plutôt que sur la ligne de commande car à partir de Nextflow version 26.04, toutes les valeurs fournies sur la ligne de commande sont typées comme des chaînes de caractères. +Par conséquent, les paramètres booléens doivent être définis dans un fichier de configuration ou un `-params-file` pour prendre une valeur `true`/`false` authentique. + +Par exemple, utiliser `--validate_params false` ici serait évalué comme la **chaîne** `"false"`, ce qui laisserait la validation activée. + +!!! tip "Lignes de compatibilité du parseur v2 dans `nextflow.config`" + + En parlant de syntaxe v2, vous remarquerez peut-être ces deux lignes juste en dessous du bloc `params` dans le fichier de configuration : + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + Celles-ci sont requises pour la compatibilité avec le parseur de syntaxe v2. + + - Avec la syntaxe v2, les variables `params.*` ne peuvent pas être référencées directement à l'intérieur des directives `publishDir` dans les modules de processus, donc `outputDir` est défini ici comme une variable de configuration de niveau supérieur à laquelle ces directives peuvent accéder. + + - `workflow.output.mode` définit le mode de publication par défaut pour le bloc de sortie de workflow v2. + + Les deux sont générés automatiquement par le modèle de pipeline nf-core et n'ont pas besoin d'être modifiés. + +### 5.5. Exécuter le pipeline avec le profil de test C'était beaucoup, mais nous pouvons enfin essayer d'exécuter le pipeline ! -Notez que nous devons ajouter `--validate_params false` à la ligne de commande car nous n'avons pas encore configuré la validation (cela viendra plus tard). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` Si vous avez effectué toutes les modifications correctement, cela devrait s'exécuter jusqu'à la fin. @@ -1609,9 +1654,9 @@ Si vous avez effectué toutes les modifications correctement, cela devrait s'ex ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1623,10 +1668,10 @@ Si vous avez effectué toutes les modifications correctement, cela devrait s'ex Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1637,17 +1682,17 @@ Si vous avez effectué toutes les modifications correctement, cela devrait s'ex !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -Comme vous pouvez le voir, cela a produit le résumé typique nf-core au démarrage grâce au sous-workflow d'initialisation, et les lignes pour chaque module montrent maintenant les noms complets PIPELINE:WORKFLOW:module. +Comme vous pouvez le voir, cela a produit le résumé typique nf-core au démarrage grâce au sous-workflow d'initialisation, et les lignes pour chaque module montrent maintenant les noms complets `PIPELINE:WORKFLOW:module`. -### 5.5. Trouver les sorties du pipeline +### 5.6. Trouver les sorties du pipeline La question maintenant est : où sont les sorties du pipeline ? Et la réponse est assez intéressante : il y a maintenant deux endroits différents où chercher les résultats. @@ -1663,17 +1708,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1683,7 +1728,7 @@ Cette fois, vous voyez toutes les tâches qui ont été exécutées comme prévu ![rapport de chronologie d'exécution pour le pipeline Hello](./img/execution_timeline_hello.png) -!!! note "Note" +!!! info "Info" Une fois de plus, les tâches n'ont pas été exécutées en parallèle car nous exécutons sur une machine minimaliste dans Github Codespaces. Pour voir celles-ci s'exécuter en parallèle, essayez d'augmenter l'allocation de CPU de votre codespace et les limites de ressources dans la configuration de test. diff --git a/docs/fr/docs/hello_nf-core/03_use_module.md b/docs/fr/docs/hello_nf-core/03_use_module.md index 31fe31737f..59a9390817 100644 --- a/docs/fr/docs/hello_nf-core/03_use_module.md +++ b/docs/fr/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ Pour démontrer comment cela fonctionne, nous remplacerons le module personnalis Vous pouvez tester qu'il s'exécute avec succès en exécutant la commande suivante : ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ Accédez à la page des modules dans votre navigateur web et utilisez la barre d Comme vous pouvez le voir, il y a pas mal de résultats, dont beaucoup sont des modules conçus pour concaténer des types de fichiers très spécifiques. Parmi eux, vous devriez voir un module appelé `find_concatenate` qui est générique. -!!! note "Convention de nommage des modules" +!!! info "Convention de nommage des modules" Le caractère de soulignement (`_`) est utilisé comme substitut du caractère barre oblique (`/`) dans les noms de modules. @@ -120,9 +120,11 @@ Cela affiche la documentation sur le module, y compris ses entrées, ses sorties | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ Cela affiche la documentation sur le module, y compris ses entrées, ses sorties Ce sont exactement les mêmes informations que vous pouvez trouver sur le site web. +Vous pouvez ignorer le message `INFO Reinstalling modules found in 'modules.json' but missing from directory` ; il est émis par nf-core/tools 4.0.2 pour tout module que vous interrogez avec `info`, qu'il soit ou non réellement installé, et n'a aucun effet puisque la commande `info` n'écrit aucun fichier. + ### 1.4. Installer le module find/concatenate Maintenant que nous avons trouvé le module que nous voulons, nous devons l'ajouter au code source de notre pipeline. @@ -193,15 +197,13 @@ Maintenant que nous avons trouvé le module que nous voulons, nous devons l'ajou La bonne nouvelle est que le projet nf-core inclut des outils pour faciliter cette partie. Plus précisément, la commande `nf-core modules install` permet d'automatiser la récupération du code et de le rendre disponible à votre projet en une seule étape. -Accédez au répertoire de votre pipeline et exécutez la commande d'installation : +Assurez-vous que votre répertoire de travail actuel est la racine du projet de pipeline `core-hello`, puis exécutez la commande d'installation : ```bash cd core-hello nf-core modules install find/concatenate ``` -L'outil procédera à l'installation du module. - ??? success "Sortie de la commande" ```console @@ -212,26 +214,20 @@ L'outil procédera à l'installation du module. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -La commande effectue automatiquement : - -- Le téléchargement des fichiers du module dans `modules/nf-core/find/concatenate/` -- La mise à jour de `modules.json` pour suivre le module installé -- La fourniture de l'instruction `include` correcte à utiliser dans votre workflow - -!!! tip "Astuce" - - Assurez-vous toujours que votre répertoire de travail actuel est la racine de votre projet de pipeline avant d'exécuter la commande d'installation de module. +La commande télécharge les fichiers du module dans `modules/nf-core/find/concatenate/` et met à jour `modules.json` pour suivre le module installé. +Vous pouvez ignorer l'erreur `NotADirectoryError` à la fin ; elle survient parce que nf-core/tools 4.0.2 s'attend à ce que chaque module local soit dans son propre répertoire (`modules/local//main.nf`), alors que `core-hello` utilise encore des modules locaux sous forme de fichiers uniques à ce stade. +Cependant, le module `find/concatenate` est installé correctement et `modules.json` est mis à jour comme prévu. +Nous convertirons `cowpy` vers la structure en répertoire dans la Partie 4. -Vérifions que le module a été installé correctement : +Vérifions que les fichiers du module sont bien en place : ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -Vous pouvez également vérifier l'installation en demandant à l'utilitaire nf-core de lister les modules installés localement : +Vous pouvez également confirmer l'installation en inspectant `modules.json`, qui liste maintenant `find/concatenate` sous le dépôt nf-core/modules. + +??? abstract "Contenu du fichier" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +Cela confirme que le module `find/concatenate` fait maintenant partie du code source de votre projet. +Cependant, pour utiliser réellement le nouveau module, nous devons l'importer dans notre pipeline. + +Enfin, vous pouvez également utiliser la commande `nf-core modules list local` pour vérifier quels modules sont actuellement suivis dans votre pipeline. ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "Sortie de la commande" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -Cela confirme que le module `find/concatenate` fait maintenant partie du code source de votre projet. - -Cependant, pour utiliser réellement le nouveau module, nous devons l'importer dans notre pipeline. +Cela affiche `find/concatenate` dans le tableau résultant, accompagné de son dépôt, de son SHA de version, de son message et de sa date. ### 1.5. Mettre à jour les importations de module @@ -302,7 +354,7 @@ Ouvrez `core-hello/workflows/hello.nf` et effectuez la substitution suivante : === "Après" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ Ouvrez `core-hello/workflows/hello.nf` et effectuez la substitution suivante : include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "Avant" @@ -345,7 +397,7 @@ Pas si vite. Nous allons traiter cela comme une section séparée car cela implique un nouveau mécanisme que nous n'avons pas encore couvert : les métadonnées sous forme de map. -!!! note "Note" +!!! info "Info" Vous pouvez éventuellement supprimer le fichier `collectGreetings.nf` : @@ -373,7 +425,7 @@ Cela nous permettra de déterminer si nous pouvons simplement traiter le nouveau Idéalement, c'est quelque chose que vous devriez faire _avant_ même d'installer le module, mais bon, mieux vaut tard que jamais. (Pour information, il existe une commande `uninstall` pour se débarrasser des modules que vous décidez de ne plus vouloir.) -!!! note "Note" +!!! info "Info" Le processus FIND_CONCATENATE inclut une gestion assez intelligente de différents types de compression, d'extensions de fichiers, etc. qui ne sont pas strictement pertinents pour ce que nous essayons de vous montrer ici, donc nous ignorerons la plupart de ces éléments et nous concentrerons uniquement sur les parties importantes. @@ -512,7 +564,7 @@ Comme mentionné précédemment, la configuration d'entrée `tuple val(meta), pa Nous espérons que vous commencez à voir à quel point cela peut être utile. Non seulement cela vous permet de nommer les sorties en fonction des métadonnées, mais vous pouvez également faire des choses comme l'utiliser pour appliquer différentes valeurs de paramètres, et en combinaison avec des opérateurs spécifiques, vous pouvez même regrouper, trier ou filtrer les données au fur et à mesure qu'elles circulent dans le pipeline. -!!! note "En savoir plus sur les métadonnées" +!!! info "En savoir plus sur les métadonnées" Pour une introduction complète au travail avec les métadonnées dans les workflows Nextflow, y compris comment lire les métadonnées à partir de samplesheets et les utiliser pour personnaliser le traitement, consultez la quête secondaire [Métadonnées dans les workflows](../side_quests/metadata/index.md). @@ -543,7 +595,7 @@ Maintenant que vous savez tout sur les metamaps (ou suffisamment pour les besoin Par souci de clarté, nous allons décomposer cela et couvrir chaque étape séparément. -!!! note "Note" +!!! info "Info" Tous les changements montrés ci-dessous sont apportés à la logique du workflow dans le bloc `main` dans le fichier de workflow `core-hello/workflows/hello.nf`. @@ -570,8 +622,8 @@ Ajoutons ces lignes après l'appel à `convertToUpper`, en supprimant l'appel à === "Après" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // émettre une salutation + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) // convertir la salutation en majuscules @@ -586,8 +638,8 @@ Ajoutons ces lignes après l'appel à `convertToUpper`, en supprimant l'appel à === "Avant" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // émettre une salutation + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) // convertir la salutation en majuscules @@ -608,8 +660,8 @@ Ensuite, transformez le canal de fichiers en un canal de tuples contenant des m === "Après" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // émettre une salutation + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) // convertir la salutation en majuscules @@ -627,8 +679,8 @@ Ensuite, transformez le canal de fichiers en un canal de tuples contenant des m === "Avant" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // émettre une salutation + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) // convertir la salutation en majuscules @@ -654,8 +706,8 @@ Maintenant, appelez `FIND_CONCATENATE` sur le canal nouvellement créé : === "Après" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // émettre une salutation + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) // convertir la salutation en majuscules @@ -676,8 +728,8 @@ Maintenant, appelez `FIND_CONCATENATE` sur le canal nouvellement créé : === "Avant" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // émettre une salutation + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) // convertir la salutation en majuscules @@ -704,8 +756,8 @@ Puisque `cowpy` n'accepte pas encore les tuples de métadonnées (nous corrigero === "Après" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // émettre une salutation + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) // convertir la salutation en majuscules @@ -729,8 +781,8 @@ Puisque `cowpy` n'accepte pas encore les tuples de métadonnées (nous corrigero === "Avant" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // émettre une salutation + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // émettre une salutation (mis à jour pour utiliser la convention nf-core pour les samplesheets) sayHello(ch_samplesheet) // convertir la salutation en majuscules @@ -753,7 +805,7 @@ L'opération `#!groovy .map { meta, file -> file }` extrait le fichier du tuple Ensuite, il suffit de passer `ch_for_cowpy` à `cowpy` au lieu de `collectGreetings.out.outfile` dans cette dernière ligne. -!!! note "Note" +!!! info "Info" Dans la prochaine partie du cours, nous mettrons à jour `cowpy` pour qu'il fonctionne directement avec les tuples de métadonnées, donc cette étape d'extraction ne sera plus nécessaire. @@ -762,7 +814,7 @@ Ensuite, il suffit de passer `ch_for_cowpy` à `cowpy` au lieu de `collectGreeti Testons que le workflow fonctionne avec le module `find/concatenate` nouvellement intégré : ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` Cela devrait s'exécuter assez rapidement. @@ -770,40 +822,40 @@ Cela devrait s'exécuter assez rapidement. ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` Remarquez que `FIND_CONCATENATE` apparaît maintenant dans la liste d'exécution des processus au lieu de `collectGreetings`. diff --git a/docs/fr/docs/hello_nf-core/04_make_module.md b/docs/fr/docs/hello_nf-core/04_make_module.md index 2396ef4324..167bd908e1 100644 --- a/docs/fr/docs/hello_nf-core/04_make_module.md +++ b/docs/fr/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ Après cela, nous vous montrerons comment utiliser la création de modules basé Vous pouvez tester qu'il s'exécute avec succès en exécutant la commande suivante : ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ Ouvrez le fichier du module `cowpy.nf` (sous `core-hello/modules/local/`) et mod === "Après" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Générer de l'art ASCII avec cowpy (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "Avant" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Générer de l'art ASCII avec cowpy (https://github.com/jeffbuttars/cowpy) process cowpy { ``` Dans ce cas, la mise en majuscules est complètement directe. -Si le nom du processus était composé de plusieurs mots, par exemple si nous avions un processus appelé MyCowpyTool à l'origine en camel case, la convention nf-core serait d'utiliser des underscores pour les séparer, donnant MY_COWPY_TOOL. +Si le nom du processus était composé de plusieurs mots, par exemple si nous avions un processus appelé `MyCowpyTool` à l'origine en camel case, la convention nf-core serait d'utiliser des underscores pour les séparer, donnant `MY_COWPY_TOOL`. #### 1.1.2. Mettre à jour l'instruction d'importation du module @@ -164,7 +164,7 @@ Maintenant, mettons à jour les deux références au processus dans le bloc work // // Rassembler et enregistrer les versions des logiciels // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ Maintenant, mettons à jour les deux références au processus dans le bloc work // // Rassembler et enregistrer les versions des logiciels // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ Assurez-vous de faire les **deux** modifications, sinon vous obtiendrez une erre Exécutons le workflow pour tester que tout fonctionne correctement après ces modifications. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ Revenez au fichier du module `cowpy.nf` et modifiez-le pour accepter des tuples === "Après" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ Revenez au fichier du module `cowpy.nf` et modifiez-le pour accepter des tuples === "Avant" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ Ce n'est techniquement pas nécessaire, mais c'est une bonne pratique de faire r Exécutons le workflow pour tester que tout fonctionne correctement après ces modifications. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Vous pouvez voir que nous avons fait trois modifications. Par conséquent, l'interface du module est maintenant plus simple : elle n'attend que les entrées essentielles de métadonnées et de fichiers. -!!! note "Note" +!!! info "Info" L'opérateur `?:` est souvent appelé 'opérateur Elvis' car il ressemble à un visage d'Elvis Presley de côté, avec le caractère `?` symbolisant la vague dans ses cheveux. @@ -623,15 +623,15 @@ Testons que le workflow fonctionne toujours comme prévu, en spécifiant un cara Exécutez cette commande en utilisant `kosh`, l'une des options les plus... énigmatiques : ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "Sortie de la commande" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ Pour résumer les avantages de cette approche : - **Portabilité** : Les modules peuvent être réutilisés sans options d'outils codées en dur - **Pas de changements de workflow** : L'ajout ou la modification d'options d'outils ne nécessite pas de mise à jour du code du workflow -!!! note "Note" +!!! info "Info" Le système `ext.args` a des capacités supplémentaires puissantes non couvertes ici, y compris le changement dynamique des valeurs d'arguments en fonction des métadonnées. Consultez les [spécifications des modules nf-core](https://nf-co.re/docs/guidelines/components/modules) pour plus de détails. @@ -841,15 +841,15 @@ Au cas où vous vous poseriez la question, la closure `ext.prefix` a accès à l Testons que le workflow fonctionne toujours comme prévu. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ C'est tout ! Voyons ce qui se passe si nous exécutons le pipeline maintenant. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ Maintenant, `core-hello-results` contient également les sorties du module `COWP Vous pouvez voir que Nextflow a créé cette hiérarchie de répertoires basée sur les noms du workflow et du module. -!!! note "Note" +!!! info "Info" Vous remarquerez peut-être `hello_software_versions.yml` dans `pipeline_info/`. Il ne contient pour l'instant que les informations de version de `FIND_CONCATENATE`, car `COWPY` ne rapporte pas encore sa version. @@ -1098,9 +1098,9 @@ Cela dit, vous pouvez décider que vous voulez organiser vos entrées différemm Pour remplacer la directive `publishDir` par défaut, vous pouvez simplement ajouter vos propres directives au fichier `conf/modules.config`. -Par exemple, vous pourriez remplacer la valeur par défaut pour un seul processus en utilisant le sélecteur `withName:`, comme dans cet exemple où nous ajoutons une directive `publishDir` personnalisée pour le processus 'COWPY'. +Par exemple, vous pourriez remplacer la valeur par défaut pour un seul processus en utilisant le sélecteur `withName:`, comme dans cet exemple où nous ajoutons une directive `publishDir` personnalisée pour le processus `COWPY`. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ Aucune modification du bloc script n'est nécessaire — la version est déclar #### 1.6.2. Exécuter le pipeline et inspecter le rapport de versions ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -La collecte côté workflow — le bloc `Channel.topic("versions")` que vous avez vu dans le workflow de substitution de la Partie 2 — s'abonne au topic et écrit ce rapport combiné automatiquement. +La collecte côté workflow — le bloc `channel.topic("versions")` que vous avez vu dans le workflow de substitution de la Partie 2 — s'abonne au topic et écrit ce rapport combiné automatiquement. -!!! note "Compatibilité ascendante" +!!! info "Compatibilité ascendante" La branche `versions_file` dans le bloc topic channel du workflow existe pour gérer les modules qui n'ont pas encore été mis à jour pour utiliser `topic: versions` et qui écrivent toujours un fichier `versions.yml` dans le bloc script avec `emit: versions`. Les deux styles sont pris en charge simultanément pendant la transition. @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Modèle 1 : tuples de métadonnées ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ Le code par défaut propose de basculer entre Docker et Singularity, mais nous a === "Avant" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Environnement Conda -Pour l'environnement Conda, le code du module spécifie `conda "${moduleDir}/environment.yml"`, ce qui signifie qu'il doit être configuré dans le fichier `environment.yml`. +Pour l'environnement Conda, le code du module spécifie `#!groovy conda "${moduleDir}/environment.yml"`, ce qui signifie qu'il doit être configuré dans le fichier `environment.yml`. L'outil de création de module nous a averti qu'il ne pouvait pas trouver le paquet `cowpy` dans Bioconda (le canal principal pour les outils de bioinformatique). Cependant, `cowpy` est disponible dans conda-forge, vous pouvez donc compléter le `environment.yml` comme suit : @@ -1428,7 +1431,7 @@ Mettez à jour les blocs d'entrée et de sortie : === "Après" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Mettez à jour les blocs d'entrée et de sortie : === "Avant" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` Cela spécifie : @@ -1453,6 +1456,7 @@ Cela spécifie : - Le nom du paramètre du fichier d'entrée (`input_file` au lieu du générique `input`) - Le nom du fichier de sortie utilisant le modèle de préfixe configurable (`#!groovy ${prefix}.txt` au lieu du joker `*`) - Un nom d'émission descriptif (`cowpy_output` au lieu du générique `output`) +- Une chaîne de version statique (`#!groovy val("1.1.5")`) à la place du `#!groovy eval("cowpy --version")` du modèle, correspondant au module manuel de la section 1.6 (l'outil `cowpy` n'expose pas de drapeau `--version`) Si vous utilisez le serveur de langage Nextflow pour valider la syntaxe, la partie `#!groovy ${prefix}` sera signalée comme erreur à ce stade car nous ne l'avons pas encore ajoutée au bloc script. Passons à cela maintenant. @@ -1517,7 +1521,7 @@ Ne vous inquiétez pas trop si cela semble mystérieux ; nous l'incluons par sou === "Avant" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1576,15 +1580,15 @@ Tout ce que nous devons faire pour essayer cette nouvelle version du module `COW Exécutons le pipeline pour le tester. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Sortie de la commande" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1611,10 +1615,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/fr/docs/hello_nf-core/05_input_validation.md b/docs/fr/docs/hello_nf-core/05_input_validation.md index 6eeaf61c2a..5459b103df 100644 --- a/docs/fr/docs/hello_nf-core/05_input_validation.md +++ b/docs/fr/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ Dans cette cinquième partie du cours de formation Hello nf-core, nous vous mont Vous pouvez vérifier qu'il s'exécute avec succès en lançant la commande suivante : ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema est le successeur du plugin nf-validation (obsolète) et utilise le st ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ Appliquons maintenant ces principes en pratique, en commençant par la validatio Commençons par ajouter la validation des paramètres à notre pipeline. Cela valide les options en ligne de commande comme `--input`, `--outdir` et `--batch`. -### 1.1. Configurer la validation pour ignorer la validation des fichiers d'entrée +### 1.1. Activer la validation et ignorer la validation des fichiers d'entrée Le modèle de pipeline nf-core est livré avec nf-schema déjà installé et configuré : - Le plugin nf-schema est installé via le bloc `plugins{}` dans `nextflow.config` -- La validation des paramètres est activée par défaut via `params.validate_params = true` +- La validation des paramètres est contrôlée par `params.validate_params` - La validation est effectuée par le sous-workflow `UTILS_NFSCHEMA_PLUGIN` lors de l'initialisation du pipeline -Le comportement de validation est contrôlé via la portée `validation{}` dans `nextflow.config`. +Dans les Parties 3 et 4, nous avons défini `validate_params = false` pour que le pipeline puisse s'exécuter avant que nous ayons configuré des schémas. +Maintenant que nous sommes prêt·es à ajouter la validation, la première étape consiste à l'activer. -Puisque nous allons d'abord travailler sur la validation des paramètres (cette section) et ne configurerons pas le schéma de données d'entrée avant la section 2, nous devons temporairement demander à nf-schema d'ignorer la validation du contenu du fichier du paramètre `input`. +Ouvrez `nextflow.config` et trouvez le paramètre `validate_params` (autour de la ligne 37), et définissez-le sur `true` : -Ouvrez `nextflow.config` et trouvez le bloc `validation` (autour de la ligne 247). Ajoutez `ignoreParams` pour ignorer la validation des fichiers d'entrée : +=== "Après" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "Avant" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +Le comportement de validation lui-même est contrôlé via la portée `validation{}` dans `nextflow.config`. + +Puisque nous allons d'abord travailler sur la validation des paramètres (cette section) et ne configurerons pas le schéma de données d'entrée avant la section 2, nous devons également temporairement demander à nf-schema d'ignorer la validation du contenu du fichier du paramètre `input`. + +Trouvez le bloc `validation` (autour de la ligne 252) et ajoutez `ignoreParams` pour ignorer la validation des fichiers d'entrée : === "Après" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ Ouvrez `nextflow.config` et trouvez le bloc `validation` (autour de la ligne 247 === "Avant" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ Cette configuration indique à nf-schema de : - **`ignoreParams`** : Ignorer la validation du contenu du fichier du paramètre `input` (temporaire ; nous réactiverons cela dans la section 2) - **`monochromeLogs`** : Désactiver la sortie colorée dans les messages de validation lorsque défini sur `true` (contrôlé par `params.monochrome_logs`) -!!! note "Pourquoi ignorer le paramètre input ?" +!!! info "Pourquoi ignorer le paramètre input ?" Le paramètre `input` dans `nextflow_schema.json` a `"schema": "assets/schema_input.json"` qui indique à nf-schema de valider le *contenu* du fichier CSV d'entrée par rapport à ce schéma. Puisque nous n'avons pas encore configuré ce schéma, nous ignorons temporairement cette validation. @@ -263,7 +280,7 @@ Vous devriez voir quelque chose comme ceci : | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -Vous devriez voir que le paramètre `batch` a été ajouté au schéma avec le champ "required" affichant maintenant `["input", "outdir", "batch"]`. +Vous devriez voir que le paramètre `batch` a été ajouté au schéma avec le champ `required` affichant maintenant `["input", "outdir", "batch"]`. ### 1.5. Tester la validation des paramètres @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ Ouvrez `nextflow.config` et supprimez la ligne `ignoreParams` du bloc `validatio === "Après" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ Ouvrez `nextflow.config` et supprimez la ligne `ignoreParams` du bloc `validatio === "Avant" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ Vérifions que notre validation fonctionne en testant des entrées valides et in #### 2.7.1. Tester avec une entrée valide D'abord, confirmez que le pipeline s'exécute avec succès avec une entrée valide. -Notez que nous n'avons plus besoin de `--validate_params false` puisque la validation fonctionne ! +Avec `validate_params = true` et le schéma d'entrée en place, la validation des paramètres et des données d'entrée s'exécutent désormais pour de vrai. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/fr/docs/info/nxf_versions.md b/docs/fr/docs/info/nxf_versions.md index 82df3f4c04..37188cd2fd 100644 --- a/docs/fr/docs/info/nxf_versions.md +++ b/docs/fr/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: À partir de la version 3.0 du portail de formation, tous nos cours de formation sont compatibles avec Nextflow version 25.10.2 ou ultérieure, sauf indication contraire sur la page d'index du cours. (Cela ne s'applique pas aux supports obsolètes ou archivés qui peuvent ne pas inclure de mention de version.) -La version de Nextflow actuellement chargée par défaut dans notre environnement de formation est **Nextflow 25.10.4**. +La version de Nextflow actuellement chargée par défaut dans notre environnement de formation est **Nextflow 26.04.4**. Étant donné que les cours utilisent désormais des entrées typées au niveau du workflow ainsi que des directives de sortie au niveau du workflow, ils nécessitent l'utilisation de l'analyseur syntaxique V2, **sauf indication contraire**. +L'analyseur syntaxique V2 est activé par défaut à partir de Nextflow 26.04, donc avec la version que nous chargeons, vous n'avez pas besoin de l'activer manuellement. Si vous prévoyez d'utiliser l'environnement que nous fournissons via [Github Codespaces](../envsetup/01_setup.md) ou les [devcontainers locaux](../envsetup/03_devcontainer.md), vous n'avez rien à faire sauf indication contraire dans les instructions du cours. -Cependant, si vous prévoyez de suivre les formations dans votre propre environnement ([Installation manuelle](../envsetup/02_local.md)), vous devrez vous assurer d'utiliser Nextflow version 25.10.2 ou ultérieure avec l'analyseur syntaxique v2 activé. +Cependant, si vous prévoyez de suivre les formations dans votre propre environnement ([Installation manuelle](../envsetup/02_local.md)), vous devrez vous assurer d'utiliser Nextflow version 25.10.2 ou ultérieure, et d'activer l'analyseur syntaxique v2 si vous utilisez une version antérieure à 26.04. ## Versions antérieures des supports de formation @@ -40,7 +41,7 @@ Tout le code Nextflow moderne utilise DSL2. L'analyseur v1 est l'analyseur original, plus permissif. L'analyseur v2 est plus strict et active de nouvelles fonctionnalités du langage telles que le typage statique (entrées et sorties typées) et les directives de sortie au niveau du workflow. L'analyseur v2 fournit également de meilleurs messages d'erreur et détecte davantage d'erreurs au moment de l'analyse plutôt qu'à l'exécution. -L'analyseur v2 deviendra la valeur par défaut dans Nextflow 26.04. +L'analyseur v2 est la valeur par défaut à partir de Nextflow 26.04. En résumé : DSL2 est le langage que vous écrivez ; la version de l'analyseur syntaxique détermine avec quelle rigueur ce langage est interprété et quelles fonctionnalités avancées sont disponibles. @@ -52,21 +53,22 @@ Pour plus d'informations sur la mise à jour de votre version de Nextflow, veuil ### Activer l'analyseur syntaxique v2 +À partir de Nextflow 26.04, l'analyseur v2 est la valeur par défaut ; les étapes ci-dessous ne sont donc nécessaires que pour les versions antérieures à 26.04. + Pour **activer** l'analyseur syntaxique v2 pour votre session actuelle, exécutez la commande suivante dans votre terminal : ```bash export NXF_SYNTAX_PARSER=v2 ``` -Pour rendre cela permanent (en attendant que v2 devienne la valeur par défaut dans Nextflow 26.04), ajoutez la commande export à votre profil shell (`~/.bashrc`, `~/.zshrc`, etc.) : +Pour rendre cela permanent, ajoutez la commande export à votre profil shell (`~/.bashrc`, `~/.zshrc`, etc.) : ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -Notez que la variable d'environnement `NXF_SYNTAX_PARSER=v2` est une exigence temporaire. -À partir de Nextflow 26.04, l'analyseur v2 deviendra la valeur par défaut et ce paramètre ne sera plus nécessaire. +Notez que sur les versions de Nextflow antérieures à 26.04, la variable d'environnement `NXF_SYNTAX_PARSER=v2` est requise pour accéder aux fonctionnalités v2 utilisées dans ces cours. ### Désactiver l'analyseur syntaxique v2 diff --git a/docs/fr/docs/nextflow_run/01_basics.md b/docs/fr/docs/nextflow_run/01_basics.md index 659cdf1744..b17f8340fc 100644 --- a/docs/fr/docs/nextflow_run/01_basics.md +++ b/docs/fr/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "Sortie de la commande" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Si votre sortie console ressemble à cela, alors félicitations, vous venez d'exécuter votre premier workflow Nextflow ! @@ -115,13 +121,14 @@ Si votre sortie console ressemble à cela, alors félicitations, vous venez d'ex Cela a été mentionné au début du cours, mais vous l'avez peut-être manqué. Consultez le matériel d'aide [Versions de Nextflow](../info/nxf_versions.md). - En bref, si vous utilisez Nextflow `25.10`, vous devez activer l'analyseur de langage v2 : + L'analyseur v2 est le comportement par défaut à partir de Nextflow 26.04, vous ne rencontrerez donc ce problème que sur des versions antérieures. + Sur une version antérieure à 26.04, vous devez activer l'analyseur de langage v2 : ```bash export NXF_SYNTAX_PARSER=v2 ``` -La sortie la plus importante ici est la dernière ligne, qui est mise en surbrillance dans la sortie ci-dessus : +La partie la plus importante ici est la ligne mise en surbrillance : ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` Vous devriez voir que vos sorties sont maintenant publiées dans un répertoire appelé `hello_results` au lieu de `results` : @@ -206,7 +219,7 @@ Cela peut sembler confus, alors voyons à quoi cela ressemble en pratique. En revenant à la sortie console pour le workflow que nous avons exécuté plus tôt, nous avions cette ligne : ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` Vous voyez comment la ligne commence par `[a3/1e1535]` ? @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "Sortie de la commande" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` La sortie console devrait sembler familière, mais il y a une chose qui est un peu différente par rapport à avant. @@ -767,7 +786,7 @@ Dans la ligne de sortie console `[a3/7be2fa] SAYHELLO | 1 of 1 ✔`, que représ - [x] Le chemin tronqué vers le répertoire de travail de la tâche - [ ] La somme de contrôle du fichier de sortie -En savoir plus : [2.4. Trouver la sortie originale et les logs dans le répertoire `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +En savoir plus : [2.3. Trouver la sortie originale et les logs dans le répertoire `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ Quel est le but du fichier `.command.sh` dans un répertoire de tâche ? - [ ] Il contient les messages d'erreur des tâches échouées - [ ] Il liste les fichiers d'entrée préparés pour la tâche -En savoir plus : [2.4. Trouver la sortie originale et les logs dans le répertoire `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +En savoir plus : [2.3. Trouver la sortie originale et les logs dans le répertoire `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ Qu'arrive-t-il aux résultats publiés lorsque vous ré-exécutez un workflow sa - [ ] Nextflow empêche l'écrasement et échoue - [ ] Ils sont automatiquement sauvegardés -En savoir plus : [2.5. Ré-exécuter le workflow avec différentes salutations](#24-re-run-the-workflow-with-different-greetings) +En savoir plus : [2.4. Ré-exécuter le workflow avec différentes salutations](#24-re-run-the-workflow-with-different-greetings) Qu'indique cette sortie console ? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] La tâche a échoué et a été ignorée diff --git a/docs/fr/docs/nextflow_run/02_pipeline.md b/docs/fr/docs/nextflow_run/02_pipeline.md index 76fc6b2ffa..fbfa014c99 100644 --- a/docs/fr/docs/nextflow_run/02_pipeline.md +++ b/docs/fr/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` De manière encourageante, cela semble indiquer que « 3 of 3 » appels ont été faits pour le process, ce qui est encourageant, puisqu'il y avait trois lignes de données dans le CSV que nous avons fourni en entrée. @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "Sortie de la commande" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Cette fois, nous voyons les trois exécutions de process et leurs sous-répertoires de travail associés listés dans la sortie. @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "Sortie de la commande" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` Vous voyez que comme promis, plusieurs étapes ont été exécutées dans le cadre du workflow ; les deux premières (`sayHello` et `convertToUpper`) ont vraisemblablement été exécutées sur chaque salutation individuelle, et la troisième (`collectGreetings`) aura été exécutée une seule fois, sur les sorties des trois appels `convertToUpper`. @@ -670,13 +706,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "Sortie de la commande" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` Vous devriez voir de nouvelles sorties finales nommées avec votre nom de lot personnalisé. @@ -921,13 +975,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` Vous remarquerez que les exécutions de process ont toutes été mises en cache avec succès, ce qui signifie que Nextflow a reconnu qu'il a déjà fait le travail demandé, même si le code a été divisé et le fichier de workflow principal a été renommé. @@ -1075,20 +1147,20 @@ Vous voyez que le système de fichiers à l'intérieur du conteneur est différe Depuis l'intérieur du conteneur, vous pouvez exécuter la commande `cowpy` directement. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "Sortie de la commande" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` Cela produit de l'art ASCII du personnage de vache par défaut (ou « cowacter ») avec une bulle de dialogue contenant le texte que nous avons spécifié. @@ -1097,22 +1169,22 @@ Maintenant que vous avez testé l'utilisation de base, vous pouvez essayer de lu Par exemple, la documentation de l'outil dit que nous pouvons définir le personnage avec `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Sortie de la commande" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1298,15 +1370,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` Les trois premières étapes ont été mises en cache puisque nous les avons déjà exécutées auparavant, mais le process `cowpy` est nouveau donc il est effectivement exécuté. diff --git a/docs/fr/docs/nextflow_run/03_config.md b/docs/fr/docs/nextflow_run/03_config.md index e182ca5247..20dd58fb20 100644 --- a/docs/fr/docs/nextflow_run/03_config.md +++ b/docs/fr/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` Cela produit toujours la même sortie qu'auparavant. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` Cela créera un nouvel ensemble de répertoires sous `tux-run/` incluant `tux-run/work/` et `tux-run/results/`. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` Le fichier de sortie final devrait contenir le personnage stegosaurus disant les salutations. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` Cela produit toujours la même sortie qu'auparavant, sauf que cette fois nous trouvons nos sorties sous `results_config/outdir/`. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` Cela produit toujours la même sortie qu'auparavant, sauf que cette fois nous trouvons nos sorties sous `results_config/pnames/`, et elles sont groupées par process. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` Cela produit toujours la même sortie qu'auparavant, sauf que cette fois nous trouvons nos sorties sous `results_config/outmode/`. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "Sortie de la commande" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` Cela devrait fonctionner sans problème et produire les mêmes sorties qu'auparavant sous `results_config/conda`. @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` Comme vous pouvez le voir, cela nous permet de basculer entre les configurations très commodément au moment de l'exécution. @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` Cela utilisera Docker où possible et produira des sorties sous `results_config/test`, et cette fois le personnage est le duo comique `dragonandcow`. @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/fr/docs/nf4_science/_template/02_single_sample.md b/docs/fr/docs/nf4_science/_template/02_single_sample.md index de4fc48e22..966fdf1238 100644 --- a/docs/fr/docs/nf4_science/_template/02_single_sample.md +++ b/docs/fr/docs/nf4_science/_template/02_single_sample.md @@ -72,7 +72,7 @@ Dans le fichier de workflow principal `{DOMAIN_DIR}.nf`, sous la section `Pipeli * Pipeline parameters */ params { - // Primary input + // Entrée principale {PRIMARY_PARAM_NAME}: Path } ``` @@ -84,7 +84,7 @@ Dans le fichier de workflow principal `{DOMAIN_DIR}.nf`, sous la section `Pipeli * Pipeline parameters */ - // Primary input + // Entrée principale ``` Cela configure le paramètre CLI, mais nous ne voulons pas saisir le chemin du fichier à chaque fois que nous exécutons le workflow pendant le développement. @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/fr/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/fr/docs/nf4_science/genomics/02_per_sample_variant_calling.md index b4e13b36d3..86b96ffdcf 100644 --- a/docs/fr/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/fr/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` Vous pouvez vérifier que le fichier d'index a été généré correctement en regardant dans le répertoire de travail ou dans le répertoire de résultats. @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` Maintenant si nous regardons la sortie console, nous voyons les deux processus listés. @@ -891,13 +911,32 @@ Chose amusante : cela _pourrait fonctionner_, OU cela _pourrait échouer_. Par e ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Si votre exécution de workflow a réussi, exécutez-la à nouveau jusqu'à obtenir une erreur comme celle-ci : @@ -905,9 +944,9 @@ Si votre exécution de workflow a réussi, exécutez-la à nouveau jusqu'à obte ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ Cette fois (et à chaque fois) tout devrait s'exécuter correctement : ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Le répertoire de résultats contient maintenant à la fois les fichiers BAM et BAI pour chaque échantillon (du tuple), ainsi que les sorties VCF : @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Cela devrait produire le même résultat qu'auparavant. Notre simple workflow d'appel de variants a maintenant toutes les fonctionnalités de base que nous voulions. diff --git a/docs/fr/docs/nf4_science/genomics/03_joint_calling.md b/docs/fr/docs/nf4_science/genomics/03_joint_calling.md index 8258068d80..56f7587846 100644 --- a/docs/fr/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/fr/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` La sortie Nextflow semble identique à celle d'avant, mais les fichiers `.g.vcf` et leurs fichiers d'index sont maintenant organisés dans des sous-répertoires. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` Les deux premières étapes sont mises en cache depuis l'exécution précédente, et la nouvelle étape `GATK_JOINTGENOTYPING` s'exécute une fois sur les entrées collectées des trois échantillons. diff --git a/docs/fr/docs/nf4_science/imaging/01_basics.md b/docs/fr/docs/nf4_science/imaging/01_basics.md index ad62c70588..66a056fdb8 100644 --- a/docs/fr/docs/nf4_science/imaging/01_basics.md +++ b/docs/fr/docs/nf4_science/imaging/01_basics.md @@ -19,21 +19,21 @@ nextflow run hello-world.nf --greeting 'Hello World!' La sortie de votre console devrait ressembler à ceci : -```console title="Sortie" linenums="1" - N E X T F L O W ~ version 25.04.3 +```console title="Output" linenums="1" + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Félicitations, vous venez d'exécuter votre premier workflow Nextflow ! La sortie la plus importante ici est la dernière ligne (ligne 6) : -```console title="Sortie" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` Cela nous indique que le processus `sayHello` a été exécuté avec succès une fois (`1 of 1 ✔`). @@ -83,20 +83,20 @@ Cela peut sembler déroutant, alors voyons à quoi cela ressemble en pratique. En revenant à la sortie console du workflow que nous avons exécuté précédemment, nous avions cette ligne : -```console title="Extrait de la sortie de la commande" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Excerpt of command output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` -Voyez comment la ligne commence par `[a3/7be2fa]` ? +Voyez comment la ligne commence par `[71/8143bd]` ? C'est une forme tronquée du chemin du répertoire de tâche pour cet appel de processus particulier, et vous indique où trouver la sortie de l'appel du processus `sayHello` dans le chemin du répertoire `work/`. -Vous pouvez trouver le chemin complet en tapant la commande suivante (en remplaçant `a3/7be2fa` par ce que vous voyez dans votre propre terminal) et en appuyant sur la touche tab pour compléter automatiquement le chemin ou en ajoutant un astérisque : +Vous pouvez trouver le chemin complet en tapant la commande suivante (en remplaçant `71/8143bd` par ce que vous voyez dans votre propre terminal) et en appuyant sur la touche tab pour compléter automatiquement le chemin ou en ajoutant un astérisque : ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -Cela devrait donner le chemin complet du répertoire : `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +Cela devrait donner le chemin complet du répertoire : `work/71/8143bd5ed3420e23c5f0dc1a05056d` Voyons ce qu'il y a dedans. @@ -116,8 +116,8 @@ Les noms exacts des sous-répertoires seront différents sur votre système. ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -136,7 +136,7 @@ Si vous l'ouvrez, vous retrouverez le message de salutation `Hello World!`.
Contenu du fichier output.txt -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,10 +159,9 @@ Le fichier `.command.sh` est particulièrement utile car il vous montre la comma
Contenu du fichier -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
@@ -357,14 +356,14 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Recherchez le bit `cached:` qui a été ajouté dans la ligne de statut du processus (ligne 5), ce qui signifie que Nextflow a reconnu qu'il a déjà fait ce travail et a simplement réutilisé le résultat de l'exécution précédente réussie. +Recherchez le bit `cached:` qui a été ajouté dans la ligne de statut du processus, ce qui signifie que Nextflow a reconnu qu'il a déjà fait ce travail et a simplement réutilisé le résultat de l'exécution précédente réussie. Vous pouvez également voir que le hash du sous-répertoire work est le même que lors de l'exécution précédente. Nextflow vous indique littéralement l'exécution précédente et dit « J'ai déjà fait ça là-bas. » diff --git a/docs/fr/docs/nf4_science/imaging/02_run_molkart.md b/docs/fr/docs/nf4_science/imaging/02_run_molkart.md index 08b53e63f2..d2a29de391 100644 --- a/docs/fr/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/fr/docs/nf4_science/imaging/02_run_molkart.md @@ -70,26 +70,34 @@ Cela crée un répertoire `molkart/` contenant le code source complet du pipelin Avant d'exécuter le pipeline complet, apprenons pourquoi les conteneurs sont essentiels pour les pipelines nf-core. -Essayons d'exécuter le pipeline en utilisant l'ensemble de données de test et les paramètres de la configuration de test molkart : - -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +Nous allons fournir les paramètres du pipeline à l'aide d'un fichier de paramètres. +Un fichier de paramètres est un fichier YAML qui liste chaque paramètre et sa valeur, ce qui permet de conserver les valeurs typées (comme les entiers) intactes et de garder la ligne de commande courte. + +Un fichier `params.yaml` est déjà fourni dans le répertoire de travail : + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` -Décomposons ces paramètres : +Ces paramètres sont : + +- `input` : Chemin vers la feuille d'échantillons contenant les métadonnées des échantillons +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum` : Paramètres pour le remplissage de motif de grille +- `clahe_pyramid_tile` : Taille du noyau pour l'amélioration du contraste +- `segmentation_method` : Quel(s) algorithme(s) utiliser pour la segmentation cellulaire +- `outdir` : Où enregistrer les résultats -- `--input` : Chemin vers la feuille d'échantillons contenant les métadonnées des échantillons -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum` : Paramètres pour le remplissage de motif de grille -- `--clahe_pyramid_tile` : Taille du noyau pour l'amélioration du contraste -- `--segmentation_method` : Quel(s) algorithme(s) utiliser pour la segmentation cellulaire -- `--outdir` : Où enregistrer les résultats +Essayons d'exécuter le pipeline en utilisant ces paramètres : + +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "Cette commande échouera - c'est intentionnel !" @@ -172,17 +180,10 @@ process { } ``` -Maintenant, exécutez à nouveau le pipeline avec la même commande : +Maintenant, exécutez à nouveau le pipeline, cette fois en lançant les trois méthodes de segmentation afin de pouvoir les comparer ultérieurement : ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` Cette fois, Nextflow va : @@ -209,12 +210,13 @@ Pendant l'exécution du pipeline, vous verrez une sortie similaire à ceci : ??? success "Sortie de la commande" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ Pendant l'exécution du pipeline, vous verrez une sortie similaire à ceci : |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ Pendant l'exécution du pipeline, vous verrez une sortie similaire à ceci : https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,16 +300,16 @@ La ligne executor `executor > local (22)` vous indique : Chaque ligne de processus montre : -- **Hash** (`[1a/2b3c4d]`) : Identifiant du répertoire de travail (comme avant) +- **Hash** (`[b4/e57ff1]`) : Identifiant du répertoire de travail (comme avant) - **Nom du processus** : Chemin complet du module et nom du processus - **Identifiant d'entrée** : Nom de l'échantillon entre parenthèses -- **Progression** : Pourcentage terminé et comptage (par ex., `1 of 1 ✔`) +- **Progression** : Nombre de tâches et statut d'achèvement (par ex., `1 of 1 ✔`) ### À retenir Vous savez comment lancer un pipeline nf-core avec des données de test et interpréter sa sortie d'exécution. -### Et maintenant ? +### Et ensuite ? Apprenez où trouver les résultats et comment les interpréter. @@ -372,7 +369,7 @@ Le rapport inclut : - Métriques de qualité de segmentation - Nombre de cellules et de spots détectés -!!! Tip +!!! Tip "Astuce" Les rapports MultiQC sont généralement inclus dans tous les pipelines nf-core. Ils fournissent toujours un aperçu de haut niveau de l'exécution du pipeline et de la qualité des données. @@ -426,7 +423,7 @@ Cela montre : - Utilisation du CPU et de la mémoire - Quelles tâches ont été mises en cache ou exécutées -!!! Tip +!!! Tip "Astuce" Ces rapports sont incroyablement utiles pour optimiser l'allocation des ressources et dépanner les problèmes de performance. @@ -447,7 +444,7 @@ Tout comme avec notre exemple Hello World, tout le travail réel se passe dans l ### 4.1. Comprendre la structure du répertoire de travail Le répertoire de travail contient un sous-répertoire pour chaque tâche qui a été exécutée. -Pour ce pipeline avec 12 tâches, il y aura 12 sous-répertoires de travail. +Pour ce pipeline avec 22 tâches, il y aura 22 sous-répertoires de travail. Listez le répertoire de travail : @@ -477,7 +474,7 @@ La différence clé par rapport à Hello World : - Les fichiers de sortie peuvent être assez volumineux (masques de segmentation, images traitées) - Plusieurs fichiers d'entrée et de sortie par tâche -!!! Tip +!!! Tip "Astuce" Si un processus échoue, vous pouvez naviguer vers son répertoire de travail, examiner `.command.err` pour les messages d'erreur, et même réexécuter `.command.sh` manuellement pour déboguer le problème. @@ -492,7 +489,7 @@ Cependant, pour les pipelines nf-core avec de gros fichiers intermédiaires, il Vous comprenez comment les pipelines nf-core organisent leurs répertoires de travail et comment inspecter des tâches individuelles pour le débogage. -### Et maintenant ? +### Et ensuite ? Apprenez le cache Nextflow et comment reprendre les exécutions de pipeline échouées. @@ -517,30 +514,29 @@ Ceci est essentiel pour les pipelines de longue durée où des échecs peuvent s Exécutez à nouveau la même commande, mais ajoutez `-resume` : ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -Vous devriez voir une sortie comme : +Vous devriez voir une sortie comme : ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -Remarquez `cached: 2` ou `cached: 1` pour chaque processus - rien n'a été réexécuté ! +Remarquez l'annotation `cached: N` sur chaque processus de prétraitement et de segmentation - ces tâches ont été réutilisées plutôt que réexécutées. ### 5.3. Quand resume est utile @@ -551,7 +547,7 @@ Resume est particulièrement utile quand : - Votre connexion réseau tombe pendant le téléchargement de données - Vous voulez ajouter des sorties supplémentaires sans refaire le calcul -!!! Warning +!!! Warning "Avertissement" Resume ne fonctionne que si vous n'avez pas modifié les données d'entrée, le code du pipeline ou les paramètres. Si vous modifiez l'un de ces éléments, Nextflow réexécutera correctement les tâches affectées. @@ -560,6 +556,6 @@ Resume est particulièrement utile quand : Vous savez comment utiliser `-resume` pour réexécuter efficacement les pipelines sans répéter les tâches réussies. -### Et maintenant ? +### Et ensuite ? Maintenant que vous pouvez exécuter nf-core/molkart avec des données de test, vous êtes prêt·e à apprendre comment le configurer pour vos propres ensembles de données. diff --git a/docs/fr/docs/nf4_science/imaging/03_inputs.md b/docs/fr/docs/nf4_science/imaging/03_inputs.md index 9cc9943c41..9b92ad9821 100644 --- a/docs/fr/docs/nf4_science/imaging/03_inputs.md +++ b/docs/fr/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Nous allons maintenant apprendre deux meilleures approches pour gérer les entr ### 1.1. Le problème des longues lignes de commande -Rappelons notre commande de la Partie 2 : +Dans la Partie 2, nous avons déjà utilisé un fichier de paramètres pour garder la commande courte et conserver les valeurs saisies (comme les paramètres entiers de prétraitement) intactes : ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -Cela fonctionne, mais c'est difficile à reproduire, partager ou modifier. +Passer de nombreux paramètres individuellement sur la ligne de commande est difficile à reproduire, partager ou modifier. Que faire si vous devez exécuter la même analyse le mois prochain ? -Que faire si un collaborateur souhaite utiliser exactement vos paramètres ? +Que faire si un·e collaborateur·trice souhaite utiliser exactement vos paramètres ? +Un fichier de paramètres résout ce problème. -### 1.2. Solution : Utiliser un fichier de paramètres +### 1.2. Le fichier de paramètres -Créez un fichier appelé `params.yaml` : +Voici le fichier `params.yaml` que nous avons utilisé : ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -Maintenant votre commande devient : +Chaque paramètre est écrit sous la forme d'une paire `clé: valeur`. +Écrire les entiers sans guillemets (par exemple `mindagap_tilesize: 90`) préserve leur type entier, ce que la validation des paramètres du pipeline requiert. + +Votre commande devient : ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -C'est tout ! Le fichier de paramètres documente votre configuration exacte et facilite la réexécution ou le partage. +Le fichier de paramètres documente votre configuration exacte et facilite la réexécution ou le partage. ### 1.3. Remplacement des paramètres @@ -60,7 +57,7 @@ La ligne ci-dessus change le `segmentation_method` en `stardist` et le nom du `- De plus, vous pouvez voir que le flag `-resume` nous a permis de réutiliser les résultats de prétraitement de l'exécution précédente, ce qui économise du temps. Vous pouvez utiliser ce modèle pour tester rapidement différentes variations du pipeline. -### Point clé +### À retenir Les fichiers de paramètres rendent vos analyses reproductibles et faciles à partager. Utilisez-les pour tout travail d'analyse réel. @@ -125,7 +122,7 @@ sample,nuclear_image,spot_table,membrane_image mem_only,data/nuclear.tiff,data/spots.txt,data/membrane.tiff ``` -!!! warning "Avertissement" +!!! Warning "Avertissement" Notez que les chemins dans la feuille d'échantillons sont relatifs à l'endroit où vous **exécutez** Nextflow, pas à l'endroit où se trouve la feuille d'échantillons. diff --git a/docs/fr/docs/nf4_science/imaging/04_config.md b/docs/fr/docs/nf4_science/imaging/04_config.md index 1067beb090..90477e6761 100644 --- a/docs/fr/docs/nf4_science/imaging/04_config.md +++ b/docs/fr/docs/nf4_science/imaging/04_config.md @@ -131,15 +131,16 @@ Comme nous utilisons `-resume`, Nextflow vérifiera si quelque chose a changé d Si les paramètres, les entrées et le code sont identiques, toutes les tâches seront récupérées du cache et le pipeline se terminera presque instantanément. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -Remarquez que tous les processus affichent `cached: 2` ou `cached: 1` - rien n'a été ré-exécuté ! +Remarquez l'annotation `cached: N` sur chaque processus — les tâches de prétraitement et de segmentation en cache n'ont pas été ré-exécutées. ### 2.4. Profils de test diff --git a/docs/fr/docs/nf4_science/rnaseq/02_single-sample.md b/docs/fr/docs/nf4_science/rnaseq/02_single-sample.md index 37a0321efb..05fe6df884 100644 --- a/docs/fr/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/fr/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` Cela devrait s'exécuter très rapidement si vous avez travaillé la Partie 1 et avez déjà téléchargé le conteneur. @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` Cela devrait également s'exécuter très rapidement, car nous travaillons sur un fichier d'entrée si petit. @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` Vous pouvez trouver les sorties d'alignement dans le répertoire results. diff --git a/docs/fr/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/fr/docs/nf4_science/rnaseq/03_multi-sample.md index 7994e17224..46574dac4a 100644 --- a/docs/fr/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/fr/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` Cette fois, chaque étape est exécutée 6 fois, une fois pour chaque échantillon dans le fichier CSV. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` Un seul appel à MULTIQC a été ajouté après les appels de processus mis en cache. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` Maintenant nous avons deux versions légèrement divergentes de notre workflow, une pour les données de lecture simple et une pour les données de lecture appariée. diff --git a/docs/fr/docs/side_quests/debugging/index.md b/docs/fr/docs/side_quests/debugging/index.md index ed6de0912d..da7d32cf07 100644 --- a/docs/fr/docs/side_quests/debugging/index.md +++ b/docs/fr/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. Utilisation de mots-clés ou de directives de processus incorrects @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. Utilisation de noms de variables incorrects @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ Si vous obtenez une erreur 'No such variable', vous pouvez la corriger soit en d val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // Définir les variables en code Groovy avant le script @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Mauvaise utilisation des variables Bash @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Variables Groovy vs Bash" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` Gardez vos canaux d'entrée définis à l'intérieur du bloc workflow, et suivez en général toutes les autres recommandations que l'extension vous fait. @@ -844,7 +844,7 @@ Apprenez à déboguer des erreurs de structure de canal plus complexes qui survi ## 2. Erreurs de structure de canal -Les erreurs de structure de canal sont plus subtiles que les erreurs de syntaxe car le code est syntaxiquement correct, mais les formes des données ne correspondent pas à ce que les processus attendent. Nextflow essaiera d'exécuter le pipeline, mais pourrait constater que le nombre d'entrées ne correspond pas à ce qu'il attend et échouer. Ces erreurs n'apparaissent généralement qu'à l'exécution et nécessitent une compréhension des données qui circulent dans votre workflow. +Les erreurs de structure de canal sont plus subtiles que les erreurs de syntaxe car le code est syntaxiquement correct, mais les formes des données ne correspondent pas à ce que les processus attendent. Nextflow essaiera d'exécuter le pipeline, mais pourrait constater que le nombre d'entrées ne correspond pas à ce qu'il attend et échouer. Ces erreurs apparaissent généralement uniquement à l'exécution et nécessitent une compréhension des données qui circulent dans votre workflow. !!! tip "Déboguer les canaux avec `.view()`" @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` Plus couramment que dans cet exemple, vous pourriez ajouter des entrées supplémentaires à un processus et oublier de mettre à jour l'appel du workflow en conséquence, ce qui peut conduire à ce type d'erreur. Heureusement, c'est l'une des erreurs les plus faciles à comprendre et à corriger, car le message d'erreur est assez clair sur la discordance. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "Sortie de la commande" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` Ce workflow se termine sans erreur, mais il ne traite qu'un seul échantillon ! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` Vous devriez maintenant voir les trois échantillons traités au lieu d'un seul. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "Sortie de la commande" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. Techniques de débogage des canaux @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. Logiciel manquant @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "Sortie de la commande" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "Note" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker Examinons `bad_resources.nf` : -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // ERREUR : Limite de temps irréaliste input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -Si vous prenez soin de lire vos messages d'erreur, des échecs comme celui-ci ne devraient pas vous déconcerter longtemps. Mais assurez-vous de comprendre les besoins en ressources des commandes que vous exécutez afin de pouvoir configurer vos directives de ressources de manière appropriée. +Avec l'executor `local`, l'erreur est moins explicite qu'elle ne le serait avec un ordonnanceur : vous obtenez `process hasn't exited` et `WARN: Killing running tasks` plutôt qu'un message mentionnant la limite de temps. Le lien à établir est que Nextflow tue une tâche lorsqu'elle dépasse les ressources que vous lui avez allouées ; ainsi, lorsqu'un processus est interrompu sans erreur au niveau du script, vérifiez ses directives de ressources. Ici, le coupable est la directive `time`, qui est bien trop faible pour le travail effectué par le processus. Assurez-vous de comprendre les besoins en ressources des commandes que vous exécutez afin de pouvoir configurer vos directives de ressources de manière appropriée. ### 3.4. Techniques de débogage des processus @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### Examiner le code @@ -2249,16 +2237,20 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - Cette erreur cryptique indique un problème d'analyse autour des lignes 11-12 dans le bloc `params{}`. L'analyseur v2 détecte les problèmes structurels tôt. + L'analyseur pointe vers la ligne 25 (`script:`), mais le vrai coupable se trouve juste au-dessus : la virgule en fin de ligne après la déclaration `output:` à la ligne 23 laisse l'analyseur attendre une autre sortie, ce qui provoque l'échec lorsqu'il atteint `script:`. C'est la première de plusieurs erreurs de syntaxe à corriger. Appliquez la méthode de débogage en quatre phases que vous avez apprise : @@ -2300,7 +2292,7 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati ``` ??? solution "Solution" - Le `buggy_workflow.nf` contient 9 ou 10 erreurs distinctes (selon comment vous les comptez) couvrant toutes les principales catégories de débogage. Voici une analyse systématique de chaque erreur et comment la corriger. + Le `buggy_workflow.nf` contient 10 erreurs distinctes couvrant toutes les principales catégories de débogage. Voici une analyse systématique de chaque erreur et comment la corriger, dans l'ordre où vous les rencontrez réellement avec Nextflow 26.04. Le compilateur résout le workflow en deux passes : il analyse d'abord la syntaxe, puis vérifie statiquement que chaque variable est définie. Vous corrigez donc d'abord les erreurs de syntaxe, puis un lot d'erreurs de variables non définies, avant que le workflow ne s'exécute et que les erreurs d'exécution ne commencent. Commençons par les erreurs de syntaxe : @@ -2315,6 +2307,8 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati path "${sample_id}_result.txt" ``` + Une fois la virgule supprimée, l'analyseur parcourt le fichier jusqu'à la fin en cherchant l'accolade qui devrait fermer `processFiles` et signale `Unexpected input: ''`. + **Erreur 2 : Erreur de syntaxe — Accolade fermante manquante** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati } // Ajouter l'accolade fermante manquante ``` + Maintenant que la syntaxe est correcte, le vérificateur de types statique s'exécute. Il signale toutes les variables non définies en une seule fois, avant l'exécution du workflow : + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + Ces quatre lignes correspondent à trois bugs distincts, les Erreurs 3, 4 et 5 ci-dessous. La dernière, `i`, est une variable Bash que le vérificateur de types ne peut pas distinguer d'une variable Nextflow, elle apparaît donc ici à la compilation plutôt que comme une erreur d'exécution. Corrigez les trois avant de relancer. + **Erreur 3 : Erreur de nom de variable** ```groovy linenums="26" echo "Processing: ${sample}" // ERREUR : devrait être sample_id @@ -2348,14 +2353,23 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // ERREUR : sample_ids non défini ``` - **Correction :** Utiliser le canal correct et extraire les IDs d'échantillons + **Correction :** Utiliser le canal correct ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - À ce stade, le workflow s'exécutera, mais nous obtiendrons encore des erreurs (par exemple `Path value cannot be null` dans `processFiles`), causées par une mauvaise structure de canal. + **Erreur 5 : Erreur d'échappement de variable Bash** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // ERREUR : $i ressemble à une variable Nextflow non définie + ``` + **Correction :** Échapper la variable Bash pour que Nextflow la laisse au shell + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + Une fois ces erreurs résolues, le workflow compile et commence à s'exécuter. La première erreur d'exécution provient de `processFiles`, qui attend un tuple mais reçoit une valeur simple : `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **Erreur 5 : Erreur de structure de canal — Mauvaise sortie de map** + **Erreur 6 : Erreur de structure de canal — Mauvaise sortie de map** ```groovy linenums="83" .map { row -> row.sample_id } // ERREUR : processFiles attend un tuple ``` @@ -2364,29 +2378,18 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - Mais cela cassera notre appel pour exécuter `heavyProcess()` ci-dessus, nous devrons donc utiliser un map pour ne passer que les IDs d'échantillons à ce processus : + Cela corrige `processFiles`, mais `input_ch` émet maintenant un tuple à deux éléments, et `heavyProcess` reçoit toujours le tuple entier alors qu'il n'attend qu'une valeur simple. Le tuple est rendu dans le script sous la forme `[sample_005, /path/sample_005.fastq.gz]`, ce qui provoque une erreur de syntaxe Bash et un code de sortie 2. - **Erreur 6 : Mauvaise structure de canal pour heavyProcess** + **Erreur 7 : Mauvaise structure de canal pour heavyProcess** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // ERREUR : input_ch a maintenant 2 éléments par émission — heavyProcess n'en a besoin que d'un (le premier) + heavy_ch = heavyProcess(input_ch) // ERREUR : input_ch émet maintenant un tuple à 2 éléments ; heavyProcess n'a besoin que du premier élément ``` - **Correction :** Utiliser le canal correct et extraire les IDs d'échantillons + **Correction :** Ne passer que les IDs d'échantillons ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - Maintenant nous allons un peu plus loin mais recevons une erreur `No such variable: i`, car nous n'avons pas échappé une variable Bash. - - **Erreur 7 : Erreur d'échappement de variable Bash** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // ERREUR : $i non échappé - ``` - **Correction :** Échapper la variable bash - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - Maintenant nous obtenons `Process exceeded running time limit (1ms)`, donc nous corrigeons la limite de temps d'exécution pour le processus concerné : + Maintenant `heavyProcess` s'exécute, mais atteint sa limite de temps. Avec l'executor `local`, le message est `process hasn't exited` (accompagné d'un message `WARN: Killing running tasks`) plutôt qu'un timeout explicite ; reliez la tâche interrompue à sa directive `time` : **Erreur 8 : Erreur de configuration de ressources** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati time '100 s' ``` - Ensuite, nous avons une erreur `Missing output file(s)` à résoudre : + Ensuite, nous avons une erreur `Missing output file(s)` à résoudre, car le script écrit `${sample_id}.txt` mais la déclaration output attend `${sample_id}_heavy.txt` : **Erreur 9 : Discordance de nom de fichier de sortie** ```groovy linenums="49" @@ -2408,9 +2411,9 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati done > ${sample_id}_heavy.txt ``` - Les deux premiers processus se sont exécutés, mais pas le troisième. + Le workflow se termine maintenant sans erreur, mais la sortie `files` est vide : `handleFiles` ne s'est jamais exécuté. Son canal d'entrée, `channel.fromPath("*.txt")`, ne correspond à aucun fichier dans le répertoire de lancement, donc le processus est simplement ignoré sans signaler d'erreur. - **Erreur 10 : Discordance de nom de fichier de sortie** + **Erreur 10 : Mauvaise source de canal** ```groovy linenums="88" file_ch = channel.fromPath("*.txt") // Erreur : tentative de prendre l'entrée du répertoire courant plutôt que d'un processus handleFiles(file_ch) @@ -2420,7 +2423,7 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati file_ch = handleFiles(heavy_ch) ``` - Avec cela, l'ensemble du workflow devrait s'exécuter. + Avec cela, l'ensemble du workflow s'exécute de bout en bout et les trois sorties sont renseignées. **Workflow corrigé complet :** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ Il est maintenant temps de mettre en pratique l'approche de débogage systémati script: """ # Simuler un calcul intensif - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/fr/docs/side_quests/dev_environment/index.md b/docs/fr/docs/side_quests/dev_environment/index.md index d75ab99166..3b4170b192 100644 --- a/docs/fr/docs/side_quests/dev_environment/index.md +++ b/docs/fr/docs/side_quests/dev_environment/index.md @@ -87,7 +87,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "À propos des fichiers d'exemple" @@ -97,7 +97,7 @@ tree . ### Raccourcis clavier -Certaines fonctionnalités de ce guide utilisent des raccourcis clavier optionnels. Si vous accédez à ce contenu via GitHub Codespaces dans un navigateur, il est possible que certains raccourcis ne fonctionnent pas comme prévu, car ils sont utilisés à d'autres fins dans votre système. +Certaines fonctionnalités de ce guide utilisent des raccourcis clavier optionnels. Il est possible que vous accédiez à ce contenu via GitHub Codespaces dans un navigateur, auquel cas certains raccourcis peuvent ne pas fonctionner comme prévu, car ils sont utilisés à d'autres fins dans votre système. Si vous exécutez VS Code localement, comme vous le ferez probablement lorsque vous écrirez réellement des workflows, les raccourcis fonctionneront comme décrit. @@ -112,7 +112,7 @@ Si vous utilisez un Mac, certains raccourcis clavier (pas tous) utiliseront "cmd Pour installer l'extension manuellement : 1. Ouvrez VS Code -2. Accédez à la vue Extensions en cliquant sur l'icône des extensions à gauche : ![icône des extensions](../img/extensions_icon.png) (raccourci `Ctrl/Cmd+Shift+X` si vous exécutez VSCode localement) +2. Accédez à la vue Extensions en cliquant sur l'icône des extensions à gauche : ![icône des extensions](../img/extensions_icon.png) (raccourci `Ctrl/Cmd+Shift+X` si vous exécutez VS Code localement) 3. Recherchez "Nextflow" 4. Installez l'extension Nextflow officielle @@ -344,7 +344,7 @@ Explorons maintenant la navigation dans un workflow plus complexe en utilisant ` ### 4.2. Navigation par symboles -Avec `complex_workflow.nf` toujours ouvert, vous pouvez obtenir un aperçu de tous les symboles du fichier en tapant `@` dans la barre de recherche en haut de VSCode (le raccourci clavier est `Ctrl/Cmd+Shift+O`, mais il peut ne pas fonctionner dans Codespaces). Cela ouvre le panneau de navigation par symboles, qui liste tous les symboles du fichier courant : +Avec `complex_workflow.nf` toujours ouvert, vous pouvez obtenir un aperçu de tous les symboles du fichier en tapant `@` dans la barre de recherche en haut de VS Code (le raccourci clavier est `Ctrl/Cmd+Shift+O`, mais il peut ne pas fonctionner dans Codespaces). Cela ouvre le panneau de navigation par symboles, qui liste tous les symboles du fichier courant : ![Navigation par symboles](../img/symbols.png) @@ -558,13 +558,13 @@ Si votre projet est un dépôt git (comme c'est le cas ici), VS Code affiche : - Les vues de différences en ligne - Les capacités de commit et de push -Ouvrez le panneau Contrôle de source en utilisant le bouton de contrôle de source (![icône du contrôle de source](../img/source_control_icon.png)) (`Ctrl+Shift+G` ou `Cmd+Shift+G` si vous travaillez avec VSCode localement) pour voir les modifications git et effectuer des commits directement dans l'éditeur. +Ouvrez le panneau Contrôle de source en utilisant le bouton de contrôle de source (![Icône du contrôle de source](../img/source_control_icon.png)) (`Ctrl+Shift+G` ou `Cmd+Shift+G` si vous travaillez avec VS Code localement) pour voir les modifications git et effectuer des commits directement dans l'éditeur. ![Panneau Contrôle de source](../img/source_control.png) ### 7.2. Exécution et inspection des workflows -Exécutons un workflow puis inspectons les résultats. Dans le terminal intégré (`Ctrl+Shift+` backtick pour Windows et MacOS), exécutez le workflow de base : +Exécutons un workflow puis inspectons les résultats. Dans le terminal intégré (`Ctrl+Shift+` backtick sous Windows et MacOS), exécutez le workflow de base : ```bash title="Run the basic workflow" nextflow run basic_workflow.nf --input data/sample_data.csv --output_dir results diff --git a/docs/fr/docs/side_quests/essential_scripting_patterns/index.md b/docs/fr/docs/side_quests/essential_scripting_patterns/index.md index 179de843e4..78cda87aed 100644 --- a/docs/fr/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/fr/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, Nous utiliserons ce jeu de données réaliste pour explorer des techniques de programmation pratiques que vous rencontrerez dans de vrais workflows bioinformatiques. - - - - #### Liste de vérification Vous pensez être prêt·e à vous lancer ? @@ -112,9 +108,19 @@ Commencez par un workflow simple qui lit simplement le fichier CSV (nous l'avons ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Ajout de l'opérateur Map @@ -148,7 +162,7 @@ Voici à quoi ressemble cette opération map : === "Après" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ Voici à quoi ressemble cette opération map : === "Avant" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ Nous allons maintenant écrire de la logique de **scripting** à l'intérieur de === "Après" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ Nous allons maintenant écrire de la logique de **scripting** à l'intérieur de === "Avant" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ Effectuez le changement suivant : === "Après" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ Effectuez le changement suivant : === "Avant" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ Ajoutons une ligne pour créer une version simplifiée de nos métadonnées qui === "Après" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ Ajoutons une ligne pour créer une version simplifiée de nos métadonnées qui === "Avant" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Cela montre à la fois les métadonnées complètes affichées par l'opération `view()` et le sous-ensemble extrait que nous avons affiché avec `println`. @@ -392,7 +412,7 @@ Produisons une structure de canal comprenant un tuple de 2 éléments : la map d === "Après" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -411,7 +431,7 @@ Produisons une structure de canal comprenant un tuple de 2 éléments : la map d === "Avant" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -487,9 +507,9 @@ nextflow run collect.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -503,7 +523,7 @@ Voyons maintenant la méthode `collect` sur une List en action. Modifiez `collec === "Après" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - regroupe plusieurs émissions de canal en une seule @@ -521,7 +541,7 @@ Voyons maintenant la méthode `collect` sur une List en action. Modifiez `collec === "Avant" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - regroupe plusieurs émissions de canal en une seule @@ -545,9 +565,9 @@ nextflow run collect.nf ??? success "Sortie de la commande" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -616,9 +636,9 @@ nextflow run collect.nf ??? success "Sortie de la commande" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -677,7 +697,7 @@ Effectuez le changement suivant dans votre workflow `main.nf` existant : === "Après" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // Scripting pour la transformation des données def sample_meta = [ @@ -704,7 +724,7 @@ Effectuez le changement suivant dans votre workflow `main.nf` existant : === "Avant" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // Scripting pour la transformation des données def sample_meta = [ @@ -747,13 +767,19 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Cela montre les métadonnées enrichies à partir des noms de fichiers. @@ -800,8 +826,9 @@ Ensuite, modifiez le bloc `workflow` pour connecter le canal `ch_samples` au pro === "Après" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -828,13 +855,23 @@ Ensuite, modifiez le bloc `workflow` pour connecter le canal `ch_samples` au pro } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "Avant" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -857,9 +894,18 @@ Ensuite, modifiez le bloc `workflow` pour connecter le canal `ch_samples` au pro ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -872,28 +918,41 @@ nextflow run main.nf ??? failure "Sortie de la commande" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` Vous pouvez voir que le processus essaie d'exécuter `fastp` avec une valeur `null` pour le deuxième fichier d'entrée, ce qui provoque son échec. C'est parce que notre jeu de données contient des lectures simple brin, mais le processus est codé en dur pour attendre des lectures double brin (deux fichiers d'entrée à la fois). @@ -957,18 +1016,24 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Ça a l'air bien ! Si nous vérifions les commandes réelles qui ont été exécutées (adaptez au hash de votre tâche) : ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Nous pouvons voir que Nextflow a correctement choisi la bonne commande pour les lectures simple brin : @@ -980,7 +1045,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Un autre usage courant de la logique de script dynamique peut être vu dans [le module Nextflow for Science Genomics](../../nf4_science/genomics/03_joint_calling.md). Dans ce module, le processus GATK appelé peut prendre plusieurs fichiers d'entrée, mais chacun doit être préfixé par `-V` pour former une ligne de commande correcte. Le processus utilise le scripting pour transformer une collection de fichiers d'entrée (`all_gvcfs`) en arguments de commande corrects : @@ -1027,11 +1092,12 @@ Incluez le processus dans votre `main.nf` et ajoutez-le au workflow : === "Après" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1058,15 +1124,25 @@ Incluez le processus dans votre `main.nf` et ajoutez-le au workflow : ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Avant" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1092,17 +1168,44 @@ Incluez le processus dans votre `main.nf` et ajoutez-le au workflow : } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` Exécutez maintenant le workflow et vérifiez les rapports générés dans `results/reports/`. Ils devraient contenir des informations de base sur chaque échantillon. - +```bash +nextflow run main.nf +``` ??? success "Sortie de la commande" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` Mais que faire si nous voulons ajouter des informations sur quand et où le traitement a eu lieu ? Modifions le processus pour utiliser des variables **shell** et un peu de substitution de commandes pour inclure l'utilisateur·trice actuel·le, le nom d'hôte et la date dans le rapport : @@ -1135,11 +1238,18 @@ Si vous exécutez cela, vous remarquerez une erreur -- Nextflow essaie d'interpr ??? failure "Sortie de la commande" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Nous devons l'échapper pour que Bash puisse le gérer à la place. @@ -1199,7 +1309,7 @@ Pour illustrer à quoi cela ressemble avec notre workflow existant, effectuez la === "Après" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1226,22 +1336,33 @@ Pour illustrer à quoi cela ressemble avec notre workflow existant, effectuez la } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Avant" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1268,6 +1389,15 @@ Pour illustrer à quoi cela ressemble avec notre workflow existant, effectuez la ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1293,13 +1423,22 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` La sortie devrait montrer les deux processus se terminant avec succès. Le workflow est maintenant beaucoup plus propre et plus facile à maintenir, avec toute la logique complexe de traitement des métadonnées encapsulée dans la fonction `separateMetadata`. @@ -1363,26 +1502,35 @@ nextflow run main.nf -ansi-log false ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` Vous pouvez vérifier la commande `docker` exacte qui a été exécutée pour voir l'allocation de CPU pour une tâche donnée : ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` Vous devriez voir quelque chose comme : ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` Dans cet exemple, nous avons choisi un exemple qui a demandé 2 CPUs (`--cpu-shares 2048`), car c'était un échantillon à haute profondeur, mais vous devriez voir différentes allocations de CPU selon la profondeur de l'échantillon. Essayez cela pour les autres tâches également. @@ -1436,7 +1584,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` Cela indique que le processus a été tué pour avoir dépassé les limites de mémoire. @@ -1524,7 +1672,7 @@ Incluez le nouveau module depuis `modules/trimgalore.nf` : === "Après" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1542,7 +1690,7 @@ Incluez le nouveau module depuis `modules/trimgalore.nf` : === "Avant" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1560,14 +1708,26 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` Ici, nous avons utilisé de petites mais puissantes expressions conditionnelles à l'intérieur de l'opérateur `.branch{}` pour router les échantillons en fonction de leurs métadonnées. Les échantillons humains à haute couverture passent par `FASTP`, tandis que tous les autres échantillons passent par `TRIMGALORE`. @@ -1587,7 +1747,7 @@ Ajoutez ce qui suit avant l'opération de branchement : === "Après" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1607,7 +1767,7 @@ Ajoutez ce qui suit avant l'opération de branchement : === "Avant" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1628,21 +1788,31 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -Parce que nous avons choisi un filtre qui exclut certains échantillons, moins de tâches ont été exécutées. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +Dans ce cas, les trois échantillons satisfont le filtre, donc chaque échantillon continue dans le pipeline. +Un seuil plus strict exclurait les échantillons à faible profondeur et réduirait le nombre de tâches exécutées. L'expression de filtre `meta.id && meta.organism && meta.depth >= 25000000` combine la véracité avec des comparaisons explicites : @@ -1712,13 +1882,13 @@ nextflow run main.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` Cela plante avec une NullPointerException. @@ -1768,7 +1938,27 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` Plus de plantage ! Le workflow gère maintenant le champ manquant avec élégance. Lorsque `row.run_id` est `null`, l'opérateur `?.` empêche l'appel à `.toUpperCase()`, et `run_id` devient `null` au lieu de provoquer une exception. @@ -1812,7 +2002,7 @@ Ajoutez également un opérateur `view()` dans le workflow pour voir les résult === "Après" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1821,7 +2011,7 @@ Ajoutez également un opérateur `view()` dans le workflow pour voir les résult === "Avant" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1876,7 +2066,7 @@ Créez une fonction de validation avant votre bloc de workflow, appelez-la depui === "Après" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1894,6 +2084,7 @@ Créez une fonction de validation avant votre bloc de workflow, appelez-la depui } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1907,6 +2098,7 @@ Créez une fonction de validation avant votre bloc de workflow, appelez-la depui ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1919,9 +2111,9 @@ nextflow run main.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1938,9 +2130,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1954,7 +2146,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "Sortie de la commande" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Cette fois, il s'exécute avec succès. @@ -1993,14 +2205,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2031,7 +2253,7 @@ Ajoutez le gestionnaire d'événements à votre fichier `main.nf`, à l'intérie === "Après" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2047,15 +2269,21 @@ Ajoutez le gestionnaire d'événements à votre fichier `main.nf`, à l'intérie println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "Avant" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2070,29 +2298,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Rendons-le plus utile en ajoutant une logique conditionnelle : === "Après" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2115,12 +2358,15 @@ Rendons-le plus utile en ajoutant une logique conditionnelle : println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "Avant" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2136,34 +2382,53 @@ Rendons-le plus utile en ajoutant une logique conditionnelle : println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` Nous obtenons maintenant un résumé encore plus informatif, incluant un message de succès/échec et le répertoire de sortie si spécifié : - +```bash +nextflow run main.nf +``` ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` Vous pouvez également écrire le résumé dans un fichier en utilisant des opérations sur les fichiers : @@ -2195,7 +2460,22 @@ workflow { En plus de `onComplete`, il existe un autre gestionnaire d'événements que vous pouvez utiliser : `onError`, qui s'exécute uniquement si le workflow échoue : -```groovy title="main.nf - onError handler" +````groovy title="main.nf - onError handler" +workflow { + // ... votre code de workflow ... + + workflow.onError = { + println "="* 50 + println "Pipeline execution failed!" + println "Error message: ${workflow.errorMessage}" + println "="* 50 + + // Écrire un journal d'erreur détaillé + def error_file = file("${workflow.launchDir}/error.log") + error_file.text = """ + Workflow Error Report + ===================== + Time: ${new```groovy title="main.nf - onError handler" workflow { // ... votre code de workflow ... @@ -2218,7 +2498,7 @@ workflow { println "Error details written to: ${error_file}" } } -``` +```` Vous pouvez utiliser plusieurs gestionnaires ensemble dans votre script de workflow : @@ -2409,9 +2689,7 @@ Appliquer ces modèles dans votre propre travail vous permettra de construire de - Utiliser `onComplete` pour journaliser et notifier - ````groovy - workflow.onComplete = { - println```groovy + ```groovy workflow.onComplete = { println "Success : ${workflow.success}" println "exit status : ${workflow.exitStatus}" @@ -2423,7 +2701,7 @@ Appliquer ces modèles dans votre propre travail vous permettra de construire de println "Error: ${workflow.errorMessage}" } } - ```` + ``` - Utiliser `onError` pour agir spécifiquement en cas d'échec diff --git a/docs/fr/docs/side_quests/metadata/index.md b/docs/fr/docs/side_quests/metadata/index.md index 2f735c8182..6557b4f3f7 100644 --- a/docs/fr/docs/side_quests/metadata/index.md +++ b/docs/fr/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Nous pouvons voir que l'opérateur a construit une map de paires clé-valeur pour chaque ligne du fichier CSV, avec les en-têtes de colonnes comme clés pour les valeurs correspondantes. @@ -265,9 +271,9 @@ Par exemple, nous pourrions accéder à l'identifiant du fichier avec `id` ou au Et voici ce que vous pouvez vous attendre à voir dans la sortie : ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Cela montre que nous sommes capables d'accéder aux valeurs de la colonne `character` pour chaque ligne. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Comme vous pouvez le voir, `COWPY` s'est exécuté sur chaque fichier en utilisant le personnage correct pour chacun. @@ -654,12 +679,25 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` La sortie est la même que les sept fichiers `cowpy-*.txt` qu'auparavant, maintenant produits avec un appel plus simple à `COWPY`. @@ -744,7 +782,7 @@ Restructurons l'opération `map` pour produire un tuple `[meta, file]` : === "Avant" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -770,9 +808,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -781,6 +819,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Chaque élément du canal est maintenant un tuple à deux éléments : la meta map en premier, le fichier en second. @@ -792,7 +836,7 @@ Chaque élément du canal est maintenant un tuple à deux éléments : la meta m ] ``` -Si nous ajoutons ultérieurement une colonne `language` à la feuille de données, elle sera disponible en tant que `meta.language` sans nécessiter de modifications de la définition des entrées du processus. +Si nous ajoutons ultérieurement une colonne `language` à la feuille de données et l'incluons dans l'opération `map` (par exemple `language: row.language`), elle sera disponible en tant que `meta.language` sans nécessiter de modifications de la définition des entrées du processus. #### 1.5.3. Mettre à jour le processus `COWPY` pour utiliser la meta map @@ -891,12 +935,25 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Le répertoire des résultats contient maintenant les fichiers d'art ASCII. @@ -1044,20 +1101,33 @@ nextflow run main.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` Nous avons maintenant une prédiction de langue pour chaque fichier du jeu de données. @@ -1206,19 +1276,32 @@ nextflow run main.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` Oui, c'est bien ça ! @@ -1311,7 +1394,7 @@ Points clés : -#### 2.3.2. Exécuter le workflow +#### 2.3.2. Exécuter le workflow : Exécutez le workflow pour vérifier que cela fonctionne : @@ -1322,19 +1405,32 @@ nextflow run main.nf -resume ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` La meta map contient maintenant quatre champs : `id`, `character`, `lang` et `lang_group`. @@ -1445,13 +1541,26 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` Le répertoire des résultats est maintenant organisé par famille linguistique, avec chaque fichier nommé d'après sa langue détectée : @@ -1509,18 +1618,19 @@ Lorsque Nextflow substitue `#!groovy ${meta.character}` dans la commande, l'outi ??? failure "Sortie de la commande" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1540,7 +1650,7 @@ Lorsque Nextflow substitue `#!groovy ${meta.character}` dans la commande, l'outi cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1564,28 +1674,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -La clé `character` n'est jamais créée dans la meta map. -Lorsque le script du processus évalue `#!groovy ${meta.character}`, la clé manquante retourne `null`, et Nextflow substitue littéralement la chaîne `null` dans la commande : +Notre opération `map` écrit explicitement `#!groovy character: row.character`, donc la clé `character` est tout de même créée dans la meta map, mais accéder à une colonne qui n'existe pas dans la ligne analysée retourne `null`, et sa valeur devient donc `null`. +Lorsque le script du processus évalue `#!groovy ${meta.character}`, Nextflow substitue littéralement la chaîne `null` dans la commande : ??? failure "Sortie de la commande" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1610,7 +1721,7 @@ Lorsque le script du processus évalue `#!groovy ${meta.character}`, la clé man TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/fr/docs/side_quests/nf_test/index.md b/docs/fr/docs/side_quests/nf_test/index.md index c9f038e0f3..8d83cbd816 100644 --- a/docs/fr/docs/side_quests/nf_test/index.md +++ b/docs/fr/docs/side_quests/nf_test/index.md @@ -19,7 +19,7 @@ Les tests vous permettent de vérifier systématiquement que chaque partie de vo Il existe de nombreux types de tests que nous pouvons écrire : -1. **Tests au niveau des modules** : Pour les processus individuels +1. **Tests au niveau des processus** : Pour les processus individuels 2. **Tests au niveau du workflow** : Pour un seul workflow 3. **Tests au niveau du pipeline** : Pour le pipeline dans son ensemble 4. **Tests de performance** : Pour la vitesse et l'efficacité du pipeline @@ -27,16 +27,16 @@ Il existe de nombreux types de tests que nous pouvons écrire : Tester des processus individuels est analogue aux tests unitaires dans d'autres langages. Tester le workflow ou l'ensemble du pipeline est analogue à ce qu'on appelle les tests d'intégration dans d'autres langages, où l'on teste les interactions entre les composants. -[**nf-test**](https://www.nf-test.com/) est un outil qui vous permet d'écrire des tests au niveau des modules, des workflows et des pipelines. En résumé, il vous permet de vérifier systématiquement que chaque partie individuelle du pipeline fonctionne comme prévu, _de manière isolée_. +[**nf-test**](https://www.nf-test.com/) est un outil qui vous permet d'écrire des tests au niveau des processus, des workflows et des pipelines. En résumé, il vous permet de vérifier systématiquement que chaque partie individuelle du pipeline fonctionne comme prévu, _de manière isolée_. ### Objectifs d'apprentissage -Dans cette quête secondaire, vous apprendrez à utiliser nf-test pour écrire un test au niveau du workflow pour le pipeline ainsi que des tests au niveau des modules pour les trois processus qu'il appelle. +Dans cette quête secondaire, vous apprendrez à utiliser nf-test pour écrire un test au niveau du workflow pour le pipeline ainsi que des tests au niveau des processus pour les deux processus qu'il appelle. À la fin de cette quête secondaire, vous serez en mesure d'utiliser efficacement les techniques suivantes : - Initialiser nf-test dans votre projet -- Générer des tests au niveau des modules et du workflow +- Générer des tests au niveau des processus et du workflow - Ajouter des types courants d'assertions - Comprendre quand utiliser les snapshots plutôt que les assertions de contenu - Exécuter des tests pour un projet entier @@ -50,6 +50,16 @@ Avant de vous lancer dans cette quête secondaire, vous devriez : - Avoir complété le tutoriel [Hello Nextflow](../../hello_nextflow/index.md) ou un cours équivalent pour débutant·es. - Être à l'aise avec les concepts et mécanismes de base de Nextflow (processus, canaux, opérateurs, manipulation de fichiers, métadonnées) +!!! warning "Avertissement : version requise de nf-test" + + Les tests au niveau des processus nécessitent **nf-test 0.9.3 ou une version ultérieure**. Les versions plus anciennes (y compris la 0.9.2) génèrent du code de harnais de test incompatible avec l'analyseur syntaxique strict que Nextflow utilise par défaut à partir de la version 26.04, provoquant une erreur `Script compilation failed` au lieu du résultat de test attendu. + + Vérifiez votre version avec `nf-test version`. Si vous devez effectuer une mise à jour : + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. Premiers pas @@ -81,7 +91,8 @@ Vous trouverez un fichier de workflow principal et un fichier CSV appelé `greet ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` Pour une description détaillée des fichiers, consultez [l'échauffement de Hello Nextflow](../../hello_nextflow/00_orientation.md). @@ -111,21 +122,23 @@ Vous pouvez voir le code complet du workflow ci-dessous. ??? example "Code du workflow" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * Paramètres du pipeline - */ + * Paramètres du pipeline + */ params.input_file = "greetings.csv" /* - * Utilise echo pour afficher 'Hello World!' sur la sortie standard - */ + * Utilise echo pour afficher 'Hello World!' sur la sortie standard + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -134,15 +147,15 @@ Vous pouvez voir le code complet du workflow ci-dessous. } /* - * Utilise un utilitaire de remplacement de texte pour convertir la salutation en majuscules - */ + * Utilise un utilitaire de remplacement de texte pour convertir la salutation en majuscules + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -183,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` FÉLICITATIONS ! Vous venez d'exécuter un test ! @@ -435,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` Succès ! Le pipeline s'exécute avec succès et le test passe. Exécutez-le autant de fois que vous le souhaitez et vous obtiendrez toujours le même résultat ! @@ -460,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -534,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` Succès ! Le pipeline s'exécute avec succès et le test passe. Nous avons maintenant commencé à tester les détails du pipeline, ainsi que son statut global. @@ -619,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` Succès ! Les tests passent parce que le pipeline s'est terminé avec succès, le nombre correct de processus a été exécuté et les fichiers de sortie ont été créés. Cela devrait également vous montrer à quel point il est utile de fournir des noms informatifs à vos tests. @@ -730,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -800,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -808,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` Succès ! Le test passe parce que le processus `sayHello` s'est exécuté avec succès et la sortie a été créée. @@ -858,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` Succès ! Le test passe parce que le processus `sayHello` s'est exécuté avec succès et la sortie correspond au snapshot. @@ -951,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. Tester le processus `convertToUpper` @@ -998,10 +1040,10 @@ C'est un test similaire à celui du processus `sayHello`, mais il teste le proce Nous devons maintenant fournir un seul fichier d'entrée au processus convertToUpper, qui contient du texte que nous voulons convertir en majuscules. Il existe de nombreuses façons de procéder : - Nous pourrions créer un fichier dédié pour les tests -- Nous pourrions réutiliser le fichier data/greetings.csv existant +- Nous pourrions réutiliser le fichier greetings.csv existant - Nous pourrions le créer à la volée dans le test -Pour l'instant, réutilisons le fichier data/greetings.csv existant en utilisant l'exemple que nous avons utilisé avec le test au niveau du pipeline. Comme précédemment, nous pouvons nommer le test pour mieux refléter ce que nous testons, mais cette fois laissons-le faire un 'snapshot' du contenu plutôt que de vérifier des chaînes spécifiques (comme nous l'avons fait dans l'autre processus). +Pour l'instant, réutilisons le fichier greetings.csv existant en utilisant l'exemple que nous avons utilisé avec le test au niveau du pipeline. Comme précédemment, nous pouvons nommer le test pour mieux refléter ce que nous testons, mais cette fois laissons-le faire un 'snapshot' du contenu plutôt que de vérifier des chaînes spécifiques (comme nous l'avons fait dans l'autre processus). === "Après" @@ -1070,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1078,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` Notez que nous avons créé un fichier snapshot pour le processus `convertToUpper` à `tests/main.converttoupper.nf.test.snap`. Si nous réexécutons le test, nous devrions voir que nf-test passe à nouveau. @@ -1097,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### À retenir @@ -1139,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` Regardez ça ! Nous avons exécuté 4 tests, 1 pour chaque processus et 2 pour l'ensemble du pipeline avec une seule commande. Imaginez la puissance de cela sur une grande base de code ! @@ -1193,7 +1235,7 @@ Consultez la [documentation nf-test](https://www.nf-test.com/) pour des fonction - Ajouter des assertions plus complètes à vos tests - Écrire des tests pour les cas limites et les conditions d'erreur - Configurer l'intégration continue pour exécuter les tests automatiquement -- En apprendre davantage sur d'autres types de tests comme les tests de workflow et de modules +- En apprendre davantage sur d'autres types de tests comme les tests de workflow, de performance et de charge - Explorer des techniques de validation de contenu plus avancées **Rappel :** Les tests sont une documentation vivante de la façon dont votre code devrait se comporter. Plus vous écrivez de tests, et plus vos assertions sont spécifiques, plus vous pouvez être confiant·e dans la fiabilité de votre pipeline. diff --git a/docs/fr/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/fr/docs/side_quests/plugin_development/01_plugin_basics.md index 4cebe69bb5..94ff663bdb 100644 --- a/docs/fr/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/fr/docs/side_quests/plugin_development/01_plugin_basics.md @@ -511,7 +511,7 @@ Mettez à jour `nextflow.config` : plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -534,7 +534,7 @@ Le plugin produit plusieurs messages INFO et WARN pendant l'exécution. Ceux-ci sont normaux pour un petit exemple s'exécutant sur une machine locale : ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -600,7 +600,7 @@ Ajoutez un bloc `co2footprint` à `nextflow.config` : plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -614,7 +614,7 @@ Ajoutez un bloc `co2footprint` à `nextflow.config` : plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -635,11 +635,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: L'avertissement de zone a disparu. Le plugin utilise maintenant l'intensité carbone spécifique à la Grande-Bretagne (163,92 gCO₂eq/kWh) au lieu de la valeur de repli mondiale (480,0 gCO₂eq/kWh). -!!! note "Note" - - Vous pouvez également voir un message `WARN: Unrecognized config option 'co2footprint.location'`. - Il s'agit d'un message cosmétique qui peut être ignoré en toute sécurité ; le plugin lit toujours la valeur correctement. - Dans la Partie 6, vous créerez une portée de configuration pour votre propre plugin. Ce plugin fonctionne entièrement via le mécanisme observateur, en se connectant aux événements du cycle de vie du workflow pour collecter des métriques de ressources et générer son rapport lorsque le pipeline se termine. diff --git a/docs/fr/docs/side_quests/plugin_development/02_create_project.md b/docs/fr/docs/side_quests/plugin_development/02_create_project.md index f11a8ef9cf..221c2cfc77 100644 --- a/docs/fr/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/fr/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ Vous devriez voir : ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ La plus importante est le bloc `nextflowPlugin` : ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ Mettez-la à jour pour qu'elle corresponde à votre version de Nextflow install ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ Mettez-la à jour pour qu'elle corresponde à votre version de Nextflow install ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **Les avertissements sont attendus.** diff --git a/docs/fr/docs/side_quests/plugin_development/03_custom_functions.md b/docs/fr/docs/side_quests/plugin_development/03_custom_functions.md index 9b27df5b50..b09cbee332 100644 --- a/docs/fr/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/fr/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "Sortie" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "Sortie" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/fr/docs/side_quests/plugin_development/04_build_and_test.md b/docs/fr/docs/side_quests/plugin_development/04_build_and_test.md index 2121e03ed4..44c36c5ca9 100644 --- a/docs/fr/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/fr/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **Où sont les résultats des tests ?** Gradle masque la sortie détaillée lorsque tous les tests réussissent. diff --git a/docs/fr/docs/side_quests/plugin_development/05_observers.md b/docs/fr/docs/side_quests/plugin_development/05_observers.md index 49585e418b..1e55afcee5 100644 --- a/docs/fr/docs/side_quests/plugin_development/05_observers.md +++ b/docs/fr/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "Sortie" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/fr/docs/side_quests/plugin_development/06_configuration.md b/docs/fr/docs/side_quests/plugin_development/06_configuration.md index 0bc7a85071..7938465ce2 100644 --- a/docs/fr/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/fr/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ La compilation échoue : ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` En Groovy (et en Java), vous devez _déclarer_ une variable avant de l'utiliser. diff --git a/docs/fr/docs/side_quests/plugin_development/index.md b/docs/fr/docs/side_quests/plugin_development/index.md index 685b18021c..c9674ee212 100644 --- a/docs/fr/docs/side_quests/plugin_development/index.md +++ b/docs/fr/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ Aucune expérience préalable en Java ou en Groovy n'est requise. **Répertoire de travail :** `side-quests/plugin_development` +#### Ouvrir l'espace de code de formation + +Si vous ne l'avez pas encore fait, assurez-vous d'ouvrir l'environnement de formation tel que décrit dans la [Configuration de l'environnement](../../envsetup/index.md). + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Objectifs pédagogiques À la fin de cette formation, vous serez en mesure de : diff --git a/docs/fr/docs/side_quests/splitting_and_grouping/index.md b/docs/fr/docs/side_quests/splitting_and_grouping/index.md index c19353828e..73abc80de0 100644 --- a/docs/fr/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/fr/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ Appliquez ces modifications à `main.nf` : === "Après" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ Ensuite, nous examinerons la situation où vous souhaitez joindre sur plusieurs ### 3.2. Joindre sur plusieurs champs -Nous avons 2 réplicats pour sampleA, mais seulement 1 pour sampleB et sampleC. Dans ce cas, nous avons pu les joindre efficacement en utilisant le champ `id`, mais que se passerait-il s'ils étaient désynchronisés ? Nous pourrions mélanger les échantillons normaux et tumoraux de différents réplicats ! +Nous avons 2 réplicats pour patientA, mais seulement 1 pour patientB et patientC. Dans ce cas, nous avons pu les joindre efficacement en utilisant le champ `id`, mais que se passerait-il s'ils étaient désynchronisés ? Nous pourrions mélanger les échantillons normaux et tumoraux de différents réplicats ! Pour éviter cela, nous pouvons joindre sur plusieurs champs. Il existe en réalité plusieurs façons d'y parvenir, mais nous allons nous concentrer sur la création d'une nouvelle clé de jointure qui inclut à la fois l'`id` de l'échantillon et le numéro de `replicate`. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + Étant donné que la closure enveloppe désormais chaque chemin avec `file()`, les entrées de fichiers apparaissent sous forme de chemins absolus résolus plutôt que de simples noms de fichiers issus du samplesheet. + L'utilisation d'une closure nommée nous permet de réutiliser la même transformation à plusieurs endroits, réduisant le risque d'erreurs et rendant le code plus lisible et maintenable. ### 3.5. Réduire la duplication des données @@ -723,21 +725,21 @@ Nous avons beaucoup de données dupliquées dans notre workflow. Chaque élémen ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ Dans cette section, vous avez appris : ## 5. Agréger des échantillons avec `groupTuple` -Dans les sections précédentes, nous avons appris à séparer les données d'un fichier d'entrée et à filtrer par champs spécifiques (dans notre cas les échantillons normaux et tumoraux). Mais cela ne couvre qu'un seul type de jointure. Que faire si nous voulons regrouper des échantillons par un attribut spécifique ? Par exemple, au lieu de joindre des paires normal-tumeur correspondantes, nous pourrions vouloir traiter tous les échantillons de "sampleA" ensemble indépendamment de leur type. Ce pattern est courant dans les workflows bioinformatiques où vous pouvez vouloir traiter des échantillons liés séparément pour des raisons d'efficacité avant de comparer ou combiner les résultats à la fin. +Dans les sections précédentes, nous avons appris à séparer les données d'un fichier d'entrée et à filtrer par champs spécifiques (dans notre cas les échantillons normaux et tumoraux). Mais cela ne couvre qu'un seul type de jointure. Que faire si nous voulons regrouper des échantillons par un attribut spécifique ? Par exemple, au lieu de joindre des paires normal-tumeur correspondantes, nous pourrions vouloir traiter tous les échantillons de "patientA" ensemble indépendamment de leur type. Ce pattern est courant dans les workflows bioinformatiques où vous pouvez vouloir traiter des échantillons liés séparément pour des raisons d'efficacité avant de comparer ou combiner les résultats à la fin. Nextflow inclut des méthodes intégrées pour faire cela, la principale que nous examinerons est `groupTuple`. @@ -1008,7 +1014,7 @@ La première étape est similaire à ce que nous avons fait dans la section pré ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Maîtriser ces opérations de canaux vous permettra de construire des pipelines 2. **Séparer les données en canaux distincts :** Nous avons utilisé `filter` pour diviser les données en flux indépendants sur la base du champ `type` ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Joindre des échantillons correspondants :** Nous avons utilisé `join` pour recombiner des échantillons liés sur la base des champs `id` et `repeat` @@ -1199,31 +1205,31 @@ Maîtriser ces opérations de canaux vous permettra de construire des pipelines - Joindre deux canaux par clé (premier élément du tuple) ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Extraire la clé de jointure et joindre par cette valeur ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - Joindre sur plusieurs champs avec subMap + - Joindre sur plusieurs champs avec `subMap` ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Distribuer sur des intervalles :** Nous avons utilisé `combine` pour créer des produits cartésiens d'échantillons avec des intervalles génomiques pour le traitement parallèle. ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Agréger par clés de regroupement :** Nous avons utilisé `groupTuple` pour regrouper par le premier élément de chaque tuple, collectant ainsi les échantillons partageant les champs `id` et `interval` et fusionnant les réplicats techniques. diff --git a/docs/fr/docs/side_quests/workflows_of_workflows/index.md b/docs/fr/docs/side_quests/workflows_of_workflows/index.md index 9bf0a623ca..cfa1148e40 100644 --- a/docs/fr/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/fr/docs/side_quests/workflows_of_workflows/index.md @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` Pour le rendre composable avec d'autres workflows, quelques modifications sont nécessaires. ### 1.2. Rendre le workflow composable -Pour rendre un workflow composable, quatre choses doivent changer : -le workflow reçoit un nom, les entrées sont déplacées dans un bloc `take:`, les sorties sont déplacées dans un bloc `emit:`, -et les blocs autonomes `publish:`/`output {}` sont supprimés (ils appartiennent au entry workflow). +Pour rendre un workflow composable, trois choses doivent changer : +le workflow reçoit un nom, les entrées sont déplacées dans un bloc `take:`, et les sorties sont déplacées dans un bloc `emit:` +(en remplacement des blocs autonomes `publish:`/`output {}`, qui appartiennent au entry workflow). Parcourons ces modifications une par une. @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "Contenu du répertoire" @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` Pour le rendre composable avec `GREETING_WORKFLOW`, les mêmes trois modifications de la section 1.2 s'appliquent. @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "Contenu du répertoire" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "Contenu du fichier" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` Le pipeline fonctionne de bout en bout : la salutation a été convertie en majuscules et inversée. diff --git a/docs/fr/docs/side_quests/working_with_files/index.md b/docs/fr/docs/side_quests/working_with_files/index.md index e1b3329388..3f2340f51f 100644 --- a/docs/fr/docs/side_quests/working_with_files/index.md +++ b/docs/fr/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Comme vous pouvez le voir, Nextflow a affiché le chemin sous forme de chaîne exactement tel que nous l'avons écrit. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Cette fois, vous voyez le chemin absolu complet au lieu du chemin relatif que nous avons fourni en entrée. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Vous voyez les différents attributs du fichier affichés dans la console ci-dessus. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Cela montre que nous sommes en mesure d'opérer correctement sur le fichier à l'intérieur d'un processus. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Voici la partie importante : @@ -545,12 +570,13 @@ nextflow run main.nf ??? failure "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -578,9 +604,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Cela affiche de nombreux détails sur l'erreur car le processus est configuré pour afficher des informations de débogage, comme indiqué ci-dessus. @@ -694,9 +720,9 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -704,9 +730,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ça fonctionne ! Vous pouvez voir que très peu de choses ont changé. @@ -815,16 +847,11 @@ Une façon naïve de faire cela serait de combiner la méthode `file()` avec [`c ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` Cela fonctionne, mais c'est maladroit. -!!! tip "Astuce : Quand utiliser `file()` vs `channel.fromPath()`" - - - Utilisez `file()` lorsque vous avez besoin d'un seul objet Path pour une manipulation directe (vérifier si un fichier existe, lire ses attributs, ou le passer à une seule invocation de processus) - - Utilisez `channel.fromPath()` lorsque vous avez besoin d'un canal pouvant contenir plusieurs fichiers, notamment avec des motifs glob, ou lorsque les fichiers vont traverser plusieurs processus - C'est là qu'intervient [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath) : une fabrique de canaux pratique qui regroupe toutes les fonctionnalités dont nous avons besoin pour générer un canal à partir d'une ou plusieurs chaînes de fichiers statiques ainsi que des motifs glob. ### 3.1. Ajouter la fabrique de canaux @@ -879,11 +906,17 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Comme vous pouvez le voir, le chemin du fichier est chargé en tant qu'objet de type `Path` dans le canal. @@ -891,6 +924,11 @@ C'est similaire à ce qu'aurait fait `file()`, sauf que nous avons maintenant un L'utilisation de `channel.fromPath()` est un moyen pratique de créer un nouveau canal peuplé d'une liste de fichiers. +!!! tip "Astuce : Quand utiliser `file()` vs `channel.fromPath()`" + + - Utilisez `file()` lorsque vous avez besoin d'un seul objet Path pour une manipulation directe (vérifier si un fichier existe, lire ses attributs, ou le passer à une seule invocation de processus) + - Utilisez `channel.fromPath()` lorsque vous avez besoin d'un canal pouvant contenir plusieurs fichiers, notamment avec des motifs glob, ou lorsque les fichiers vont traverser plusieurs processus + ### 3.2. Afficher les attributs des fichiers dans le canal Dans notre première utilisation de la fabrique de canaux, nous avons simplifié le code et affiché uniquement le nom du fichier. @@ -936,12 +974,12 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -949,6 +987,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Et voilà, les mêmes résultats qu'avant, mais maintenant nous avons le fichier dans un canal, ce qui nous permet d'en ajouter d'autres. @@ -1005,12 +1049,12 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1026,6 +1070,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Comme vous pouvez le voir, nous avons maintenant deux objets Path dans notre canal, ce qui montre que Nextflow a effectué l'expansion des noms de fichiers correctement, et a chargé et traité les deux fichiers comme prévu. @@ -1110,19 +1160,25 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Chaque élément du canal est maintenant un tuple contenant le `simpleName` et l'objet fichier d'origine. @@ -1166,19 +1222,25 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Maintenant, le tuple pour chaque élément de notre canal contient la liste des métadonnées (_par ex._ `[patientA, rep1, normal, R1, 001]`) et l'objet fichier d'origine. @@ -1267,19 +1329,25 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Maintenant, les métadonnées sont clairement étiquetées (_par ex._ `[id:patientA, replicate:1, type:normal, readNum:2]`), ce qui rend beaucoup plus facile de savoir ce qui est quoi. @@ -1339,10 +1407,10 @@ Mettons à jour le workflow `main.nf` en conséquence : ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Commentons le mapping pour l'instant, nous y reviendrons ! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1357,13 +1425,13 @@ Mettons à jour le workflow `main.nf` en conséquence : === "Avant" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // Charge les fichiers avec channel.fromFilePairs + // Charge les fichiers avec channel.fromPath ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1385,12 +1453,11 @@ nextflow run main.nf ??? failure "Sortie de la commande" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1400,9 +1467,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Oups, cette fois l'exécution a échoué ! @@ -1453,11 +1520,17 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Super, cette fois le workflow réussit ! @@ -1478,10 +1551,10 @@ Décommentez l'opération map dans le workflow et effectuez les modifications su // Charge les fichiers avec channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1498,10 +1571,10 @@ Décommentez l'opération map dans le workflow et effectuez les modifications su ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Commentons le mapping pour l'instant, nous y reviendrons ! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1528,11 +1601,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Et voilà : nous avons la map de métadonnées (`[id:patientA, replicate:1, type:normal]`) en première position du tuple de sortie, suivie du tuple de fichiers appariés, comme prévu. @@ -1644,10 +1723,10 @@ Dans le workflow principal, remplacez l'opérateur `.view()` par `#!groovy .set // Charge les fichiers avec channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1666,10 +1745,10 @@ Dans le workflow principal, remplacez l'opérateur `.view()` par `#!groovy .set // Charge les fichiers avec channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1688,11 +1767,17 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Cela confirme que nous pouvons maintenant faire référence au canal par son nom. @@ -1716,10 +1801,10 @@ Dans le workflow principal, effectuez les modifications de code suivantes : // Charge les fichiers avec channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1749,10 +1834,10 @@ Dans le workflow principal, effectuez les modifications de code suivantes : // Charge les fichiers avec channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1786,12 +1871,19 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` Les sorties sont publiées dans un répertoire `results`, alors jetez un œil là-dedans. @@ -1851,12 +1943,26 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` Le répertoire de résultats devrait maintenant contenir des résultats pour toutes les données disponibles. @@ -1887,7 +1993,7 @@ Effectuez la modification suivante dans le bloc `output {}` : === "Après" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1895,7 +2001,7 @@ Effectuez la modification suivante dans le bloc `output {}` : === "Avant" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1913,12 +2019,26 @@ nextflow run main.nf ??? success "Sortie de la commande" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` Vérifiez maintenant le répertoire de résultats : @@ -2071,7 +2191,7 @@ L'application de ces techniques dans votre propre travail vous permettra de cons 5. **Simplification avec channel.fromFilePairs :** Nous avons utilisé `channel.fromFilePairs()` pour apparier automatiquement les fichiers liés et extraire les métadonnées à partir des identifiants des fichiers appariés. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Utilisation des opérations sur les fichiers dans les processus :** Nous avons intégré des opérations sur les fichiers dans des processus Nextflow avec une gestion appropriée des entrées, en utilisant le bloc `output {}` pour organiser les sorties en fonction des métadonnées. @@ -2081,10 +2201,10 @@ L'application de ces techniques dans votre propre travail vous permettra de cons ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], diff --git a/docs/hi/docs/hello_nextflow/01_hello_world.md b/docs/hi/docs/hello_nextflow/01_hello_world.md index a30869f65a..0ba7ad3f27 100644 --- a/docs/hi/docs/hello_nextflow/01_hello_world.md +++ b/docs/hi/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "कमांड आउटपुट" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -Terminal output परिचित दिखना चाहिए। बाहरी रूप से, कुछ भी नहीं बदला है। +Terminal output अब एक `Outputs:` summary के साथ समाप्त होता है जो published outputs और उस directory को list करता है जहाँ वे लिखे गए थे। -हालाँकि, अपना file explorer check करो: इस बार, Nextflow ने `results/` नामक एक new directory बनाई है। +अपना file explorer check करो: इस बार, Nextflow ने `results/` नामक एक new directory भी बनाई है। ??? abstract "डायरेक्टरी सामग्री" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` इस बार result specified subdirectory के तहत लिखा जाता है। @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` इस बार, यदि तुम results देखो, तो file एक proper copy है बजाय सिर्फ एक symlink के। @@ -767,19 +785,19 @@ Process block में, निम्नलिखित code change करो: === "बाद में" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "पहले" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` `$` symbol और curly braces (`{ }`) Nextflow को बताते हैं कि यह एक variable name है जिसे actual input value से replace किया जाना चाहिए (=interpolated)। @@ -811,15 +829,15 @@ Workflow block में, निम्नलिखित code change करो: === "बाद में" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // एक अभिवादन emit करें - sayHello(params.input) + // एक अभिवादन emit करें + sayHello(params.input) ``` === "पहले" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // एक अभिवादन emit करें - sayHello() + // एक अभिवादन emit करें + sayHello() ``` यह Nextflow को बताता है कि `--input` parameter के माध्यम से provide की गई value पर `sayHello` process चलाएं। @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` यदि तुमने ये सभी edits correctly किए, तो तुम्हें एक और successful execution मिलनी चाहिए। @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "यदि यह काम नहीं किया" @@ -936,7 +966,8 @@ nextflow run hello-world.nf यह course की शुरुआत में mention किया गया था, लेकिन शायद तुमने इसे miss कर दिया। [Nextflow versions](../info/nxf_versions.md) help material check करो। - संक्षेप में, यदि तुम Nextflow `25.10` use कर रहे हो तो तुम्हें v2 language parser enable करना होगा: + v2 parser Nextflow 26.04 से default है, इसलिए तुम यह केवल पुराने versions पर देखोगे। + 26.04 से पहले के version पर तुम्हें v2 language parser enable करना होगा: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` एक बार फिर, तुम्हें अपनी results directory में corresponding updated output मिलनी चाहिए। @@ -1020,17 +1057,23 @@ Specifically, इस mode में, कोई भी processes जो पहल इसे use करने के लिए, simply अपने command में `-resume` add करो और इसे run करो: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "कमांड आउटपुट" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Console output परिचित दिखना चाहिए, लेकिन एक चीज़ है जो पहले की तुलना में थोड़ी different है। diff --git a/docs/hi/docs/hello_nextflow/02_hello_channels.md b/docs/hi/docs/hello_nextflow/02_hello_channels.md index fac84bbc62..61d1ebc591 100644 --- a/docs/hi/docs/hello_nextflow/02_hello_channels.md +++ b/docs/hi/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` पहले की तरह, तुम `results/hello_channels` directory में `output.txt` नामक output file पाओगे (जैसा कि workflow script के `output` block में specify किया गया है, ऊपर दिखाया गया है)। @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` यदि तुमने दोनों edits correctly किए, तो तुम्हें एक successful execution मिलनी चाहिए। @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "कमांड आउटपुट" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` जैसा कि तुम देख सकते हो, यह channel contents को console पर output करता है। @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "कमांड आउटपुट" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` यह certainly ठीक से run हुआ लगता है। @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` इस बार हम output में listed तीनों process runs और उनके associated work subdirectories देखते हैं। @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Summary view पर वापस आते हुए, output फिर से एक line पर summarize हो गया है। @@ -605,8 +652,6 @@ Summary view पर वापस आते हुए, output फिर से └── output.txt ``` -हाँ! और प्रत्येक में expected contents हैं। - ??? abstract "फ़ाइल सामग्री" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "कमांड आउटपुट" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -941,16 +986,25 @@ nextflow run hello-channels.nf ??? success "कमांड आउटपुट" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` इस बार यह काम करता है AND हमें `flatten()` operator run करने से पहले और बाद में channel की contents कैसी दिखती हैं इसकी additional insight देता है। @@ -1024,11 +1078,13 @@ Parameter declaration में निम्नलिखित edit करो: === "पहले" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Pipeline parameters */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` यह मानता है कि file workflow code के साथ co-located है। @@ -1095,9 +1151,9 @@ nextflow run hello-channels.nf ??? failure "कमांड आउटपुट" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1198,12 +1254,12 @@ nextflow run hello-channels.nf ??? failure "कमांड आउटपुट" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1318,12 +1374,12 @@ nextflow run hello-channels.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1331,6 +1387,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` इस बार यह बिना error के run होना चाहिए। diff --git a/docs/hi/docs/hello_nextflow/03_hello_workflow.md b/docs/hi/docs/hello_nextflow/03_hello_workflow.md index b2d56da190..e57936cf12 100644 --- a/docs/hi/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/hi/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` पहले की तरह, तुम्हें output फ़ाइलें `output` ब्लॉक में निर्दिष्ट स्थान पर मिलेंगी। @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` Console output में अब एक अतिरिक्त लाइन है जो हमने अभी जोड़े गए नए process से मेल खाती है। @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "कमांड आउटपुट" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + टर्मिनल आउटपुट अब एक `Outputs:` सारांश ब्लॉक के साथ भी समाप्त होता है। हमने process status lines पर ध्यान केंद्रित करने के लिए इसे यहाँ छोड़ दिया है। + यह सफलतापूर्वक चलता है, तीसरे स्टेप सहित। हालाँकि, आखिरी लाइन पर `collectGreetings()` के लिए calls की संख्या देखो। @@ -627,8 +651,8 @@ nextflow run hello-workflow.nf -resume ??? abstract "फ़ाइल सामग्री" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` ओह नहीं। Collection स्टेप प्रत्येक greeting पर व्यक्तिगत रूप से चलाया गया, जो हम नहीं चाहते थे। @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ nextflow run hello-workflow.nf -resume ??? abstract "फ़ाइल सामग्री" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` यह सफलतापूर्वक चलता है और वांछित output उत्पन्न करता है: ??? abstract "फ़ाइल सामग्री" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` अगर तुम `results/hello_workflow/` डायरेक्टरी में देखते हो, तो तुम्हें नई report फ़ाइल मिलेगी, `trio-report.txt`। @@ -1273,5 +1326,5 @@ workflow { - [x] Inputs का क्रम input ब्लॉक में परिभाषित क्रम से मेल खाना चाहिए - [ ] एक समय में केवल दो inputs प्रदान किए जा सकते हैं -और जानें: [3. एक process को एक से अधिक input पास करें](#3-pass-more-than-one-input-to-a-process) +और जानें: [3. एक process को अतिरिक्त पैरामीटर पास करें](#3-pass-additional-parameters-to-a-process) diff --git a/docs/hi/docs/hello_nextflow/04_hello_modules.md b/docs/hi/docs/hello_nextflow/04_hello_modules.md index 2df3140b34..248394445e 100644 --- a/docs/hi/docs/hello_nextflow/04_hello_modules.md +++ b/docs/hi/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` पहले की तरह, तुम्हें आउटपुट फ़ाइलें `output` ब्लॉक में निर्दिष्ट डायरेक्टरी में मिलेंगी (यहाँ, `results/hello_modules/`)। @@ -172,7 +187,7 @@ include { } from '' * Pipeline पैरामीटर */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ include { } from '' * Pipeline पैरामीटर */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ process convertToUpper { * Pipeline पैरामीटर */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ process convertToUpper { * Pipeline पैरामीटर */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ process collectGreetings { * Pipeline पैरामीटर */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ process collectGreetings { * Pipeline पैरामीटर */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/hi/docs/hello_nextflow/05_hello_containers.md b/docs/hi/docs/hello_nextflow/05_hello_containers.md index b66cfb3b35..de884ff4a2 100644 --- a/docs/hi/docs/hello_nextflow/05_hello_containers.md +++ b/docs/hi/docs/hello_nextflow/05_hello_containers.md @@ -3,7 +3,7 @@ :material-information-outline:{ .ai-translation-notice-icon } AI-सहायता प्राप्त अनुवाद - [अधिक जानें और सुधार सुझाएं](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md)
- +
/// caption @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` पहले की तरह, तुम्हें output files `output` block में specified directory (`results/hello_containers/`) में मिलेंगी। @@ -259,22 +273,22 @@ ls / Example के लिए, tool documentation कहता है कि हम `-c` के साथ character ('cowacter') change कर सकते हैं। ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "कमांड आउटपुट" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "कमांड आउटपुट (स्पष्टता के लिए संपादित)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` इस बार यह indeed काम करता है! diff --git a/docs/hi/docs/hello_nextflow/06_hello_config.md b/docs/hi/docs/hello_nextflow/06_hello_config.md index 74e84ed249..9d35ba631d 100644 --- a/docs/hi/docs/hello_nextflow/06_hello_config.md +++ b/docs/hi/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` पहले की तरह, तुम output files को `output` block में specified directory (`results/hello_config/`) में पाओगे। @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` यह अभी भी पहले जैसा same output produce करता है। @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` यह `tux-run/` के under directories का एक new set create करेगा जिसमें `tux-run/work/` और `tux-run/results/` शामिल हैं। @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` Final output file में greetings कहता हुआ stegosaurus character होना चाहिए। @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` यह outputs को `results/` के बजाय `custom-outdir-cli/` में publish करता है: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` यह outputs को `custom-outdir-config-2/rep2/` में publish करता है, specified base path _और_ batch name subdirectory _और_ process द्वारा grouped results के साथ: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` यह outputs को `config-output-mode/` में publish करता है, और वे सभी अभी भी proper copies हैं, symlinks नहीं। @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "कमांड आउटपुट" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` यह बिना issue के काम करना चाहिए और पहले जैसे same outputs `custom-outdir-config/conda` के under produce करना चाहिए। @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` जैसा तुम देख सकते हो, यह हमें runtime पर configurations के बीच बहुत conveniently toggle करने allow करता है। @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` यह Docker use करेगा जहाँ possible हो और `custom-outdir-config/test` के under outputs produce करेगा, और इस बार character comedic duo `dragonandcow` है। diff --git a/docs/hi/docs/hello_nf-core/00_orientation.md b/docs/hi/docs/hello_nf-core/00_orientation.md index ed9a8ba193..f7d1518094 100644 --- a/docs/hi/docs/hello_nf-core/00_orientation.md +++ b/docs/hi/docs/hello_nf-core/00_orientation.md @@ -7,39 +7,34 @@ GitHub Codespaces पर हमारे द्वारा प्रदान किए गए पूर्व-निर्मित वातावरण का उपयोग करने के लिए, नीचे दिए गए "Open in GitHub Codespaces" बटन पर क्लिक करें। अन्य विकल्पों के लिए, [वातावरण विकल्प](../envsetup/index.md) देखें। हम अनुशंसा करते हैं कि प्रशिक्षण वातावरण को एक नए ब्राउज़र टैब या विंडो में खोलें (अपने उपकरण के अनुसार राइट-क्लिक, ctrl-क्लिक या cmd-क्लिक का उपयोग करें) ताकि वातावरण लोड होते समय आप पढ़ सकें। -पाठ्यक्रम में काम करने के लिए आपको इन निर्देशों को समानांतर में खुला रखना होगा। +पाठ्यक्रम में काम करने के लिए तुम्हें इन निर्देशों को समानांतर में खुला रखना होगा। [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) ### वातावरण की मूल बातें -इस प्रशिक्षण वातावरण में प्रशिक्षण पाठ्यक्रम के माध्यम से काम करने के लिए आवश्यक सभी सॉफ़्टवेयर, कोड और डेटा शामिल हैं, इसलिए आपको स्वयं कुछ भी इंस्टॉल करने की आवश्यकता नहीं है। +इस प्रशिक्षण वातावरण में प्रशिक्षण पाठ्यक्रम के माध्यम से काम करने के लिए आवश्यक सभी सॉफ़्टवेयर, कोड और डेटा शामिल हैं, इसलिए तुम्हें स्वयं कुछ भी इंस्टॉल करने की आवश्यकता नहीं है। codespace VSCode इंटरफ़ेस के साथ सेट अप किया गया है, जिसमें एक फ़ाइलसिस्टम एक्सप्लोरर, एक कोड एडिटर और एक टर्मिनल शेल शामिल है। पाठ्यक्रम के दौरान दिए गए सभी निर्देश (जैसे 'फ़ाइल खोलें', 'कोड संपादित करें' या 'यह कमांड चलाएं') VScode इंटरफ़ेस के उन तीन भागों को संदर्भित करते हैं जब तक कि अन्यथा निर्दिष्ट न किया गया हो। -यदि आप इस पाठ्यक्रम को स्वयं कर रहे हैं, तो कृपया अधिक विवरण के लिए [वातावरण की मूल बातें](../envsetup/01_setup.md) से परिचित हों। +यदि तुम इस पाठ्यक्रम को स्वयं कर रहे हो, तो कृपया अधिक विवरण के लिए [वातावरण की मूल बातें](../envsetup/01_setup.md) से परिचित हों। ### संस्करण आवश्यकताएं -यह प्रशिक्षण **Nextflow 25.10.2** या उसके बाद के संस्करण के लिए डिज़ाइन किया गया है **v2 syntax parser DISABLED के साथ**। +यह प्रशिक्षण **v2 syntax parser के साथ** Nextflow 25.10.2 या उसके बाद के संस्करण के लिए काम करता है, जो Nextflow 26.04 से डिफ़ॉल्ट है। +हमारे प्रशिक्षण वातावरण में तुम्हें कुछ भी करने की आवश्यकता नहीं है: यह v2 parser के साथ Nextflow 26.04.4 चलाता है। यदि तुम लोकल या कस्टम वातावरण का उपयोग कर रहे हो, तो [संस्करण नोट्स](../info/nxf_versions.md) देखें। -#### यदि आप हमारे प्रशिक्षण वातावरण का उपयोग कर रहे हैं: +इस प्रशिक्षण के लिए अतिरिक्त रूप से **nf-core tools 4.0.2** की आवश्यकता है। +यदि तुम nf-core टूलिंग के एक अलग संस्करण का उपयोग करते हो, तो तुम्हें अनुसरण करने में कठिनाई हो सकती है। -आगे बढ़ने से पहले आपको निम्नलिखित कमांड चलानी होगी: +तुम `nf-core --version` कमांड का उपयोग करके जांच सकते हो कि तुम्हारे वातावरण में कौन सा संस्करण इंस्टॉल है। -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### यदि आप स्थानीय या कस्टम वातावरण का उपयोग कर रहे हैं: - -कृपया सुनिश्चित करें कि आप सही सेटिंग्स का उपयोग कर रहे हैं जैसा कि [यहां](../info/nxf_versions.md) दस्तावेज़ीकृत है। +!!! warning "v2 parser compatibility" -प्रशिक्षण के लिए अतिरिक्त रूप से **nf-core tools 3.5.2** की आवश्यकता है। -यदि आप nf-core टूलिंग के एक अलग संस्करण का उपयोग करते हैं, तो आपको अनुसरण करने में कठिनाई हो सकती है। - -आप `nf-core --version` कमांड का उपयोग करके जांच सकते हैं कि आपके वातावरण में कौन सा संस्करण इंस्टॉल है। + कई nf-core पाइपलाइन अभी तक v2 syntax parser को सपोर्ट नहीं करती हैं। + यदि तुम इस पाठ्यक्रम में उपयोग की गई पाइपलाइनों के अलावा कोई अन्य nf-core पाइपलाइन चलाते हो और त्रुटियां आती हैं, तो तुम्हें `export NXF_SYNTAX_PARSER=v1` सेट करके v1 parser पर स्विच करना पड़ सकता है। + विवरण के लिए [संस्करण नोट्स](../info/nxf_versions.md) देखें। ## काम के लिए तैयार हो जाएं @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ tree . -L 2 - **`greetings.csv` फ़ाइल** एक CSV है जिसमें कुछ न्यूनतम स्तंभीय डेटा है जिसका उपयोग हम परीक्षण उद्देश्यों के लिए करते हैं। +- **`custom.config` फ़ाइल** एक उदाहरण Nextflow कॉन्फ़िगरेशन फ़ाइल है जिसका उपयोग भाग 1 में process resource overrides और `ext.args` को प्रदर्शित करने के लिए किया जाता है। + +- **`malformed_samplesheet.csv` फ़ाइल** एक जानबूझकर टूटी हुई samplesheet है जिसका उपयोग भाग 1 में इनपुट सत्यापन प्रदर्शित करने के लिए किया जाता है। + +- **`my_params.yml` फ़ाइल** एक उदाहरण params फ़ाइल है जिसका उपयोग भाग 1 में यह प्रदर्शित करने के लिए किया जाता है कि पाइपलाइन को boolean पैरामीटर कैसे पास करें। + - **`original-hello` डायरेक्टरी** में संपूर्ण Hello Nextflow प्रशिक्षण श्रृंखला के माध्यम से काम करके उत्पादित स्रोत कोड की एक प्रति शामिल है (Docker सक्षम के साथ)। - **`solutions` डायरेक्टरी** में पाठ्यक्रम के प्रत्येक चरण से प्राप्त पूर्ण workflow scripts शामिल हैं। @@ -108,13 +112,13 @@ tree . -L 2 ## तैयारी चेकलिस्ट -क्या आपको लगता है कि आप गोता लगाने के लिए तैयार हैं? +क्या तुम्हें लगता है कि तुम गोता लगाने के लिए तैयार हो? - [ ] मैं इस पाठ्यक्रम के लक्ष्य और इसकी पूर्वापेक्षाओं को समझता हूं - [ ] मेरा वातावरण चालू और चल रहा है -- [ ] मैंने सुनिश्चित किया है कि syntax parser **v1** पर सेट है +- [ ] मैं nf-core tools 4.0.2 का उपयोग कर रहा हूं (`nf-core --version` से जांचें) - [ ] मैंने अपनी कार्य डायरेक्टरी को उचित रूप से सेट किया है -यदि आप सभी बॉक्स चेक कर सकते हैं, तो आप जाने के लिए तैयार हैं। +यदि तुम सभी बॉक्स चेक कर सकते हो, तो तुम जाने के लिए तैयार हो। **भाग 1 को जारी रखने के लिए, इस पृष्ठ के निचले दाएं कोने में तीर पर क्लिक करें।** diff --git a/docs/hi/docs/hello_nf-core/01_run_demo.md b/docs/hi/docs/hello_nf-core/01_run_demo.md index 91be5a0bd9..563042a72c 100644 --- a/docs/hi/docs/hello_nf-core/01_run_demo.md +++ b/docs/hi/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ Pipeline दस्तावेज़ीकरण पेज तक पहुँ ![pipeline subway map](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. उदाहरण कमांड लाइन @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow pipeline कोड का एक `pull` करता है, मतलब यह पूरी रिपॉज़िटरी को तुम्हारी लोकल ड्राइव पर डाउनलोड करता है। @@ -106,40 +107,73 @@ nextflow list तुम कुछ और pipelines pull करके देख सकते हो कि जब एक से अधिक हों तो वे कैसे सूचीबद्ध होती हैं। -#### 1.2.3. `$NXF_HOME/assets/` में अपनी pipelines खोजें +#### 1.2.3. Pipeline कहाँ डाउनलोड हुई यह पता करें तुम देखोगे कि फ़ाइलें तुम्हारी वर्तमान कार्य डायरेक्टरी में नहीं हैं। -डिफ़ॉल्ट रूप से, Nextflow उन्हें `$NXF_HOME/assets` में सहेजता है। +डिफ़ॉल्ट रूप से, Nextflow pulled pipelines को `$NXF_HOME/assets` में सहेजता है। + +किसी specific pipeline की location जानने के लिए, Nextflow से सीधे पूछो: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "कमांड आउटपुट" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "नोट" +!!! info "जानकारी" यदि तुम हमारे प्रशिक्षण वातावरण का उपयोग नहीं कर रहे हो तो तुम्हारे सिस्टम पर पूर्ण पथ भिन्न हो सकता है। Nextflow डाउनलोड किए गए स्रोत कोड को जानबूझकर 'बाहर' रखता है इस सिद्धांत पर कि इन pipelines का उपयोग उस कोड की तुलना में अधिक लाइब्रेरी की तरह किया जाना चाहिए जिसके साथ तुम सीधे इंटरैक्ट करोगे। +अंदर से, Nextflow प्रत्येक pulled pipeline को `$NXF_HOME/assets/.repos/` के अंतर्गत एक git रिपॉज़िटरी के रूप में store करता है, और प्रत्येक revision के कोड को `clones//` सब-डायरेक्टरी में checkout करता है। +चूँकि `.repos` एक hidden डायरेक्टरी है, इसलिए `tree -L 2 $NXF_HOME/assets/` खाली दिखेगी। + #### 1.2.4. स्रोत कोड तक आसानी से पहुँचने के लिए एक symlink बनाएं हम कोड को विस्तार से नहीं देखेंगे, लेकिन समग्र संगठन कैसा दिखता है इसका एक त्वरित अवलोकन लेते हैं। -Pipeline स्रोत कोड को ब्राउज़ करना आसान बनाने के लिए, assets डायरेक्टरी के लिए एक symbolic link बनाओ: +Pipeline स्रोत कोड को ब्राउज़ करना आसान बनाने के लिए, pipeline के checked-out copy की ओर इशारा करने वाला एक symbolic link बनाओ: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -यह एक शॉर्टकट बनाता है ताकि तुम `tree -L 2 pipelines` से कोड explore कर सको या फ़ाइलें सीधे खोल सको। +यह एक शॉर्टकट बनाता है ताकि तुम `tree -L 2 pipelines/nf-core/demo` से कोड explore कर सको या फ़ाइलें सीधे खोल सको। #### 1.2.5. कोड संगठन का अवलोकन @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` जैसा कि तुम देख सकते हो, वहाँ बहुत कुछ चल रहा है, जिसके बारे में अधिकांश की चिंता करने की ज़रूरत नहीं है। @@ -211,7 +247,7 @@ tree -L 1 pipelines/nf-core/demo यह [nf-core/test-datasets](https://github.com/nf-core/test-datasets) रिपॉज़िटरी में होस्ट किए गए एक छोटे test dataset का उपयोग करके चलने के लिए pipeline के लिए कॉन्फ़िगरेशन सेटिंग्स का एक न्यूनतम सेट है। यह छोटे पैमाने पर एक pipeline को जल्दी से आज़माने का एक शानदार तरीका है। -!!! note "नोट" +!!! tip "सुझाव" Nextflow का configuration profile सिस्टम तुम्हें विभिन्न कंटेनर इंजन या execution वातावरण के बीच आसानी से स्विच करने की अनुमति देता है। अधिक विवरण के लिए, [Hello Nextflow भाग 6: Configuration](../hello_nextflow/06_hello_config.md) देखें। @@ -220,10 +256,10 @@ tree -L 1 pipelines/nf-core/demo Pipeline के test profile को चलाने से पहले यह जांचना अच्छा अभ्यास है कि यह क्या निर्दिष्ट करता है। `nf-core/demo` के लिए `test` profile कॉन्फ़िगरेशन फ़ाइल `conf/test.config` में रहता है। -तुम इसे pipeline स्रोत के अंदर locally खोज सकते हो जो `nextflow pull` ने डाउनलोड किया: +तुम इसे section 1.2.4 में बनाए गए `pipelines` symlink के ज़रिए locally खोज सकते हो: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` उस फ़ाइल की सामग्री यहाँ दी गई है: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // इनपुट डेटा - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` इसे samplesheet कहा जाता है, और यह nf-core pipelines के लिए इनपुट का सबसे आम रूप है। +यदि तुम डेटा प्रारूप और प्रकारों से परिचित नहीं हो तो चिंता मत करो, यह आगे के लिए महत्वपूर्ण नहीं है। -!!! note "नोट" - - यदि तुम डेटा प्रारूप और प्रकारों से परिचित नहीं हो तो चिंता मत करो, यह आगे के लिए महत्वपूर्ण नहीं है। - -तो यह पुष्टि करता है कि हमारे पास pipeline को आज़माने के लिए आवश्यक सब कुछ है। +अब हमारे पास pipeline को आज़माने के लिए आवश्यक सब कुछ है। ### 2.2. Pipeline चलाएं -आइए कंटेनर सिस्टम के लिए Docker का उपयोग करने और आउटपुट डायरेक्टरी के रूप में `demo-results` का निर्णय लें, और हम test कमांड चलाने के लिए तैयार हैं: +जैसा कि ऊपर बताया गया है, हम उदाहरण testing कमांड को लगभग जैसा है वैसा उपयोग कर सकते हैं; हमें बस यह निर्दिष्ट करना है कि कौन सा software packaging उपयोग करना है और आउटपुट डायरेक्टरी का नाम क्या रखना है। +यहाँ हम कंटेनर सिस्टम के लिए Docker और आउटपुट डायरेक्टरी के लिए `demo-results` का उपयोग करेंगे। + +इसके साथ, हम test कमांड चलाने के लिए तैयार हैं: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results तुम देखोगे कि जब तुम एक बुनियादी Nextflow pipeline चलाते हो तो कंसोल आउटपुट बहुत अधिक है। एक हेडर है जिसमें pipeline के संस्करण, इनपुट और आउटपुट, और कॉन्फ़िगरेशन के कुछ तत्वों का सारांश शामिल है। -!!! note "नोट" +!!! info "जानकारी" तुम्हारा आउटपुट अलग-अलग timestamps, execution नाम और फ़ाइल पथ दिखाएगा, लेकिन समग्र संरचना और process execution समान होनी चाहिए। आउटपुट के शीर्ष के पास इस लाइन पर ध्यान दो: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` यह तुम्हें बताता है कि pipeline का कौन सा revision उपयोग किया गया था। @@ -379,7 +417,7 @@ Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 4 Reproducible runs के लिए, तुम्हें `-r` flag का उपयोग करके एक विशिष्ट release pin करनी चाहिए: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` यह सुनिश्चित करता है कि नए commits या releases की परवाह किए बिना हर बार एक ही pipeline कोड का उपयोग किया जाए। @@ -388,14 +426,15 @@ nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results Execution आउटपुट की ओर बढ़ते हुए, आइए उन लाइनों पर एक नज़र डालें जो हमें बताती हैं कि कौन से processes चलाए गए थे: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -यह हमें बताता है कि तीन processes चलाई गईं, जो nf-core वेबसाइट पर pipeline दस्तावेज़ीकरण पेज में दिखाए गए तीन टूल से संबंधित हैं: FASTQC, SEQTK_TRIM और MULTIQC। +यह हमें बताता है कि चार processes चलाई गईं, जो nf-core वेबसाइट पर pipeline दस्तावेज़ीकरण पेज में दिखाए गए चार टूल से संबंधित हैं: `FASTQC`, `SEQTK_TRIM`, `MULTIQC` और `COWPY`। पूर्ण process नाम जैसा कि यहाँ दिखाया गया है, जैसे `NFCORE_DEMO:DEMO:MULTIQC`, परिचयात्मक Hello Nextflow सामग्री में तुमने जो देखा होगा उससे लंबे हैं। इनमें उनके parent workflows के नाम शामिल हैं और pipeline कोड की modularity को दर्शाते हैं। @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` यह बहुत अधिक लग सकता है। -`nf-core/demo` pipeline के आउटपुट के बारे में अधिक जानने के लिए, इसका [दस्तावेज़ीकरण पेज](https://nf-co.re/demo/1.1.0/docs/output/) देखें। +`nf-core/demo` pipeline के आउटपुट के बारे में अधिक जानने के लिए, इसका [दस्तावेज़ीकरण पेज](https://nf-co.re/demo/1.2.0/docs/output/) देखें। इस स्तर पर, यह देखना महत्वपूर्ण है कि परिणाम module द्वारा व्यवस्थित हैं, और इसके अतिरिक्त `pipeline_info` नामक एक डायरेक्टरी है जिसमें pipeline execution के बारे में विभिन्न timestamped रिपोर्ट हैं। @@ -443,7 +485,7 @@ tree -L 2 demo-results ![execution timeline report](./img/execution_timeline.png) -!!! note "नोट" +!!! info "जानकारी" यहाँ कार्य समानांतर में नहीं चलाए गए क्योंकि हम Github Codespaces में एक minimalist मशीन पर चल रहे हैं। इन्हें समानांतर में चलते हुए देखने के लिए, अपने codespace के CPU allocation और test configuration में resource limits को बढ़ाने का प्रयास करो। @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,26 +596,100 @@ Plain Nextflow pipelines में, `--help` केवल तभी काम जैसा कि [Hello Config](../hello_nextflow/06_hello_config.md) में कवर किया गया है, तुम कमांड लाइन पर `--param_name` के साथ parameter values सेट कर सकते हो या parameters का एक सेट YAML फ़ाइल में एकत्र कर सकते हो और `-params-file` के साथ पास कर सकते हो। दोनों तरीके nf-core pipelines के साथ उसी तरह काम करते हैं। -उदाहरण के लिए, trimming चरण को skip करने के लिए: +उदाहरण के लिए, trimming चरण को skip करने के लिए, हम boolean parameter `skip_trim` को `true` पर सेट करना चाहते हैं। +तुम्हारी वर्किंग डायरेक्टरी में `my_params.yml` नामक एक params फ़ाइल दी गई है जिसमें वह value पहले से सेट है: + +```yaml title="my_params.yml" +skip_trim: true +``` + +इसे `-params-file` के साथ पास करो: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "कमांड आउटपुट" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` `SEQTK_TRIM` process अब आउटपुट में नहीं दिखती। -!!! info "जानकारी" +!!! warning "पैरामीटर इनपुट के बारे में महत्वपूर्ण सीमाएं" - हालांकि तकनीकी रूप से `-c` के साथ पास की गई custom configuration फ़ाइल में pipeline parameters सेट करना संभव है, यह pipeline के अपने `nextflow.config` में पहले से सेट किए गए defaults को override नहीं कर सकता, Nextflow के configuration precedence rules के आधार पर। + **कमांड लाइन पर boolean parameters सेट करना** + + Nextflow version 26.04 से शुरू होकर, कमांड लाइन पर दी गई सभी values strings के रूप में typed होती हैं। + `skip_trim` जैसे boolean parameter के लिए, इसे bare flag (`--skip_trim`) या `--skip_trim true` के रूप में पास करने पर यह **string** `"true"` के रूप में evaluate होता है, जो schema validation में fail हो जाता है: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + किसी boolean parameter को वास्तविक `true`/`false` value पर सेट करने के लिए, ऊपर दिखाए अनुसार `-params-file` का उपयोग करो, या इसे config फ़ाइल में सेट करो। + String, integer और file-path parameters प्रभावित नहीं होते और अभी भी सीधे कमांड लाइन पर सेट किए जा सकते हैं। + यह पाठ्यक्रम boolean parameters के लिए इस pattern का उपयोग करता है। + + **Custom configuration फ़ाइलों का उपयोग करना** + + हालांकि तकनीकी रूप से `-c` के साथ पास की गई custom configuration फ़ाइल में pipeline parameters सेट करना संभव है, यह Nextflow के configuration precedence rules के आधार पर pipeline के अपने `nextflow.config` में पहले से सेट किए गए defaults को override नहीं कर सकता। कमांड लाइन पर `--param_name` या `-params-file` का उपयोग करना अधिक विश्वसनीय है, क्योंकि ये हमेशा प्राथमिकता लेते हैं। **एक सामान्य नियम के रूप में:** यदि यह `--help` आउटपुट में दिखता है, तो इसे config फ़ाइल के बजाय कमांड लाइन या params फ़ाइल के माध्यम से सेट करो। @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` Pipeline फिर भी चलती है, लेकिन चेतावनी तुम्हें तुरंत सचेत करती है कि `--foobar` एक मान्यता प्राप्त parameter नहीं है। -यह `--outDir` जैसी typos को `--outdir` के बजाय पकड़ता है इससे पहले कि तुम compute समय बर्बाद करो यह सोचते हुए कि आउटपुट गलत जगह क्यों गया। +इसका उद्देश्य तुम्हारा ध्यान non-breaking typos की ओर खींचना है, जैसे `--outdir` की जगह `--outDir` का उपयोग करना, जो तुम्हें समय और compute बर्बाद करने से बचा सकता है। ##### 3.1.3.2. अमान्य parameter values @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` Pipeline किसी भी process के चलने से पहले रुक जाती है, जिससे तुम एक failed या गलत execution से बच जाते हो। -Boolean parameters को flags के रूप में (`--skip_trim`) बिना किसी value के पास किया जाना चाहिए, या params फ़ाइल में `true`/`false` पर सेट किया जाना चाहिए। +जैसा कि section 3.1.2 में बताया गया है, boolean parameters को कमांड लाइन पर पास करने की बजाय params फ़ाइल में वास्तविक `true`/`false` value पर सेट किया जाना चाहिए, क्योंकि कमांड लाइन values strings के रूप में typed होती हैं। #### 3.1.4. Input validation @@ -637,7 +756,7 @@ Boolean parameters को flags के रूप में (`--skip_trim`) ब `nf-core/demo` pipeline `sample`, `fastq_1`, और `fastq_2` columns के साथ एक CSV फ़ाइल की अपेक्षा करती है। यह एक schema फ़ाइल (`assets/schema_input.json`) में परिभाषित है जो अपेक्षित संरचना, column प्रकार और constraints निर्दिष्ट करती है। -??? abstract "assets/schema_input.json" +??? abstract "इनपुट के लिए Schema फ़ाइल" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Boolean parameters को flags के रूप में (`--skip_trim`) ब Schema निर्दिष्ट करता है कि `sample` और `fastq_1` आवश्यक हैं, जबकि `fastq_2` वैकल्पिक है (paired-end और single-end डेटा दोनों का समर्थन करता है)। File paths को existence और extension pattern के लिए validate किया जाता है। -##### 3.1.4.1. एक अमान्य samplesheet बनाएं - -एक missing column और एक non-existent file path के साथ एक samplesheet बनाओ: +इसे demonstrate करने के लिए, तुम्हारी वर्किंग डायरेक्टरी में `malformed_samplesheet.csv` नामक एक malformed samplesheet दी गई है: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` इस samplesheet में आवश्यक `fastq_1` column गायब है और `fastq_2` में एक non-existent file path है। -दोनों समस्याएं अगले चरण में validation errors उत्पन्न करेंगी। - -##### 3.1.4.2. अमान्य samplesheet के साथ demo pipeline चलाएं -`malformed_samplesheet.csv` को इनपुट के रूप में उपयोग करके demo pipeline चलाओ। +`malformed_samplesheet.csv` को इनपुट के रूप में उपयोग करके demo pipeline चलाओ: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -725,14 +840,27 @@ nf-core pipelines में `nextflow.config` और `conf/` डायरेक कुछ भी override करने से पहले, यह जानना मददगार है कि defaults कहाँ रहते हैं। तुमने section 2.1 में पहले ही देखा कि pipeline स्रोत कोड `$NXF_HOME/assets` में रहता है। -उपलब्ध config फ़ाइलें देखने के लिए सूचीबद्ध करो: +Section 1.2.4 के `pipelines` symlink का उपयोग करके, उपलब्ध config फ़ाइलें देखने के लिए सूचीबद्ध करो: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ base.config igenomes.config igenomes_ignored.config modules.config test.conf इसके बजाय, अपनी खुद की config फ़ाइल बनाओ और इसे `-c` के साथ पास करो। तुम्हारे द्वारा निर्दिष्ट values उन अन्य फ़ाइलों में सेट किए गए डिफ़ॉल्ट values को override करेंगी। -आइए इसे व्यवहार में करने के लिए कुछ अभ्यास करें। +आइए इसे व्यवहार में करके देखें। -#### 3.2.1. एक process के लिए resource allocation बदलें +#### 3.2.1. Process resources और tool arguments customize करें -Demo pipeline `base.config` में परिभाषित labels का उपयोग करके resources assign करती है। -उदाहरण के लिए, `FASTQC` `process_medium` label का उपयोग करता है, जो 6 CPUs और 36 GB memory allocate करता है। +nf-core modules दो सामान्य प्रकार के configuration override का समर्थन करते हैं: **resource allocation** (CPUs, memory, time) और `ext.args` के माध्यम से **tool arguments**। -Test profile `resourceLimits` के माध्यम से resources को cap करता है, लेकिन तुम specific processes के लिए resources को भी override कर सकते हो। +कई command-line tools में ऐसे arguments होते हैं जो इतने सामान्य रूप से उपयोग नहीं किए जाते कि उन्हें pipeline parameters के रूप में expose किया जाए। +`ext.args` convention तुम्हें इन arguments को config फ़ाइल के माध्यम से underlying tool को पास करने देता है। -`custom.config` नामक एक फ़ाइल बनाओ: +तुम्हारी वर्किंग डायरेक्टरी में दी गई `custom.config` फ़ाइल दोनों overrides को demonstrate करती है: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -अपने custom config के साथ pipeline चलाओ: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "कमांड आउटपुट" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -`-c` flag तुम्हारे config को pipeline के built-in configuration के ऊपर जोड़ता है। - -#### 3.2.2. `ext.args` के साथ tool argument values सेट करें - -कई command-line tools में ऐसे arguments होते हैं जो आवश्यक नहीं होते और इसलिए pipeline parameters के रूप में सेट नहीं किए जाते जब तक कि वे बहुत सामान्य रूप से उपयोग न किए जाएं। -उन tool arguments के लिए, nf-core modules एक Nextflow convention का उपयोग करते हैं जिसे `ext.args` कहा जाता है जो एक configuration फ़ाइल के माध्यम से underlying tool को arguments पास करता है। - -उदाहरण के लिए, आइए `ext.args` का उपयोग करके `SEQTK_TRIM` module में एक trimming argument जोड़ें। - -##### 3.2.2.1. Custom configuration को update करें - -अपना `custom.config` update करो: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -यह `seqtk trimfq` को quality trimming के अलावा प्रत्येक read की शुरुआत से 5 bases trim करने के लिए कहता है। +पहला block `FASTQC` resource allocation को override करता है। +डिफ़ॉल्ट रूप से, `FASTQC` `base.config` से `process_medium` label का उपयोग करता है, जो 6 CPUs और 36 GB memory allocate करता है; यहाँ हम इसे 2 CPUs और 4 GB तक सीमित करते हैं। -##### 3.2.2.2. Pipeline चलाएं +दूसरा block `ext.args` के माध्यम से `SEQTK_TRIM` को एक extra argument पास करता है। +`-b 5` flag `seqtk trimfq` को quality trimming के अलावा प्रत्येक read की शुरुआत से 5 bases trim करने के लिए कहता है। -इस config के साथ pipeline को फिर से चलाओ प्रभाव देखने के लिए: +इस config के साथ pipeline चलाओ: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "कमांड आउटपुट" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -यह verify करने के लिए कि argument apply किया गया था, run output से `SEQTK_TRIM` work directory hash खोजो (जैसे `work/ab/cd1234...`) और उसके अंदर `.command.sh` फ़ाइल जांचो: +`-c` flag तुम्हारे config को pipeline के built-in configuration के ऊपर जोड़ता है। + +यह verify करने के लिए कि `ext.args` override प्रभावी हुआ, run output से `SEQTK_TRIM` work directory hash खोजो (जैसे `work/17/428668...`) और उसके अंदर `.command.sh` फ़ाइल जांचो: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "कमांड आउटपुट" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` -तुम्हें `seqtk trimfq` कमांड में `-b 5` दिखना चाहिए, जो पुष्टि करता है कि तुम्हारा `ext.args` override प्रभावी हुआ। +तुम्हें `seqtk trimfq` कमांड में `-b 5` दिखना चाहिए। -##### 3.2.2.3. डिफ़ॉल्ट values को override करना - -कुछ modules में `ext.args` पहले से डिफ़ॉल्ट रूप से सेट होता है। -उदाहरण के लिए, `FASTQC` module डिफ़ॉल्ट रूप से `ext.args = '--quiet'` के साथ configure किया गया है (`conf/modules.config` में परिभाषित)। +`ext.args` के बारे में एक महत्वपूर्ण बात: यदि किसी module में पहले से डिफ़ॉल्ट value सेट है, तो तुम्हारी value उसमें जुड़ने की बजाय उसे **पूरी तरह replace** कर देगी। +उदाहरण के लिए, `FASTQC` में `conf/modules.config` में डिफ़ॉल्ट रूप से `ext.args = '--quiet'` सेट है: ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -यदि तुम एक custom configuration फ़ाइल के माध्यम से `ext.args` के लिए एक value प्रदान करते हो, तो वह value उस process के लिए सेट किए गए डिफ़ॉल्ट को पूरी तरह से replace कर देगी। - -इसलिए उदाहरण के लिए, यदि डिफ़ॉल्ट `'--quiet'` था और तुम `ext.args = '--kmers 8'` सेट करते हो, तो `--quiet` flag अब apply नहीं होगा। +यदि तुम `FASTQC` के लिए `ext.args = '--kmers 8'` सेट करते हो, तो `--quiet` flag अब apply नहीं होगा। दोनों को रखने के लिए, `ext.args = '--quiet --kmers 8'` सेट करो। -इसका मतलब है कि तुम उन tools के डिफ़ॉल्ट configuration की जांच करने के लिए जिम्मेदार हो जिन्हें तुम `ext.args` के साथ argument values प्रदान करना चाहते हो। +`ext.args` को override करने से पहले तुम्हें हमेशा किसी module की डिफ़ॉल्ट configuration जांचनी चाहिए। ### सारांश @@ -878,4 +976,6 @@ cat work/ab/cd1234/.command.sh ### आगे क्या है? -एक ब्रेक लो! जब तुम तैयार हो, तो भाग 2 पर जाओ, जहाँ तुम scratch से अपनी खुद की nf-core compatible pipeline बनाओगे। +यदि तुम केवल nf-core pipelines चलाना चाहते हो, तो तुम्हारा काम हो गया! + +यदि तुम nf-core standards के अनुसार अपनी खुद की pipelines develop करना सीखना चाहते हो, तो एक ब्रेक लो, और जब तैयार हो तो भाग 2 पर जाओ। वहाँ तुम nf-core template-based tools का उपयोग करके अपनी खुद की nf-core compatible pipeline बनाना सीखोगे। diff --git a/docs/hi/docs/hello_nf-core/02_rewrite_hello.md b/docs/hi/docs/hello_nf-core/02_rewrite_hello.md index 1d60bda66d..c7866e8c18 100644 --- a/docs/hi/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/hi/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Hello nf-core प्रशिक्षण पाठ्यक्रम के इ - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "नोट" - - सुनिश्चित करो कि तुम अपने terminal में `hello-nf-core` डायरेक्टरी में हो। - --- ## 1. Pipeline code structure की जांच करें @@ -30,6 +26,7 @@ nf-core project इस बारे में कड़े दिशानिर Pipeline निर्माण project शुरू करने से पहले, हमें उस structure और organization को समझना होगा। तो आइए देखें कि `nf-core/demo` repository में pipeline code कैसे organize किया गया है, उस `pipelines` symlink का उपयोग करके जो हमने भाग 1 में बनाया था। +सुनिश्चित करो कि तुम अपने terminal में `hello-nf-core` डायरेक्टरी में हो। याद दिलाने के लिए, तुम `tree` का उपयोग कर सकते हो या file explorer का उपयोग करके `nf-core/demo` डायरेक्टरी खोज सकते हो। @@ -82,7 +79,7 @@ tree -L 1 pipelines/nf-core/demo `main.nf` में unnamed workflow को _entrypoint_ script कहा जाता है। यह दो प्रकार के nested workflows के लिए एक wrapper के रूप में काम करती है: `DEMO` workflow जिसमें actual analysis logic है, `workflows/demo.nf` में स्थित है, और `subworkflows/` के तहत स्थित housekeeping workflows का एक set। `demo.nf` workflow `modules/` के तहत स्थित **modules** को call करती है; इनमें वे **processes** हैं जो actual analysis steps perform करेंगे। -!!! note "नोट" +!!! info "जानकारी" Subworkflows housekeeping functions तक सीमित नहीं हैं, और वे process modules का उपयोग कर सकते हैं। @@ -107,7 +104,7 @@ Entrypoint script का उपयोग करने से actual analysis scr `demo.nf` workflow `modules/` के तहत स्थित **modules** को call करती है, जिन्हें हम आगे देखेंगे। -!!! note "नोट" +!!! info "जानकारी" कुछ nf-core analysis workflows lower-level subworkflows को call करके nesting के अतिरिक्त levels दिखाती हैं। यह मुख्य रूप से दो या अधिक modules को wrap करने के लिए उपयोग किया जाता है जो आमतौर पर एक साथ उपयोग किए जाते हैं, उन्हें easily reusable pipeline segments में बदलने के लिए। @@ -266,13 +263,20 @@ nf-core pipelines create | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -Console output में कोई स्पष्ट पुष्टि नहीं है कि pipeline निर्माण सफल रहा, लेकिन तुम्हें `core-hello` नाम की एक नई डायरेक्टरी दिखाई देनी चाहिए। +एक बार TUI समाप्त हो जाने के बाद, tool रिपोर्ट करता है कि उसने pipeline बनाई और उसका container configuration generate किया: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +अब तुम्हें `core-hello` नाम की एक नई डायरेक्टरी दिखाई देनी चाहिए। नई डायरेक्टरी की सामग्री देखो कि template का उपयोग करके तुमने अपने आप को कितना काम बचाया। @@ -283,8 +287,7 @@ tree core-hello ??? abstract "डायरेक्टरी सामग्री" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` यह बहुत सारी फ़ाइलें हैं! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +`WARN: Unrecognized config option 'validation.*'` लाइनें नए बनाए गए template में pinned nf-schema plugin के version से आती हैं। +ये harmless हैं और run को प्रभावित नहीं करती हैं। + यह तुम्हें दिखाता है कि सभी बुनियादी wiring जगह पर है। तो outputs कहाँ हैं? क्या कोई हैं? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -435,7 +446,7 @@ tree core-hello-results यह हमारी analysis workflow के लिए placeholder के रूप में काम करती है, जिसमें कुछ nf-core कार्यक्षमता पहले से ही मौजूद है। -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -454,14 +465,16 @@ workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Software versions को collate और save करें // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -478,19 +491,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -503,15 +513,15 @@ workflow HELLO { [Hello Nextflow](../hello_nextflow/index.md) में विकसित की गई बुनियादी Nextflow workflow की तुलना में, तुम कुछ चीजें देखोगे जो यहाँ नई हैं (ऊपर highlighted पंक्तियाँ): - Workflow block का एक नाम है -- Workflow inputs को `take:` keyword का उपयोग करके घोषित किया जाता है और channel निर्माण को parent workflow में ऊपर ले जाया जाता है +- Workflow inputs को `take:` keyword का उपयोग करके घोषित किया जाता है (यहाँ एक samplesheet channel और एक output directory), और channel निर्माण को parent workflow में ऊपर ले जाया जाता है - Workflow सामग्री को `main:` block के अंदर रखा गया है - Outputs को `emit:` keyword का उपयोग करके घोषित किया जाता है ये Nextflow की वैकल्पिक विशेषताएं हैं जो workflow को **composable** बनाती हैं, जिसका अर्थ है कि इसे किसी अन्य workflow के भीतर से बुलाया जा सकता है। -??? note "`Channel.topic` block" +??? note "`channel.topic` block" - तुमने शायद line 17 से शुरू होने वाला `def topic_versions = Channel.topic("versions")` block देखा होगा। + तुमने शायद line 28 से शुरू होने वाला `def topic_versions = channel.topic("versions")` block देखा होगा। यह boilerplate housekeeping कोड है जो सभी modules से software version की जानकारी स्वचालित रूप से collect करता है। nf-core 2026 में सभी pipelines में इस mechanism को लागू कर रहा है, इसलिए तुम इसे आगे आने वाले सभी नए pipelines में देखोगे। इस course का भाग 4 विस्तार से बताता है कि यह कैसे काम करता है। @@ -575,15 +585,15 @@ nextflow run original-hello/hello.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` यदि यह तुम्हारे लिए काम करता है, तो तुम hacking शुरू करने के लिए तैयार हो। @@ -704,7 +714,7 @@ workflow { params.character = 'turkey' ``` -!!! note "नोट" +!!! info "जानकारी" यदि तुम्हारे पास Nextflow language server extension इंस्टॉल है, तो syntax checker तुम्हारे कोड को red squiggles के साथ light up करेगा। ऐसा इसलिए है क्योंकि यदि तुम `take:` statement डालते हो, तो तुम्हारे पास `main:` भी होना चाहिए। @@ -851,7 +861,7 @@ workflow { - Imported workflow को बुलाने के लिए syntax मूल रूप से modules को बुलाने के लिए syntax के समान है। - वह सब कुछ जो inputs को workflow में खींचने से संबंधित है (इनपुट पैरामीटर और channel निर्माण) अब इस parent workflow में घोषित किया गया है। -!!! note "नोट" +!!! info "जानकारी" Entrypoint workflow फ़ाइल का नाम `main.nf` रखना एक convention है, आवश्यकता नहीं। @@ -878,19 +888,19 @@ nextflow run ./original-hello ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -इसका मतलब है कि हमने सफलतापूर्वक अपने HELLO workflow को composable बनाने के लिए upgrade किया है। +इसका मतलब है कि हमने सफलतापूर्वक अपने `HELLO` workflow को composable बनाने के लिए upgrade किया है। ### सारांश @@ -932,14 +942,16 @@ workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Software versions को collate और save करें // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -956,19 +968,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -978,8 +987,8 @@ workflow HELLO { */ ``` -Highlighted पंक्तियाँ composable workflow की संरचना को परिभाषित करती हैं: `workflow HELLO {`, `take:`, `main:`, और `emit:`। -Lines 17–34 के बीच का बड़ा block अधिक महत्वपूर्ण है: यह topic channels का उपयोग करके software version capture को handle करता है, एक mechanism जिसे nf-core 2026 में सभी pipelines में लागू कर रहा है। +यह composable workflow की संरचना है: एक named `workflow HELLO {` block जिसमें `take:`, `main:`, और `emit:` हैं। +`// Collate and save software versions` के नीचे का block अधिक महत्वपूर्ण है: यह topic channels का उपयोग करके software version capture को handle करता है, एक mechanism जिसे nf-core 2026 में सभी pipelines में लागू कर रहा है। हम इसे भाग 4 में समझाएंगे; अभी के लिए, इसे boilerplate मानो जिसे तुम बिना छुए छोड़ सकते हो। हमें section 2 में विकसित मूल workflow के composable संस्करण से प्रासंगिक कोड जोड़ने की आवश्यकता है। @@ -991,7 +1000,7 @@ Lines 17–34 के बीच का बड़ा block अधिक महत 3. `main` block में workflow logic जोड़ो 4. `emit` block को अपडेट करो -!!! note "नोट" +!!! info "जानकारी" हम इस पहले pass के लिए version capture block को ignore करने जा रहे हैं। भाग 4 बताता है कि यह कैसे काम करता है। @@ -1079,9 +1088,10 @@ include { cowpy } from './modules/cowpy.nf' nf-core project में samplesheet की अवधारणा के आसपास बहुत सारी पूर्व-निर्मित कार्यक्षमता है, जो आमतौर पर columnar डेटा वाली एक CSV फ़ाइल है। चूंकि यह मूल रूप से वही है जो हमारी `greetings.csv` फ़ाइल है, हम वर्तमान `take` घोषणा को जैसा है वैसा रखेंगे, और अगले चरण में बस इनपुट channel के नाम को अपडेट करेंगे। -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // channel: samplesheet read in from --input + outdir ``` इनपुट handling इस workflow के upstream में की जाएगी (इस code फ़ाइल में नहीं)। @@ -1111,20 +1121,21 @@ nf-core project में samplesheet की अवधारणा के आस हमें `main:` के बाद आने वाले कोड को workflow के नए संस्करण में copy करने की आवश्यकता है। इसमें पहले से ही कुछ कोड है जो workflow द्वारा चलाए जाने वाले tools के versions को capture करने से संबंधित है। हम अभी के लिए इसे अकेला छोड़ने जा रहे हैं (हम बाद में tool versions से निपटेंगे)। -हम शीर्ष पर `ch_versions = channel.empty()` initialization रखेंगे, फिर अपना workflow logic insert करेंगे, अंत में version collation कोड रखेंगे। +हम शीर्ष पर `def ch_versions = channel.empty()` initialization रखेंगे, फिर अपना workflow logic insert करेंगे, अंत में version collation कोड रखेंगे। यह ordering समझ में आता है क्योंकि एक वास्तविक pipeline में, processes version information emit करेंगे जो workflow चलने के दौरान `ch_versions` channel में जोड़ी जाएगी। === "बाद में" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // एक अभिवादन emit करें sayHello(greeting_ch) @@ -1141,7 +1152,7 @@ nf-core project में samplesheet की अवधारणा के आस // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1158,37 +1169,36 @@ nf-core project में samplesheet की अवधारणा के आस "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` === "पहले" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1205,36 +1215,31 @@ nf-core project में samplesheet की अवधारणा के आस "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` -तुम ध्यान देखोगे कि हमने कोड को अधिक readable बनाने के लिए `main:` से पहले एक blank लाइन भी जोड़ी। - यह बहुत अच्छा लगता है, लेकिन हमें अभी भी `sayHello()` process को pass किए जाने वाले channel के नाम को `greeting_ch` से `ch_samplesheet` में अपडेट करने की आवश्यकता है जैसा कि नीचे दिखाया गया है, `take:` keyword के तहत लिखे गए से match करने के लिए। === "बाद में" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // एक अभिवादन emit करें (nf-core samplesheet convention का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) ``` === "पहले" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // एक अभिवादन emit करें sayHello(greeting_ch) ``` @@ -1247,7 +1252,7 @@ nf-core project में samplesheet की अवधारणा के आस === "बाद में" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // channel: [ path(versions.yml) ] @@ -1255,12 +1260,12 @@ nf-core project में samplesheet की अवधारणा के आस === "पहले" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // channel: [ path(versions.yml) ] ``` -यह उन संशोधनों को पूरा करता है जो हमें HELLO workflow के लिए करने की आवश्यकता है। +यह उन संशोधनों को पूरा करता है जो हमें `HELLO` workflow के लिए करने की आवश्यकता है। इस बिंदु पर, हमने उस समग्र code structure को प्राप्त कर लिया है जिसे हमने लागू करने के लिए निर्धारित किया था। ### सारांश @@ -1324,7 +1329,8 @@ workflow CORE_HELLO { // WORKFLOW: Pipeline चलाएं // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1361,7 +1367,6 @@ workflow { // SUBWORKFLOW: Completion tasks चलाएं // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1377,7 +1382,7 @@ nf-core project nested subworkflows का भारी उपयोग कर यहाँ जो मायने रखता है वह यह है कि दो workflows परिभाषित हैं: -- `CORE_HELLO` `core-hello/workflows/hello.nf` में HELLO workflow को चलाने के लिए एक thin wrapper है जिसे हमने अभी अनुकूलित करना समाप्त किया। +- `CORE_HELLO` `core-hello/workflows/hello.nf` में `HELLO` workflow को चलाने के लिए एक thin wrapper है जिसे हमने अभी अनुकूलित करना समाप्त किया। - एक unnamed workflow जो `CORE_HELLO` के साथ-साथ दो अन्य subworkflows, `PIPELINE_INITIALISATION` और `PIPELINE_COMPLETION` को call करता है। यहाँ एक diagram है कि वे एक दूसरे से कैसे संबंधित हैं: @@ -1422,9 +1427,9 @@ nf-core project nested subworkflows का भारी उपयोग कर versions = ch_versions ``` -यह channel factory है जो samplesheet को parse करती है और इसे उस रूप में pass करती है जो HELLO workflow द्वारा consume करने के लिए तैयार है। +यह channel factory है जो samplesheet को parse करती है और इसे उस रूप में pass करती है जो `HELLO` workflow द्वारा consume करने के लिए तैयार है। -!!! note "नोट" +!!! info "जानकारी" ऊपर दिया गया syntax हमने पहले उपयोग किए गए से थोड़ा अलग है, लेकिन मूल रूप से यह: @@ -1533,7 +1538,7 @@ cp greetings.csv core-hello/assets/. === "बाद में" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1595,13 +1600,53 @@ cp greetings.csv core-hello/assets/. यह हमें करने के लिए आवश्यक code modifications को पूरा करता है। -### 5.4. Test profile के साथ pipeline चलाएं +### 5.4. Parameter validation बंद करें + +हमने templated samplesheet parsing को अपने सरल channel construction से बदल दिया, लेकिन template अभी भी एक `nextflow_schema.json` और `assets/schema_input.json` के साथ आता है जो fastq-based samplesheet का वर्णन करता है। +चूंकि हमने अभी तक उन schemas को अपने `greetings.csv` format के अनुसार अनुकूलित नहीं किया है, इसलिए हमें अभी के लिए parameter validation बंद करने की आवश्यकता है (हम इसे बाद में ठीक से सेट अप करेंगे)। + +`core-hello/nextflow.config` खोलो और `validate_params` को `false` पर सेट करो: + +=== "बाद में" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "पहले" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +हम इसे command line के बजाय config फ़ाइल में सेट करते हैं क्योंकि Nextflow version 26.04 से शुरू होकर, command line पर दिए गए सभी values strings के रूप में typed होते हैं। +इसके परिणामस्वरूप, Boolean parameters को genuine `true`/`false` value लेने के लिए config फ़ाइल या `-params-file` में सेट किया जाना चाहिए। + +उदाहरण के लिए, यहाँ `--validate_params false` का उपयोग करने पर यह **string** `"false"` के रूप में evaluate होगा, जो validation को चालू रखता है। + +!!! tip "`nextflow.config` में v2 parser compatibility lines" + + v2 syntax की बात करें तो, तुम config फ़ाइल में `params` block के ठीक नीचे ये दो lines देख सकते हो: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + ये v2 syntax parser के साथ compatibility के लिए आवश्यक हैं। + + - v2 syntax के साथ, `params.*` variables को process modules में `publishDir` directives के अंदर directly reference नहीं किया जा सकता, इसलिए `outputDir` को यहाँ एक top-level config variable के रूप में परिभाषित किया गया है जिसे वे directives access कर सकते हैं। + + - `workflow.output.mode` v2 workflow output block के लिए default publishing mode सेट करता है। + + दोनों nf-core pipeline template द्वारा automatically generate होते हैं और इन्हें modify करने की आवश्यकता नहीं है। + +### 5.5. Test profile के साथ pipeline चलाएं यह बहुत कुछ था, लेकिन हम अंत में pipeline चलाने की कोशिश कर सकते हैं! -ध्यान दो कि हमें command line में `--validate_params false` जोड़ना होगा क्योंकि हमने अभी तक validation सेट अप नहीं किया है (वह बाद में आएगा)। ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` यदि तुमने सभी modifications सही तरीके से किए हैं, तो यह पूरा होने तक चलना चाहिए। @@ -1609,9 +1654,9 @@ nextflow run core-hello --outdir core-hello-results -profile test,docker --valid ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1623,10 +1668,10 @@ nextflow run core-hello --outdir core-hello-results -profile test,docker --valid Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1637,17 +1682,17 @@ nextflow run core-hello --outdir core-hello-results -profile test,docker --valid !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -जैसा कि तुम देख सकते हो, initialisation subworkflow की बदौलत शुरुआत में typical nf-core summary produce हुआ, और प्रत्येक module के लिए lines अब पूर्ण PIPELINE:WORKFLOW:module नाम दिखाती हैं। +जैसा कि तुम देख सकते हो, initialisation subworkflow की बदौलत शुरुआत में typical nf-core summary produce हुआ, और प्रत्येक module के लिए lines अब पूर्ण `PIPELINE:WORKFLOW:module` नाम दिखाती हैं। -### 5.5. Pipeline outputs खोजें +### 5.6. Pipeline outputs खोजें अब सवाल है: pipeline के outputs कहाँ हैं? और जवाब काफी दिलचस्प है: अब results खोजने के लिए दो अलग-अलग जगहें हैं। @@ -1663,17 +1708,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1683,7 +1728,7 @@ tree core-hello-results ![Hello pipeline के लिए execution timeline report](./img/execution_timeline_hello.png) -!!! note "नोट" +!!! info "जानकारी" एक बार फिर tasks parallel में नहीं चलाए गए क्योंकि हम Github Codespaces में एक minimalist machine पर चला रहे हैं। इन्हें parallel में चलते हुए देखने के लिए, अपने codespace का CPU allocation और test configuration में resource limits बढ़ाने का प्रयास करो। diff --git a/docs/hi/docs/hello_nf-core/03_use_module.md b/docs/hi/docs/hello_nf-core/03_use_module.md index 8acdf8e154..14a337a3ce 100644 --- a/docs/hi/docs/hello_nf-core/03_use_module.md +++ b/docs/hi/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ nf-core के साथ काम करने के महान लाभो आप निम्नलिखित कमांड चलाकर परीक्षण कर सकते हैं कि यह सफलतापूर्वक चलता है: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ nf-core प्रोजेक्ट [https://nf-co.re/modules](https://nf-co.re/ जैसा कि आप देख सकते हैं, काफी कुछ परिणाम हैं, उनमें से कई बहुत विशिष्ट प्रकार की फ़ाइलों को जोड़ने के लिए डिज़ाइन किए गए मॉड्यूल हैं। उनमें से, आपको `find_concatenate` नामक एक सामान्य-उद्देश्य मॉड्यूल दिखाई देना चाहिए। -!!! note "मॉड्यूल नामकरण परंपरा" +!!! info "मॉड्यूल नामकरण परंपरा" underscore (`_`) का उपयोग मॉड्यूल नामों में slash (`/`) वर्ण के स्थान पर किया जाता है। @@ -120,9 +120,11 @@ nf-core modules info find/concatenate | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ nf-core modules info find/concatenate यह वही जानकारी है जो आप वेबसाइट पर पा सकते हैं। +`INFO Reinstalling modules found in 'modules.json' but missing from directory` संदेश को आप ignore कर सकते हैं; यह nf-core/tools 4.0.2 द्वारा किसी भी मॉड्यूल के लिए emit किया जाता है जिसे आप `info` से query करते हैं, चाहे वह वास्तव में इंस्टॉल हो या नहीं, और इसका कोई प्रभाव नहीं पड़ता क्योंकि `info` कमांड कोई फ़ाइल नहीं लिखता। + ### 1.4. find/concatenate मॉड्यूल इंस्टॉल करें अब जब हमें वह मॉड्यूल मिल गया है जो हम चाहते हैं, तो हमें इसे अपनी pipeline के source code में जोड़ना होगा। @@ -193,15 +197,13 @@ nf-core modules info find/concatenate अच्छी खबर यह है कि nf-core प्रोजेक्ट में कुछ tooling शामिल है जो इस भाग को आसान बनाती है। विशेष रूप से, `nf-core modules install` कमांड code को retrieve करने और इसे एक ही चरण में आपके प्रोजेक्ट के लिए उपलब्ध कराने को automate करना संभव बनाता है। -अपनी pipeline डायरेक्टरी में जाएं और इंस्टॉलेशन कमांड चलाएं: +सुनिश्चित करें कि आपकी working डायरेक्टरी `core-hello` pipeline प्रोजेक्ट की root है, फिर इंस्टॉलेशन कमांड चलाएं: ```bash cd core-hello nf-core modules install find/concatenate ``` -tool मॉड्यूल इंस्टॉल करने के लिए आगे बढ़ेगा। - ??? success "कमांड आउटपुट" ```console @@ -212,26 +214,20 @@ tool मॉड्यूल इंस्टॉल करने के लिए | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -कमांड स्वचालित रूप से: - -- मॉड्यूल फ़ाइलों को `modules/nf-core/find/concatenate/` में डाउनलोड करता है -- इंस्टॉल किए गए मॉड्यूल को ट्रैक करने के लिए `modules.json` को अपडेट करता है -- आपको अपने workflow में उपयोग करने के लिए सही `include` statement प्रदान करता है - -!!! tip "सुझाव" - - मॉड्यूल इंस्टॉलेशन कमांड चलाने से पहले हमेशा सुनिश्चित करें कि आपकी वर्तमान working डायरेक्टरी आपके pipeline प्रोजेक्ट की root है। +कमांड मॉड्यूल फ़ाइलों को `modules/nf-core/find/concatenate/` में डाउनलोड करता है और इंस्टॉल किए गए मॉड्यूल को ट्रैक करने के लिए `modules.json` को अपडेट करता है। +अंत में दिखने वाले `NotADirectoryError` को आप ignore कर सकते हैं; यह इसलिए होता है क्योंकि nf-core/tools 4.0.2 अपेक्षा करता है कि हर local मॉड्यूल अपनी खुद की डायरेक्टरी (`modules/local//main.nf`) में हो, जबकि `core-hello` अभी भी इस चरण में single-file local मॉड्यूल का उपयोग करता है। +हालाँकि, `find/concatenate` मॉड्यूल सही तरीके से इंस्टॉल हो जाता है, और `modules.json` अपेक्षा के अनुसार अपडेट हो जाता है। +हम भाग 4 में `cowpy` को directory layout में convert करेंगे। -आइए जांचें कि मॉड्यूल सही तरीके से इंस्टॉल किया गया था: +आइए जांचें कि मॉड्यूल फ़ाइलें सही जगह पर हैं: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -आप स्थानीय रूप से इंस्टॉल किए गए मॉड्यूल को सूचीबद्ध करने के लिए nf-core utility से पूछकर भी इंस्टॉलेशन को सत्यापित कर सकते हैं: +आप `modules.json` की जांच करके भी इंस्टॉलेशन की पुष्टि कर सकते हैं, जो अब nf-core/modules रिपॉजिटरी के अंतर्गत `find/concatenate` को सूचीबद्ध करता है। + +??? abstract "फ़ाइल सामग्री" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +यह पुष्टि करता है कि `find/concatenate` मॉड्यूल अब आपके प्रोजेक्ट के source code का हिस्सा है। +हालाँकि, वास्तव में नए मॉड्यूल का उपयोग करने के लिए, हमें इसे अपनी pipeline में import करना होगा। + +अंत में, आप अपनी pipeline में वर्तमान में track किए जा रहे मॉड्यूल की जांच करने के लिए `nf-core modules list local` कमांड का भी उपयोग कर सकते हैं। ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "कमांड आउटपुट" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -यह पुष्टि करता है कि `find/concatenate` मॉड्यूल अब आपके प्रोजेक्ट के source code का हिस्सा है। - -हालाँकि, वास्तव में नए मॉड्यूल का उपयोग करने के लिए, हमें इसे अपनी pipeline में import करना होगा। +यह परिणाम तालिका में `find/concatenate` को उसके repository, version SHA, message, और date के साथ दिखाता है। ### 1.5. मॉड्यूल imports को अपडेट करें @@ -302,7 +354,7 @@ include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' === "बाद में" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "पहले" @@ -345,7 +397,7 @@ include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' हम इसे एक अलग सेक्शन के रूप में निपटाने जा रहे हैं क्योंकि इसमें एक नया तंत्र शामिल है जिसे हमने अभी तक कवर नहीं किया है: metadata maps। -!!! note "नोट" +!!! info "जानकारी" आप वैकल्पिक रूप से `collectGreetings.nf` फ़ाइल को हटा सकते हैं: @@ -373,7 +425,7 @@ include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' आदर्श रूप से यह कुछ ऐसा है जो आपको मॉड्यूल इंस्टॉल करने से _पहले_ भी करना चाहिए, लेकिन अरे, देर से बेहतर कभी नहीं। (क्या यह मायने रखता है, उन मॉड्यूल से छुटकारा पाने के लिए एक `uninstall` कमांड है जिन्हें आप तय करते हैं कि आप अब नहीं चाहते हैं।) -!!! note "नोट" +!!! info "जानकारी" FIND_CONCATENATE process में विभिन्न compression प्रकारों, फ़ाइल extensions इत्यादि की कुछ चतुर handling शामिल है जो सख्ती से हम आपको यहां दिखाने की कोशिश कर रहे हैं उससे संबंधित नहीं हैं, इसलिए हम इसमें से अधिकांश को ignore करेंगे और केवल उन हिस्सों पर ध्यान केंद्रित करेंगे जो महत्वपूर्ण हैं। @@ -512,7 +564,7 @@ ch_input = [[[id: 'batch1', date: '25.10.01'], 'batch1.txt'], उम्मीद है कि आप यह देखना शुरू कर सकते हैं कि यह कितना उपयोगी हो सकता है। न केवल यह आपको metadata के आधार पर outputs का नाम रखने की अनुमति देता है, बल्कि आप विभिन्न पैरामीटर values लागू करने जैसी चीजें भी कर सकते हैं, और specific operators के संयोजन में, आप data को group, sort या filter भी कर सकते हैं क्योंकि यह pipeline के माध्यम से flows करता है। -!!! note "Metadata के बारे में अधिक जानें" +!!! info "Metadata के बारे में अधिक जानें" Nextflow workflows में metadata के साथ काम करने के लिए एक व्यापक परिचय के लिए, जिसमें samplesheets से metadata को कैसे पढ़ें और processing को customize करने के लिए इसका उपयोग कैसे करें, [workflows में Metadata](../side_quests/metadata/index.md) side quest देखें। @@ -543,7 +595,7 @@ ch_input = [[[id: 'batch1', date: '25.10.01'], 'batch1.txt'], स्पष्टता के लिए, हम इसे तोड़ेंगे और प्रत्येक चरण को अलग से कवर करेंगे। -!!! note "नोट" +!!! info "जानकारी" नीचे दिखाए गए सभी परिवर्तन `core-hello/workflows/hello.nf` workflow फ़ाइल में `main` ब्लॉक में workflow logic में किए गए हैं। @@ -570,8 +622,8 @@ def cat_meta = [id: params.batch] === "बाद में" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // एक अभिवादन emit करें + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // अभिवादन emit करें (nf-core samplesheet परंपरा का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) // अभिवादन को uppercase में बदलें @@ -586,8 +638,8 @@ def cat_meta = [id: params.batch] === "पहले" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // एक अभिवादन emit करें + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // अभिवादन emit करें (nf-core samplesheet परंपरा का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) // अभिवादन को uppercase में बदलें @@ -608,8 +660,8 @@ def cat_meta = [id: params.batch] === "बाद में" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // एक अभिवादन emit करें + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // अभिवादन emit करें (nf-core samplesheet परंपरा का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) // अभिवादन को uppercase में बदलें @@ -627,8 +679,8 @@ def cat_meta = [id: params.batch] === "पहले" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // एक अभिवादन emit करें + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // अभिवादन emit करें (nf-core samplesheet परंपरा का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) // अभिवादन को uppercase में बदलें @@ -654,8 +706,8 @@ def cat_meta = [id: params.batch] === "बाद में" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // एक अभिवादन emit करें + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // अभिवादन emit करें (nf-core samplesheet परंपरा का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) // अभिवादन को uppercase में बदलें @@ -676,8 +728,8 @@ def cat_meta = [id: params.batch] === "पहले" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // एक अभिवादन emit करें + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // अभिवादन emit करें (nf-core samplesheet परंपरा का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) // अभिवादन को uppercase में बदलें @@ -704,8 +756,8 @@ def cat_meta = [id: params.batch] === "बाद में" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // एक अभिवादन emit करें + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // अभिवादन emit करें (nf-core samplesheet परंपरा का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) // अभिवादन को uppercase में बदलें @@ -729,8 +781,8 @@ def cat_meta = [id: params.batch] === "पहले" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // एक अभिवादन emit करें + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // अभिवादन emit करें (nf-core samplesheet परंपरा का उपयोग करने के लिए अपडेट किया गया) sayHello(ch_samplesheet) // अभिवादन को uppercase में बदलें @@ -753,7 +805,7 @@ def cat_meta = [id: params.batch] फिर यह बस उस अंतिम पंक्ति में `collectGreetings.out.outfile` के बजाय `cowpy` को `ch_for_cowpy` पास करने की बात है। -!!! note "नोट" +!!! info "जानकारी" पाठ्यक्रम के अगले भाग में, हम `cowpy` को सीधे metadata tuples के साथ काम करने के लिए अपडेट करेंगे, इसलिए यह extraction चरण आवश्यक नहीं रहेगा। @@ -762,7 +814,7 @@ def cat_meta = [id: params.batch] आइए परीक्षण करें कि workflow नए integrated `find/concatenate` मॉड्यूल के साथ काम करता है: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` यह यथोचित रूप से जल्दी चलना चाहिए। @@ -770,40 +822,40 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` ध्यान दें कि `collectGreetings` के बजाय अब process execution list में `FIND_CONCATENATE` दिखाई देता है। diff --git a/docs/hi/docs/hello_nf-core/04_make_module.md b/docs/hi/docs/hello_nf-core/04_make_module.md index fd389620b8..0bb92b1ebf 100644 --- a/docs/hi/docs/hello_nf-core/04_make_module.md +++ b/docs/hi/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ nf-core प्रोजेक्ट एक कमांड (`nf-core modules cre आप निम्नलिखित कमांड चलाकर परीक्षण कर सकते हैं कि यह सफलतापूर्वक चलता है: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ process cowpy { === "बाद में" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // cowpy के साथ ASCII art जनरेट करें (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "पहले" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // cowpy के साथ ASCII art जेनरेट करें (https://github.com/jeffbuttars/cowpy) process cowpy { ``` इस मामले में अपरकेसिंग पूरी तरह से सीधी है। -यदि प्रोसेस नाम कई शब्दों से बना होता, उदाहरण के लिए यदि हमारे पास मूल रूप से camel case में MyCowpyTool नामक एक प्रोसेस होता, तो nf-core परंपरा उन्हें अलग करने के लिए अंडरस्कोर का उपयोग करना होगी, जिससे MY_COWPY_TOOL मिलेगा। +यदि प्रोसेस नाम कई शब्दों से बना होता, उदाहरण के लिए यदि हमारे पास मूल रूप से camel case में `MyCowpyTool` नामक एक प्रोसेस होता, तो nf-core परंपरा उन्हें अलग करने के लिए अंडरस्कोर का उपयोग करना होगी, जिससे `MY_COWPY_TOOL` मिलेगा। #### 1.1.2. मॉड्यूल इम्पोर्ट स्टेटमेंट अपडेट करें @@ -164,7 +164,7 @@ process cowpy { // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ process cowpy { // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ process cowpy { चलिए इन परिवर्तनों के बाद यह परीक्षण करने के लिए workflow चलाते हैं कि सब कुछ सही तरीके से काम कर रहा है। ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param === "बाद में" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param === "पहले" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param चलिए इन परिवर्तनों के बाद यह परीक्षण करने के लिए workflow चलाते हैं कि सब कुछ सही तरीके से काम कर रहा है। ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Nextflow रनटाइम पर उन आर्गुमेंट को उ परिणामस्वरूप, मॉड्यूल इंटरफ़ेस अब सरल है: यह केवल आवश्यक मेटाडेटा और फ़ाइल इनपुट की अपेक्षा करता है। -!!! note "नोट" +!!! info "जानकारी" `?:` ऑपरेटर को अक्सर 'Elvis ऑपरेटर' कहा जाता है क्योंकि यह बगल से Elvis Presley के चेहरे की तरह दिखता है, `?` कैरेक्टर उनके बालों में लहर का प्रतीक है। @@ -623,15 +623,15 @@ workflow कोड अब साफ है: हमें प्रोसेस `kosh` का उपयोग करके यह कमांड चलाएं, जो अधिक... रहस्यमय विकल्पों में से एक है: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "कमांड आउटपुट" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ cat work/38/eb29ea*/cowpy-test.txt - **पोर्टेबिलिटी**: मॉड्यूल को हार्डकोडेड टूल विकल्पों के बिना पुन: उपयोग किया जा सकता है - **कोई workflow परिवर्तन नहीं**: टूल विकल्पों को जोड़ने या बदलने के लिए workflow कोड को अपडेट करने की आवश्यकता नहीं है -!!! note "नोट" +!!! info "जानकारी" `ext.args` सिस्टम में शक्तिशाली अतिरिक्त क्षमताएँ हैं जो यहाँ कवर नहीं की गई हैं, जिसमें मेटाडेटा के आधार पर आर्गुमेंट मानों को गतिशील रूप से स्विच करना शामिल है। अधिक विवरण के लिए [nf-core मॉड्यूल विशिष्टताएँ](https://nf-co.re/docs/guidelines/components/modules) देखें। @@ -841,15 +841,15 @@ ext.prefix = { "cowpy-${meta.id}" } आइए जांचें कि workflow अभी भी अपेक्षित रूप से काम करता है। ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ results directory में आउटपुट पर नज़र डाले आइए देखें कि अब pipeline चलाने पर क्या होता है। ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param आप देख सकते हैं कि Nextflow ने workflow और module के नामों के आधार पर directories की यह hierarchy बनाई। -!!! note "नोट" +!!! info "जानकारी" आप `pipeline_info/` में `hello_software_versions.yml` देख सकते हैं। इसमें अभी केवल `FIND_CONCATENATE` से version जानकारी है, क्योंकि `COWPY` अभी अपना version रिपोर्ट नहीं करता। @@ -1098,9 +1098,9 @@ process { Default `publishDir` directive को override करने के लिए, आप बस `conf/modules.config` फ़ाइल में अपनी directives जोड़ सकते हैं। -उदाहरण के लिए, आप `withName:` selector का उपयोग करके एक single process के लिए default को override कर सकते हैं, जैसा कि इस उदाहरण में जहां हम 'COWPY' process के लिए एक custom `publishDir` directive जोड़ते हैं। +उदाहरण के लिए, आप `withName:` selector का उपयोग करके एक single process के लिए default को override कर सकते हैं, जैसा कि इस उदाहरण में जहां हम `COWPY` process के लिए एक custom `publishDir` directive जोड़ते हैं। -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ script block में कोई बदलाव की ज़रूरत न #### 1.6.2. Pipeline चलाएं और versions report देखें ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -workflow-side collection — वह `Channel.topic("versions")` block जो आपने भाग 2 के placeholder workflow में देखा था — topic को subscribe करता है और यह combined report स्वचालित रूप से लिखता है। +workflow-side collection — वह `channel.topic("versions")` block जो आपने भाग 2 के placeholder workflow में देखा था — topic को subscribe करता है और यह combined report स्वचालित रूप से लिखता है। -!!! note "Backwards compatibility" +!!! info "Backwards compatibility" workflow के topic channel block में `versions_file` branch उन modules को handle करने के लिए मौजूद है जिन्हें अभी तक `topic: versions` उपयोग करने के लिए update नहीं किया गया है और जो अभी भी script block में `emit: versions` के साथ `versions.yml` file लिखते हैं। Transition के दौरान दोनों styles एक साथ supported हैं। @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Pattern 1: Metadata tuples ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ Default code Docker और Singularity के बीच toggle करने क === "पहले" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Conda environment -Conda environment के लिए, module code `conda "${moduleDir}/environment.yml"` specify करता है जिसका अर्थ है कि इसे `environment.yml` file में configure किया जाना चाहिए। +Conda environment के लिए, module code `#!groovy conda "${moduleDir}/environment.yml"` specify करता है जिसका अर्थ है कि इसे `environment.yml` file में configure किया जाना चाहिए। Module creation tool ने हमें चेतावनी दी कि यह Bioconda (bioinformatics tools के लिए primary channel) में `cowpy` package नहीं ढूंढ सका। हालांकि, `cowpy` conda-forge में उपलब्ध है, इसलिए आप `environment.yml` को इस प्रकार पूरा कर सकते हैं: @@ -1428,7 +1431,7 @@ Input और output blocks को update करें: === "बाद में" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Input और output blocks को update करें: === "पहले" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` यह specify करता है: @@ -1453,6 +1456,7 @@ Input और output blocks को update करें: - Input file parameter name (`input_file` generic `input` के बजाय) - Configurable prefix pattern का उपयोग करके output filename (`#!groovy ${prefix}.txt` wildcard `*` के बजाय) - एक descriptive emit name (`cowpy_output` generic `output` के बजाय) +- Template के `#!groovy eval("cowpy --version")` की जगह एक static version string (`#!groovy val("1.1.5")`), जो section 1.6 के manual module से मेल खाता है (`cowpy` tool `--version` flag expose नहीं करता) यदि आप syntax validate करने के लिए Nextflow language server का उपयोग कर रहे हैं, तो `#!groovy ${prefix}` part इस stage पर error के रूप में flag किया जाएगा क्योंकि हमने इसे अभी तक script block में नहीं जोड़ा है। अब उस पर आते हैं। @@ -1517,7 +1521,7 @@ Nextflow context में, एक [stub](https://www.nextflow.io/docs/latest/pr === "पहले" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1576,15 +1580,15 @@ Nextflow context में, एक [stub](https://www.nextflow.io/docs/latest/pr इसे test करने के लिए pipeline चलाएं। ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "कमांड आउटपुट" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1611,10 +1615,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/hi/docs/hello_nf-core/05_input_validation.md b/docs/hi/docs/hello_nf-core/05_input_validation.md index acd861190f..e62e4ba0e3 100644 --- a/docs/hi/docs/hello_nf-core/05_input_validation.md +++ b/docs/hi/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ Hello nf-core प्रशिक्षण कोर्स के इस पा आप निम्नलिखित कमांड चलाकर परीक्षण कर सकते हैं कि यह सफलतापूर्वक चलता है: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema deprecated nf-validation plugin का उत्तराधिका ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ graph LR आइए अपने pipeline में पैरामीटर सत्यापन जोड़कर शुरू करें। यह `--input`, `--outdir`, और `--batch` जैसे कमांड-लाइन फ्लैग को सत्यापित करता है। -### 1.1. इनपुट फ़ाइल सत्यापन को छोड़ने के लिए सत्यापन कॉन्फ़िगर करें +### 1.1. सत्यापन सक्षम करें और इनपुट फ़ाइल सत्यापन को छोड़ें nf-core pipeline टेम्पलेट nf-schema के साथ पहले से इंस्टॉल और कॉन्फ़िगर होता है: - nf-schema plugin `nextflow.config` में `plugins{}` ब्लॉक के माध्यम से इंस्टॉल किया गया है -- पैरामीटर सत्यापन `params.validate_params = true` के माध्यम से डिफ़ॉल्ट रूप से सक्षम है +- पैरामीटर सत्यापन `params.validate_params` द्वारा नियंत्रित किया जाता है - सत्यापन pipeline इनिशियलाइज़ेशन के दौरान `UTILS_NFSCHEMA_PLUGIN` subworkflow द्वारा किया जाता है -सत्यापन व्यवहार `nextflow.config` में `validation{}` स्कोप के माध्यम से नियंत्रित किया जाता है। +भाग 3 और 4 में हमने `validate_params = false` सेट किया था ताकि pipeline किसी भी स्कीमा को कॉन्फ़िगर करने से पहले चल सके। +अब जब हम सत्यापन जोड़ने के लिए तैयार हैं, तो पहला कदम इसे चालू करना है। -चूंकि हम पहले पैरामीटर सत्यापन पर काम करेंगे (यह खंड) और खंड 2 तक इनपुट डेटा स्कीमा कॉन्फ़िगर नहीं करेंगे, हमें अस्थायी रूप से nf-schema को `input` पैरामीटर की फ़ाइल सामग्री को सत्यापित करने से छोड़ने के लिए कहना होगा। +`nextflow.config` खोलें और `validate_params` पैरामीटर खोजें (लगभग लाइन 37), और इसे `true` पर सेट करें: -`nextflow.config` खोलें और `validation` ब्लॉक खोजें (लगभग लाइन 247)। इनपुट फ़ाइल सत्यापन को छोड़ने के लिए `ignoreParams` जोड़ें: +=== "बाद में" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "पहले" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +सत्यापन व्यवहार स्वयं `nextflow.config` में `validation{}` स्कोप के माध्यम से नियंत्रित किया जाता है। + +चूंकि हम पहले पैरामीटर सत्यापन पर काम करेंगे (यह खंड) और खंड 2 तक इनपुट डेटा स्कीमा कॉन्फ़िगर नहीं करेंगे, हमें अस्थायी रूप से nf-schema को `input` पैरामीटर की फ़ाइल सामग्री को सत्यापित करने से छोड़ने के लिए भी कहना होगा। + +`validation` ब्लॉक खोजें (लगभग लाइन 252) और इनपुट फ़ाइल सत्यापन को छोड़ने के लिए `ignoreParams` जोड़ें: === "बाद में" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ nf-core pipeline टेम्पलेट nf-schema के साथ पहल === "पहले" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ nf-core pipeline टेम्पलेट nf-schema के साथ पहल - **`ignoreParams`**: `input` पैरामीटर की फ़ाइल सामग्री के सत्यापन को छोड़ें (अस्थायी; हम खंड 2 में इसे फिर से सक्षम करेंगे) - **`monochromeLogs`**: `true` पर सेट होने पर सत्यापन संदेशों में रंगीन आउटपुट अक्षम करें (`params.monochrome_logs` द्वारा नियंत्रित) -!!! note "input पैरामीटर को क्यों अनदेखा करें?" +!!! info "input पैरामीटर को क्यों अनदेखा करें?" `nextflow_schema.json` में `input` पैरामीटर में `"schema": "assets/schema_input.json"` है जो nf-schema को उस स्कीमा के विरुद्ध इनपुट CSV फ़ाइल की *सामग्री* को सत्यापित करने के लिए कहता है। चूंकि हमने अभी तक उस स्कीमा को कॉन्फ़िगर नहीं किया है, हम अस्थायी रूप से इस सत्यापन को अनदेखा करते हैं। @@ -263,7 +280,7 @@ nf-core pipelines schema build | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -तुम्हें दिखना चाहिए कि `batch` पैरामीटर स्कीमा में जोड़ा गया है, "required" फ़ील्ड अब `["input", "outdir", "batch"]` दिखा रहा है। +तुम्हें दिखना चाहिए कि `batch` पैरामीटर स्कीमा में जोड़ा गया है, `required` फ़ील्ड अब `["input", "outdir", "batch"]` दिखा रहा है। ### 1.5. पैरामीटर सत्यापन का परीक्षण करें @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipelin === "बाद में" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipelin === "पहले" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipelin #### 2.7.1. मान्य इनपुट के साथ परीक्षण करें सबसे पहले, पुष्टि करें कि pipeline मान्य इनपुट के साथ सफलतापूर्वक चलता है। -ध्यान दें कि हमें अब `--validate_params false` की आवश्यकता नहीं है क्योंकि सत्यापन काम कर रहा है! +`validate_params = true` और इनपुट स्कीमा के साथ, पैरामीटर और इनपुट डेटा दोनों का सत्यापन अब वास्तव में चलता है। ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/hi/docs/info/nxf_versions.md b/docs/hi/docs/info/nxf_versions.md index 9d5ff375f7..f0d13ffead 100644 --- a/docs/hi/docs/info/nxf_versions.md +++ b/docs/hi/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: ट्रेनिंग पोर्टल के संस्करण 3.0 के अनुसार, हमारे सभी ट्रेनिंग कोर्स Nextflow संस्करण 25.10.2 या बाद के संस्करण के साथ संगत हैं, जब तक कि कोर्स इंडेक्स पेज पर अन्यथा निर्दिष्ट न हो। (इसमें पुरानी या संग्रहीत सामग्री शामिल नहीं है जिसमें संस्करण सूचना नहीं हो सकती है।) -हमारे ट्रेनिंग वातावरण में वर्तमान में डिफ़ॉल्ट रूप से लोड होने वाला Nextflow संस्करण **Nextflow 25.10.4** है। +हमारे ट्रेनिंग वातावरण में वर्तमान में डिफ़ॉल्ट रूप से लोड होने वाला Nextflow संस्करण **Nextflow 26.04.4** है। क्योंकि कोर्स अब workflow स्तर पर typed inputs के साथ-साथ workflow-स्तरीय output निर्देशों का उपयोग करते हैं, उन्हें V2 सिंटैक्स पार्सर के उपयोग की आवश्यकता होती है, **जब तक कि अन्यथा निर्दिष्ट न हो**। +V2 पार्सर Nextflow 26.04 से डिफ़ॉल्ट है, इसलिए जो संस्करण हम लोड करते हैं उसमें तुम्हें इसे मैन्युअल रूप से सक्षम करने की आवश्यकता नहीं है। यदि तुम [Github Codespaces](../envsetup/01_setup.md) या [लोकल devcontainers](../envsetup/03_devcontainer.md) के माध्यम से हमारे द्वारा प्रदान किए गए वातावरण का उपयोग करने की योजना बना रहे हो, तो तुम्हें कुछ भी करने की आवश्यकता नहीं है जब तक कि कोर्स निर्देशों में विशेष रूप से उल्लेख न हो। -हालांकि, यदि तुम अपने स्वयं के वातावरण में ट्रेनिंग के माध्यम से काम करने की योजना बना रहे हो ([मैनुअल इंस्टॉल](../envsetup/02_local.md)), तो तुम्हें यह सुनिश्चित करना होगा कि v2 सिंटैक्स पार्सर सक्षम के साथ Nextflow संस्करण 25.10.2 या बाद के संस्करण का उपयोग करो। +हालांकि, यदि तुम अपने स्वयं के वातावरण में ट्रेनिंग के माध्यम से काम करने की योजना बना रहे हो ([मैनुअल इंस्टॉल](../envsetup/02_local.md)), तो तुम्हें यह सुनिश्चित करना होगा कि Nextflow संस्करण 25.10.2 या बाद के संस्करण का उपयोग करो, और यदि तुम 26.04 से पहले के संस्करण पर हो तो v2 सिंटैक्स पार्सर को सक्षम करो। ## ट्रेनिंग सामग्री के पुराने संस्करण @@ -40,7 +41,7 @@ DSL1 को Nextflow 22.03 में deprecated किया गया और 22 v1 पार्सर मूल, अधिक अनुमति देने वाला पार्सर है। v2 पार्सर अधिक सख्त है और नई भाषा सुविधाओं को सक्षम करता है जैसे कि स्टैटिक टाइपिंग (typed inputs और outputs) और workflow-स्तरीय output निर्देश। v2 पार्सर बेहतर एरर संदेश भी प्रदान करता है और रनटाइम के बजाय पार्स टाइम पर अधिक एरर पकड़ता है। -v2 पार्सर Nextflow 26.04 में डिफ़ॉल्ट बन जाएगा। +v2 पार्सर Nextflow 26.04 से आगे डिफ़ॉल्ट है। सारांश में: DSL2 वह भाषा है जो तुम लिखते हो; सिंटैक्स पार्सर संस्करण यह निर्धारित करता है कि उस भाषा की कितनी सख्ती से व्याख्या की जाती है और कौन सी उन्नत सुविधाएं उपलब्ध हैं। @@ -52,21 +53,22 @@ Nextflow के अपने संस्करण को अपडेट कर ### v2 सिंटैक्स पार्सर को सक्षम करना +Nextflow 26.04 से आगे v2 पार्सर डिफ़ॉल्ट है, इसलिए नीचे दिए गए चरण केवल 26.04 से पहले के संस्करणों पर आवश्यक हैं। + अपने वर्तमान सत्र के लिए v2 सिंटैक्स पार्सर को **सक्षम** करने के लिए, अपने टर्मिनल में निम्नलिखित कमांड चलाओ: ```bash export NXF_SYNTAX_PARSER=v2 ``` -इसे स्थायी बनाने के लिए (Nextflow 26.04 में v2 के डिफ़ॉल्ट बनने तक), export कमांड को अपनी शेल प्रोफ़ाइल (`~/.bashrc`, `~/.zshrc`, आदि) में जोड़ो: +इसे स्थायी बनाने के लिए, export कमांड को अपनी शेल प्रोफ़ाइल (`~/.bashrc`, `~/.zshrc`, आदि) में जोड़ो: ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -ध्यान दो कि `NXF_SYNTAX_PARSER=v2` एनवायरनमेंट वेरिएबल एक अस्थायी आवश्यकता है। -Nextflow 26.04 से आगे, v2 पार्सर डिफ़ॉल्ट बन जाएगा और इस सेटिंग की अब आवश्यकता नहीं होगी। +ध्यान दो कि Nextflow के 26.04 से पहले के संस्करणों पर इन कोर्सों में उपयोग की जाने वाली v2 सुविधाओं तक पहुंचने के लिए `NXF_SYNTAX_PARSER=v2` एनवायरनमेंट वेरिएबल आवश्यक है। ### v2 सिंटैक्स पार्सर को अक्षम करना diff --git a/docs/hi/docs/nextflow_run/01_basics.md b/docs/hi/docs/nextflow_run/01_basics.md index 6528c0643a..417c1d25b9 100644 --- a/docs/hi/docs/nextflow_run/01_basics.md +++ b/docs/hi/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "कमांड आउटपुट" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` यदि तुम्हारा console आउटपुट कुछ इस तरह दिखता है, तो बधाई हो, तुमने अभी-अभी अपना पहला Nextflow workflow चलाया है! @@ -115,13 +121,14 @@ nextflow run 1-hello.nf --input 'Hello World!' इसका उल्लेख कोर्स की शुरुआत में किया गया था, लेकिन शायद तुमने इसे miss कर दिया। [Nextflow versions](../info/nxf_versions.md) help material देखो। - संक्षेप में, यदि तुम Nextflow `25.10` का उपयोग कर रहे हो तो तुम्हें v2 language parser enable करना होगा: + v2 parser Nextflow 26.04 से डिफ़ॉल्ट है, इसलिए यह केवल पुराने versions पर दिखेगा। + 26.04 से पहले के version पर तुम्हें v2 language parser enable करना होगा: ```bash export NXF_SYNTAX_PARSER=v2 ``` -यहां सबसे महत्वपूर्ण आउटपुट अंतिम पंक्ति है, जो ऊपर के आउटपुट में हाइलाइट किया गया है: +यहां सबसे महत्वपूर्ण आउटपुट हाइलाइट की गई पंक्ति है: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` तुम्हें देखना चाहिए कि तुम्हारे outputs अब `results` के बजाय `hello_results` नाम की डायरेक्टरी में publish हो रहे हैं: @@ -206,7 +219,7 @@ hello_results पहले चलाए गए workflow के console आउटपुट पर वापस जाते हुए, हमारे पास यह पंक्ति थी: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` देखो कि पंक्ति `[a3/1e1535]` से कैसे शुरू होती है? @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "कमांड आउटपुट" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Console आउटपुट परिचित दिखना चाहिए, लेकिन पहले की तुलना में एक चीज़ थोड़ी अलग है। @@ -767,7 +786,7 @@ Console आउटपुट पंक्ति `[a3/7be2fa] SAYHELLO | 1 of 1 ✔ - [x] Task की work directory का truncated path - [ ] Output फ़ाइल का checksum -और जानें: [2.4. `work/` डायरेक्टरी में मूल आउटपुट और लॉग खोजो](#23-find-the-original-output-and-logs-in-the-work-directory) +और जानें: [2.3. `work/` डायरेक्टरी में मूल आउटपुट और लॉग खोजो](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ Task directory में `.command.sh` फ़ाइल का उद्देश - [ ] इसमें failed tasks से error messages होते हैं - [ ] यह task के लिए staged input फ़ाइलों को सूचीबद्ध करती है -और जानें: [2.4. `work/` डायरेक्टरी में मूल आउटपुट और लॉग खोजो](#23-find-the-original-output-and-logs-in-the-work-directory) +और जानें: [2.3. `work/` डायरेक्टरी में मूल आउटपुट और लॉग खोजो](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ Task directory में `.command.sh` फ़ाइल का उद्देश - [ ] Nextflow overwriting रोकता है और fail होता है - [ ] वे automatically backup हो जाते हैं -और जानें: [2.5. अलग-अलग greetings के साथ workflow फिर से चलाओ](#24-re-run-the-workflow-with-different-greetings) +और जानें: [2.4. अलग-अलग greetings के साथ workflow फिर से चलाओ](#24-re-run-the-workflow-with-different-greetings) यह console आउटपुट क्या indicate करता है? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] Task fail हुआ और skip किया गया diff --git a/docs/hi/docs/nextflow_run/02_pipeline.md b/docs/hi/docs/nextflow_run/02_pipeline.md index 45491064c2..daf7457dbf 100644 --- a/docs/hi/docs/nextflow_run/02_pipeline.md +++ b/docs/hi/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` रोमांचक रूप से, यह indicate करता है कि process के लिए '3 of 3' calls किए गए, जो encouraging है, क्योंकि हमने जो CSV इनपुट के रूप में प्रदान किया उसमें तीन rows of data थीं। @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "कमांड आउटपुट" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` इस बार हम सभी तीन process runs और उनकी associated work subdirectories आउटपुट में listed देखते हैं। @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "कमांड आउटपुट" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` तुम देखते हो कि जैसा कि promised था, workflow के भाग के रूप में कई steps run किए गए; पहले दो (`sayHello` और `convertToUpper`) presumably प्रत्येक individual greeting पर run किए गए, और तीसरा (`collectGreetings`) सभी तीन `convertToUpper` calls के outputs पर केवल एक बार run किया गया होगा। @@ -669,13 +705,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "कमांड आउटपुट" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` तुम्हें अपने custom batch name के साथ named नए final outputs देखने चाहिए। @@ -920,13 +974,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` तुम देखोगे कि सभी process executions successfully cached हुए, मतलब Nextflow ने recognize किया कि यह requested work पहले ही कर चुका है, भले ही code split हो गया है और main workflow फ़ाइल का नाम बदल गया है। @@ -1073,20 +1145,20 @@ ls / Container के अंदर से, तुम `cowpy` कमांड directly run कर सकते हो। ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "कमांड आउटपुट" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` यह default cow character (या 'cowacter') की ASCII art produce करता है जिसमें हमारे द्वारा specified text वाला speech bubble है। @@ -1095,22 +1167,22 @@ cowpy "Hello Containers" उदाहरण के लिए, tool documentation कहता है कि हम `-c` के साथ character set कर सकते हैं। ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "कमांड आउटपुट" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1296,15 +1368,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` पहले तीन steps cached हुए क्योंकि हमने उन्हें पहले run कर लिया था, लेकिन `cowpy` process नया है इसलिए वह actually run होता है। diff --git a/docs/hi/docs/nextflow_run/03_config.md b/docs/hi/docs/nextflow_run/03_config.md index d6efd225f2..985176e6ff 100644 --- a/docs/hi/docs/nextflow_run/03_config.md +++ b/docs/hi/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` यह अभी भी पहले जैसा ही output produce करता है। @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` यह `tux-run/` के अंतर्गत directories का एक नया set create करेगा जिसमें `tux-run/work/` और `tux-run/results/` शामिल हैं। @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` Final output फ़ाइल में greetings बोलते हुए stegosaurus character होना चाहिए। @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` यह अभी भी पहले जैसा ही output produce करता है, सिवाय इसके कि इस बार हम अपने outputs `results_config/outdir/` के अंतर्गत पाते हैं। @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` यह अभी भी पहले जैसा ही output produce करता है, सिवाय इसके कि इस बार हम अपने outputs `results_config/pnames/` के अंतर्गत पाते हैं, और वे process के अनुसार grouped हैं। @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` यह अभी भी पहले जैसा ही output produce करता है, सिवाय इसके कि इस बार हम अपने outputs `results_config/outmode/` के अंतर्गत पाते हैं। @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "कमांड आउटपुट" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` यह बिना किसी issue के काम करना चाहिए और `results_config/conda` के अंतर्गत पहले जैसे ही outputs produce करना चाहिए। @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` जैसा कि तुम देख सकते हो, यह हमें runtime पर configurations के बीच बहुत conveniently toggle करने की अनुमति देता है। @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` यह जहां possible हो Docker use करेगा और `results_config/test` के अंतर्गत outputs produce करेगा, और इस बार character comedic duo `dragonandcow` है। @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/hi/docs/nf4_science/_template/02_single_sample.md b/docs/hi/docs/nf4_science/_template/02_single_sample.md index 73bc023861..38c47fc968 100644 --- a/docs/hi/docs/nf4_science/_template/02_single_sample.md +++ b/docs/hi/docs/nf4_science/_template/02_single_sample.md @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/hi/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/hi/docs/nf4_science/genomics/02_per_sample_variant_calling.md index 4bcd104c71..427d49a4e4 100644 --- a/docs/hi/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/hi/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` तुम जाँच सकते हो कि इंडेक्स फ़ाइल सही तरीके से जेनरेट हुई है या नहीं work डायरेक्टरी या results डायरेक्टरी में देखकर। @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` अब यदि हम console आउटपुट को देखें, तो हम दो प्रोसेस सूचीबद्ध देखते हैं। @@ -891,13 +911,32 @@ nextflow run genomics.nf -profile test -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` यदि तुम्हारा workflow run सफल रहा, तो इसे तब तक फिर से चलाओ जब तक तुम्हें इस तरह की error न मिले: @@ -905,9 +944,9 @@ nextflow run genomics.nf -profile test -resume ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ nextflow run genomics.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` results डायरेक्टरी में अब प्रत्येक नमूने के लिए BAM और BAI फ़ाइलें (tuple से) शामिल हैं, साथ ही VCF आउटपुट भी: @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` इसे पहले जैसा ही परिणाम उत्पन्न करना चाहिए। हमारे simple वेरिएंट कॉलिंग workflow में अब वे सभी बुनियादी features हैं जो हम चाहते थे। diff --git a/docs/hi/docs/nf4_science/genomics/03_joint_calling.md b/docs/hi/docs/nf4_science/genomics/03_joint_calling.md index add36715d0..f0487bed79 100644 --- a/docs/hi/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/hi/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` Nextflow आउटपुट पहले जैसा ही दिखता है, लेकिन `.g.vcf` फ़ाइलें और उनकी इंडेक्स फ़ाइलें अब सबडायरेक्टरी में व्यवस्थित हैं। @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` पहले दो चरण पिछले रन से cached हैं, और नया `GATK_JOINTGENOTYPING` चरण सभी तीन नमूनों से एकत्रित इनपुट पर एक बार चलता है। diff --git a/docs/hi/docs/nf4_science/imaging/01_basics.md b/docs/hi/docs/nf4_science/imaging/01_basics.md index a0c18a5ab6..fa67d4ee09 100644 --- a/docs/hi/docs/nf4_science/imaging/01_basics.md +++ b/docs/hi/docs/nf4_science/imaging/01_basics.md @@ -6,7 +6,7 @@ Nextflow for Bioimaging प्रशिक्षण पाठ्यक्रम ## 1. workflow चलाएं -हम आपको `hello-world.nf` नाम की एक workflow स्क्रिप्ट प्रदान करते हैं जो `--greeting` नाम के command-line argument के माध्यम से इनपुट लेती है और उस greeting वाली एक text फ़ाइल बनाती है। +हम तुम्हें `hello-world.nf` नाम की एक workflow स्क्रिप्ट प्रदान करते हैं जो `--greeting` नाम के command-line argument के माध्यम से इनपुट लेती है और उस greeting वाली एक text फ़ाइल बनाती है। हम अभी कोड को नहीं देखेंगे; पहले देखते हैं कि इसे चलाना कैसा लगता है। ### 1.1. workflow लॉन्च करें और execution की निगरानी करें @@ -17,40 +17,40 @@ Nextflow for Bioimaging प्रशिक्षण पाठ्यक्रम nextflow run hello-world.nf --greeting 'Hello World!' ``` -आपका console आउटपुट कुछ इस तरह दिखना चाहिए: +तुम्हारा console आउटपुट कुछ इस तरह दिखना चाहिए: ```console title="Output" linenums="1" - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` -बधाई हो, आपने अभी-अभी अपना पहला Nextflow workflow चलाया! +बधाई हो, तुमने अभी-अभी अपना पहला Nextflow workflow चलाया! यहाँ सबसे महत्वपूर्ण आउटपुट आखिरी लाइन है (line 6): ```console title="Output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` यह हमें बताता है कि `sayHello` process एक बार सफलतापूर्वक executed हुआ (`1 of 1 ✔`)। -यह बढ़िया है, लेकिन आप सोच रहे होंगे: आउटपुट कहाँ है? +यह बढ़िया है, लेकिन तुम सोच रहे होंगे: आउटपुट कहाँ है? ### 1.2. `results` डायरेक्टरी में आउटपुट फ़ाइल खोजें यह workflow अपने आउटपुट को `results` नाम की डायरेक्टरी में publish करने के लिए configured है। -यदि आप अपनी वर्तमान डायरेक्टरी को देखें, तो आप देखेंगे कि जब आपने workflow चलाई, तो Nextflow ने `results` नाम की एक नई डायरेक्टरी बनाई, जिसमें `output.txt` नाम की एक फ़ाइल है। +यदि तुम अपनी वर्तमान डायरेक्टरी को देखो, तो तुम देखोगे कि जब तुमने workflow चलाई, तो Nextflow ने `results` नाम की एक नई डायरेक्टरी बनाई, जिसमें `output.txt` नाम की एक फ़ाइल है। ```console title="results/" linenums="1" results └── output.txt ``` -फ़ाइल खोलें; सामग्री आपके द्वारा command line पर दी गई greeting से मेल खानी चाहिए। +फ़ाइल खोलो; सामग्री तुम्हारे द्वारा command line पर दी गई greeting से मेल खानी चाहिए।
फ़ाइल सामग्री @@ -63,61 +63,61 @@ Hello World! यह बढ़िया है, हमारी workflow ने वह किया जो उसे करना था! -हालांकि, ध्यान रखें कि 'published' परिणाम वास्तविक आउटपुट की एक copy (या कुछ मामलों में symlink) है जो Nextflow ने तब उत्पन्न किया जब उसने workflow को execute किया। +हालांकि, ध्यान रखो कि 'published' परिणाम वास्तविक आउटपुट की एक copy (या कुछ मामलों में symlink) है जो Nextflow ने तब उत्पन्न किया जब उसने workflow को execute किया। तो अब, हम यह देखने के लिए अंदर झांकेंगे कि Nextflow ने वास्तव में कार्य कहाँ execute किया। !!! warning "चेतावनी" सभी workflows अपने आउटपुट को results डायरेक्टरी में publish करने के लिए set up नहीं होंगे, और/या डायरेक्टरी का नाम अलग हो सकता है। - इस section में थोड़ा आगे, हम आपको दिखाएंगे कि यह व्यवहार कहाँ निर्दिष्ट है। + इस section में थोड़ा आगे, हम तुम्हें दिखाएंगे कि यह व्यवहार कहाँ निर्दिष्ट है। ### 1.3. `work/` डायरेक्टरी में मूल आउटपुट और logs खोजें -जब आप एक workflow चलाते हैं, तो Nextflow workflow में प्रत्येक process के हर एक invocation के लिए एक अलग 'task directory' बनाता है (=pipeline में प्रत्येक चरण)। +जब तुम एक workflow चलाते हो, तो Nextflow workflow में प्रत्येक process के हर एक invocation के लिए एक अलग 'task directory' बनाता है (=pipeline में प्रत्येक चरण)। प्रत्येक के लिए, यह आवश्यक inputs को stage करेगा, संबंधित instruction(s) को execute करेगा और उस एक डायरेक्टरी के भीतर आउटपुट और log फ़ाइलें लिखेगा, जिसका नाम automatically hash का उपयोग करके दिया जाता है ताकि इसे unique बनाया जा सके। -ये सभी task directories आपकी वर्तमान डायरेक्टरी (जहाँ आप कमांड चला रहे हैं) के अंदर `work` नाम की डायरेक्टरी के अंतर्गत रहेंगी। +ये सभी task directories तुम्हारी वर्तमान डायरेक्टरी (जहाँ तुम कमांड चला रहे हो) के अंदर `work` नाम की डायरेक्टरी के अंतर्गत रहेंगी। यह भ्रमित करने वाला लग सकता है, तो देखते हैं कि यह व्यवहार में कैसा दिखता है। पहले चलाई गई workflow के console आउटपुट पर वापस जाते हुए, हमारे पास यह लाइन थी: ```console title="Excerpt of command output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` -देखें कि लाइन `[a3/7be2fa]` से कैसे शुरू होती है? -यह उस एक process call के लिए task directory path का एक संक्षिप्त रूप है, और आपको बताता है कि `work/` डायरेक्टरी path के भीतर `sayHello` process call का आउटपुट कहाँ मिलेगा। +देखो कि लाइन `[71/8143bd]` से कैसे शुरू होती है? +यह उस एक process call के लिए task directory path का एक संक्षिप्त रूप है, और तुम्हें बताता है कि `work/` डायरेक्टरी path के भीतर `sayHello` process call का आउटपुट कहाँ मिलेगा। -आप निम्नलिखित कमांड टाइप करके (अपने terminal में दिखाई देने वाले `a3/7be2fa` के साथ बदलते हुए) और path को autocomplete करने के लिए tab key दबाकर या asterisk जोड़कर पूरा path पा सकते हैं: +तुम निम्नलिखित कमांड टाइप करके (अपने terminal में दिखाई देने वाले `71/8143bd` के साथ बदलते हुए) और path को autocomplete करने के लिए tab key दबाकर या asterisk जोड़कर पूरा path पा सकते हो: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -यह पूरा path directory path देना चाहिए: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +यह पूरा path directory path देना चाहिए: `work/71/8143bd5ed3420e23c5f0dc1a05056d` देखते हैं कि वहाँ क्या है। !!! Tip "सुझाव" - यदि आप VSCode file explorer में task subdirectory की सामग्री ब्राउज़ करते हैं, तो आप सभी फ़ाइलें तुरंत देखेंगे। - हालांकि, log फ़ाइलें terminal में invisible होने के लिए set हैं, इसलिए यदि आप उन्हें देखने के लिए `ls` या `tree` का उपयोग करना चाहते हैं, तो आपको invisible फ़ाइलें प्रदर्शित करने के लिए संबंधित विकल्प set करना होगा। + यदि तुम VSCode file explorer में task subdirectory की सामग्री ब्राउज़ करते हो, तो तुम सभी फ़ाइलें तुरंत देखोगे। + हालांकि, log फ़ाइलें terminal में invisible होने के लिए set हैं, इसलिए यदि तुम उन्हें देखने के लिए `ls` या `tree` का उपयोग करना चाहते हो, तो तुम्हें invisible फ़ाइलें प्रदर्शित करने के लिए संबंधित विकल्प set करना होगा। ```bash tree -a work ``` -आपके सिस्टम पर सटीक subdirectory नाम अलग होंगे। +तुम्हारे सिस्टम पर सटीक subdirectory नाम अलग होंगे।
डायरेक्टरी सामग्री ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -130,13 +130,13 @@ work
-आपको तुरंत `output.txt` फ़ाइल पहचाननी चाहिए, जो वास्तव में `sayHello` process का मूल आउटपुट है जो `results` डायरेक्टरी में published हुआ। -यदि आप इसे खोलते हैं, तो आपको फिर से `Hello World!` greeting मिलेगी। +तुम्हें तुरंत `output.txt` फ़ाइल पहचाननी चाहिए, जो वास्तव में `sayHello` process का मूल आउटपुट है जो `results` डायरेक्टरी में published हुआ। +यदि तुम इसे खोलते हो, तो तुम्हें फिर से `Hello World!` greeting मिलेगी।
output.txt की फ़ाइल सामग्री -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -154,36 +154,35 @@ Hello World! - **`.command.sh`**: वह कमांड जो वास्तव में process call द्वारा चलाई गई थी - **`.exitcode`**: कमांड से परिणामी exit code -`.command.sh` फ़ाइल विशेष रूप से उपयोगी है क्योंकि यह आपको मुख्य कमांड दिखाती है जो Nextflow ने execute किया, सभी bookkeeping और task/environment setup को शामिल नहीं करते हुए। +`.command.sh` फ़ाइल विशेष रूप से उपयोगी है क्योंकि यह तुम्हें मुख्य कमांड दिखाती है जो Nextflow ने execute किया, सभी bookkeeping और task/environment setup को शामिल नहीं करते हुए।
फ़ाइल सामग्री -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
!!! Tip "सुझाव" - जब कुछ गलत हो जाता है और आपको troubleshoot करने की आवश्यकता होती है कि क्या हुआ, तो यह देखने के लिए `command.sh` स्क्रिप्ट को देखना उपयोगी हो सकता है कि Nextflow ने workflow instructions, variable interpolation आदि के आधार पर बिल्कुल कौन सी कमांड बनाई। + जब कुछ गलत हो जाता है और तुम्हें troubleshoot करने की आवश्यकता होती है कि क्या हुआ, तो यह देखने के लिए `command.sh` स्क्रिप्ट को देखना उपयोगी हो सकता है कि Nextflow ने workflow instructions, variable interpolation आदि के आधार पर बिल्कुल कौन सी कमांड बनाई। ### 1.4. वैकल्पिक अभ्यास: अलग-अलग greetings के साथ फिर से चलाएं -`--greeting` argument के लिए अलग-अलग मानों के साथ workflow को कुछ बार फिर से चलाने की कोशिश करें, फिर `results/` डायरेक्टरी और task directories दोनों की सामग्री देखें। +`--greeting` argument के लिए अलग-अलग मानों के साथ workflow को कुछ बार फिर से चलाने की कोशिश करो, फिर `results/` डायरेक्टरी और task directories दोनों की सामग्री देखो। -देखें कि कैसे isolated task directories के आउटपुट और logs संरक्षित हैं, जबकि `results` डायरेक्टरी की सामग्री बाद के executions के आउटपुट द्वारा overwrite हो जाती है। +देखो कि कैसे isolated task directories के आउटपुट और logs संरक्षित हैं, जबकि `results` डायरेक्टरी की सामग्री बाद के executions के आउटपुट द्वारा overwrite हो जाती है। -### निष्कर्ष +### सारांश -आप जानते हैं कि एक साधारण Nextflow स्क्रिप्ट कैसे चलाएं, इसके execution की निगरानी कैसे करें और इसके आउटपुट कैसे खोजें। +तुम जानते हो कि एक साधारण Nextflow स्क्रिप्ट कैसे चलाएं, इसके execution की निगरानी कैसे करें और इसके आउटपुट कैसे खोजें। ### आगे क्या है? -सीखें कि बुनियादी Nextflow स्क्रिप्ट कैसे पढ़ें और पहचानें कि इसके घटक इसकी functionality से कैसे संबंधित हैं। +सीखो कि बुनियादी Nextflow स्क्रिप्ट कैसे पढ़ें और पहचानें कि इसके घटक इसकी functionality से कैसे संबंधित हैं। --- @@ -331,24 +330,24 @@ workflow { ## 3. workflow executions प्रबंधित करें -Workflows लॉन्च करना और आउटपुट प्राप्त करना जानना बढ़िया है, लेकिन आप जल्दी पाएंगे कि workflow management के कुछ अन्य पहलू हैं जो आपके जीवन को आसान बना देंगे। +Workflows लॉन्च करना और आउटपुट प्राप्त करना जानना बढ़िया है, लेकिन तुम जल्दी पाओगे कि workflow management के कुछ अन्य पहलू हैं जो तुम्हारे जीवन को आसान बना देंगे। -यहाँ हम आपको दिखाते हैं कि जब आपको उसी workflow को फिर से लॉन्च करना हो तो `resume` feature का लाभ कैसे उठाएं, `nextflow log` के साथ execution logs की जांच कैसे करें, और `nextflow clean` के साथ पुरानी work directories को कैसे delete करें। +यहाँ हम तुम्हें दिखाते हैं कि जब तुम्हें उसी workflow को फिर से लॉन्च करना हो तो `resume` feature का लाभ कैसे उठाएं, `nextflow log` के साथ execution logs की जांच कैसे करें, और `nextflow clean` के साथ पुरानी work directories को कैसे delete करें। ### 3.1. `-resume` के साथ workflow को फिर से लॉन्च करें -कभी-कभी, आप एक pipeline को फिर से चलाना चाहेंगे जिसे आपने पहले लॉन्च किया था, बिना उस काम को फिर से किए जो पहले ही सफलतापूर्वक पूरा हो चुका है। +कभी-कभी, तुम एक pipeline को फिर से चलाना चाहोगे जिसे तुमने पहले लॉन्च किया था, बिना उस काम को फिर से किए जो पहले ही सफलतापूर्वक पूरा हो चुका है। -Nextflow में `-resume` नामक एक विकल्प है जो आपको ऐसा करने की अनुमति देता है। +Nextflow में `-resume` नामक एक विकल्प है जो तुम्हें ऐसा करने की अनुमति देता है। विशेष रूप से, इस mode में, कोई भी processes जो पहले से ही बिल्कुल वही कोड, settings और inputs के साथ चलाई जा चुकी हैं, skip की जाएंगी। -इसका मतलब है कि Nextflow केवल उन processes को चलाएगा जिन्हें आपने पिछली बार से जोड़ा या संशोधित किया है, या जिन्हें आप नई settings या inputs प्रदान कर रहे हैं। +इसका मतलब है कि Nextflow केवल उन processes को चलाएगा जिन्हें तुमने पिछली बार से जोड़ा या संशोधित किया है, या जिन्हें तुम नई settings या inputs प्रदान कर रहे हो। ऐसा करने के दो मुख्य फायदे हैं: -- यदि आप एक pipeline विकसित करने के बीच में हैं, तो आप अधिक तेजी से iterate कर सकते हैं क्योंकि आपको अपने परिवर्तनों का परीक्षण करने के लिए केवल उस process(es) को चलाना होगा जिस पर आप सक्रिय रूप से काम कर रहे हैं। -- यदि आप production में एक pipeline चला रहे हैं और कुछ गलत हो जाता है, तो कई मामलों में आप समस्या को ठीक कर सकते हैं और pipeline को फिर से लॉन्च कर सकते हैं, और यह failure के बिंदु से चलना resume करेगा, जो आपका बहुत समय और compute बचा सकता है। +- यदि तुम एक pipeline विकसित करने के बीच में हो, तो तुम अधिक तेजी से iterate कर सकते हो क्योंकि तुम्हें अपने परिवर्तनों का परीक्षण करने के लिए केवल उस process(es) को चलाना होगा जिस पर तुम सक्रिय रूप से काम कर रहे हो। +- यदि तुम production में एक pipeline चला रहे हो और कुछ गलत हो जाता है, तो कई मामलों में तुम समस्या को ठीक कर सकते हो और pipeline को फिर से लॉन्च कर सकते हो, और यह failure के बिंदु से चलना resume करेगा, जो तुम्हारा बहुत समय और compute बचा सकता है। -इसका उपयोग करने के लिए, बस अपनी कमांड में `-resume` जोड़ें और इसे चलाएं: +इसका उपयोग करने के लिए, बस अपनी कमांड में `-resume` जोड़ो और इसे चलाओ: ```bash nextflow run hello-world.nf --greeting 'Hello World!' -resume @@ -357,25 +356,25 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Process status line (line 5) में जोड़े गए `cached:` bit को देखें, जिसका अर्थ है कि Nextflow ने पहचान लिया है कि उसने यह काम पहले ही कर लिया है और बस पिछले सफल run के परिणाम का पुन: उपयोग किया। +Process status line में जोड़े गए `cached:` bit को देखो, जिसका अर्थ है कि Nextflow ने पहचान लिया है कि उसने यह काम पहले ही कर लिया है और बस पिछले सफल run के परिणाम का पुन: उपयोग किया। -आप यह भी देख सकते हैं कि work subdirectory hash पिछले run के समान है। -Nextflow सचमुच आपको पिछले execution की ओर इशारा कर रहा है और कह रहा है "मैंने वह पहले ही वहाँ कर दिया।" +तुम यह भी देख सकते हो कि work subdirectory hash पिछले run के समान है। +Nextflow सचमुच तुम्हें पिछले execution की ओर इशारा कर रहा है और कह रहा है "मैंने वह पहले ही वहाँ कर दिया।" !!! Tip "सुझाव" - जब आप `resume` के साथ pipeline को फिर से चलाते हैं, तो Nextflow किसी भी process call द्वारा `publishDir` डायरेक्टरी में लिखी गई किसी भी फ़ाइल को overwrite नहीं करता है जो पहले सफलतापूर्वक चलाई गई थी। + जब तुम `resume` के साथ pipeline को फिर से चलाते हो, तो Nextflow किसी भी process call द्वारा `publishDir` डायरेक्टरी में लिखी गई किसी भी फ़ाइल को overwrite नहीं करता है जो पहले सफलतापूर्वक चलाई गई थी। ### 3.2. पिछले executions के log की जांच करें -जब भी आप nextflow workflow लॉन्च करते हैं, तो वर्तमान working डायरेक्टरी में `.nextflow` नामक एक hidden डायरेक्टरी के अंतर्गत `history` नामक log फ़ाइल में एक line लिखी जाती है। +जब भी तुम nextflow workflow लॉन्च करते हो, तो वर्तमान working डायरेक्टरी में `.nextflow` नामक एक hidden डायरेक्टरी के अंतर्गत `history` नामक log फ़ाइल में एक line लिखी जाती है। इस जानकारी तक पहुँचने का एक अधिक सुविधाजनक तरीका `nextflow log` कमांड का उपयोग करना है। @@ -383,28 +382,28 @@ Nextflow सचमुच आपको पिछले execution की ओर nextflow log ``` -यह log फ़ाइल की सामग्री को terminal में आउटपुट करेगा, आपको timestamp, run name, status, और वर्तमान working डायरेक्टरी के भीतर से लॉन्च किए गए हर Nextflow run के लिए पूरी command line दिखाएगा। +यह log फ़ाइल की सामग्री को terminal में आउटपुट करेगा, तुम्हें timestamp, run name, status, और वर्तमान working डायरेक्टरी के भीतर से लॉन्च किए गए हर Nextflow run के लिए पूरी command line दिखाएगा। ### 3.3. पुरानी work directories delete करें -विकास प्रक्रिया के दौरान, आप आमतौर पर अपनी draft pipelines को बड़ी संख्या में चलाएंगे, जो कई subdirectories में बहुत सारी फ़ाइलों के संचय का कारण बन सकता है। +विकास प्रक्रिया के दौरान, तुम आमतौर पर अपनी draft pipelines को बड़ी संख्या में चलाओगे, जो कई subdirectories में बहुत सारी फ़ाइलों के संचय का कारण बन सकता है। चूंकि subdirectories का नाम randomly दिया जाता है, इसलिए उनके नामों से यह बताना मुश्किल है कि पुरानी बनाम अधिक हाल की runs क्या हैं। -Nextflow में एक सुविधाजनक `clean` subcommand शामिल है जो automatically पिछली runs के लिए work subdirectories को delete कर सकता है जिनकी आपको अब परवाह नहीं है, कई [options](https://www.nextflow.io/docs/latest/reference/cli.html#clean) के साथ यह नियंत्रित करने के लिए कि क्या deleted किया जाएगा। +Nextflow में एक सुविधाजनक `clean` subcommand शामिल है जो automatically पिछली runs के लिए work subdirectories को delete कर सकता है जिनकी तुम्हें अब परवाह नहीं है, कई [options](https://www.nextflow.io/docs/latest/reference/cli.html#clean) के साथ यह नियंत्रित करने के लिए कि क्या deleted किया जाएगा। -आप Nextflow log का उपयोग करके timestamp और/या command line के आधार पर एक run को देख सकते हैं, फिर पहले की runs से work directories को delete करने के लिए `nextflow clean -before -f` का उपयोग कर सकते हैं। +तुम Nextflow log का उपयोग करके timestamp और/या command line के आधार पर एक run को देख सकते हो, फिर पहले की runs से work directories को delete करने के लिए `nextflow clean -before -f` का उपयोग कर सकते हो। !!! Warning "चेतावनी" पिछली runs से work subdirectories को delete करना उन्हें Nextflow के cache से हटा देता है और उन directories में संग्रहीत किसी भी आउटपुट को delete कर देता है। इसका मतलब है कि यह संबंधित processes को फिर से चलाए बिना execution को resume करने की Nextflow की क्षमता को तोड़ देता है। - किसी भी आउटपुट को सहेजना आपकी जिम्मेदारी है जिसकी आपको परवाह है या जिस पर आप निर्भर रहने की योजना बनाते हैं! यदि आप इस उद्देश्य के लिए `publishDir` directive का उपयोग कर रहे हैं, तो सुनिश्चित करें कि `copy` mode का उपयोग करें, `symlink` mode का नहीं। + किसी भी आउटपुट को सहेजना तुम्हारी जिम्मेदारी है जिसकी तुम्हें परवाह है या जिस पर तुम निर्भर रहने की योजना बनाते हो! यदि तुम इस उद्देश्य के लिए `publishDir` directive का उपयोग कर रहे हो, तो सुनिश्चित करो कि `copy` mode का उपयोग करो, `symlink` mode का नहीं। -### निष्कर्ष +### सारांश -आप जानते हैं कि pipeline को उन steps को दोहराए बिना कैसे फिर से लॉन्च करें जो पहले ही identical तरीके से चलाए गए थे, execution log की जांच करें, और पुरानी work directories को साफ करने के लिए `nextflow clean` कमांड का उपयोग करें। +तुम जानते हो कि pipeline को उन steps को दोहराए बिना कैसे फिर से लॉन्च करें जो पहले ही identical तरीके से चलाए गए थे, execution log की जांच करें, और पुरानी work directories को साफ करने के लिए `nextflow clean` कमांड का उपयोग करें। ### आगे क्या है? -अब जब आप बुनियादी Nextflow operations समझते हैं, तो आप nf-core/molkart के साथ एक वास्तविक bioimaging pipeline चलाने के लिए तैयार हैं। +अब जब तुम बुनियादी Nextflow operations समझते हो, तो तुम nf-core/molkart के साथ एक वास्तविक bioimaging pipeline चलाने के लिए तैयार हो। diff --git a/docs/hi/docs/nf4_science/imaging/02_run_molkart.md b/docs/hi/docs/nf4_science/imaging/02_run_molkart.md index af443f7f50..dc84920d72 100644 --- a/docs/hi/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/hi/docs/nf4_science/imaging/02_run_molkart.md @@ -70,26 +70,34 @@ git clone --branch 1.2.0 --depth 1 https://github.com/nf-core/molkart पूर्ण पाइपलाइन चलाने से पहले, आइए जानें कि nf-core पाइपलाइनों के लिए कंटेनर क्यों आवश्यक हैं। -आइए molkart टेस्ट कॉन्फ़िगरेशन से टेस्ट डेटासेट और पैरामीटर का उपयोग करके पाइपलाइन चलाने का प्रयास करें: - -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +हम पाइपलाइन के पैरामीटर एक parameter file का उपयोग करके देंगे। +एक parameter file एक YAML फ़ाइल होती है जो प्रत्येक पैरामीटर और उसके मान को सूचीबद्ध करती है, जो टाइप किए गए मानों (जैसे integers) को सुरक्षित रखती है और कमांड लाइन को संक्षिप्त रखती है। + +एक `params.yaml` फ़ाइल पहले से ही working directory में उपलब्ध है: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` -आइए इन पैरामीटर्स को समझें: +ये पैरामीटर हैं: + +- `input`: नमूना मेटाडेटा युक्त samplesheet का पथ +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: ग्रिड पैटर्न फिलिंग के लिए पैरामीटर +- `clahe_pyramid_tile`: कंट्रास्ट एन्हांसमेंट के लिए कर्नेल साइज़ +- `segmentation_method`: सेल सेगमेंटेशन के लिए कौन सा/से एल्गोरिदम उपयोग करना है +- `outdir`: परिणाम कहां सेव करने हैं -- `--input`: नमूना मेटाडेटा युक्त samplesheet का पथ -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: ग्रिड पैटर्न फिलिंग के लिए पैरामीटर -- `--clahe_pyramid_tile`: कंट्रास्ट एन्हांसमेंट के लिए कर्नेल साइज़ -- `--segmentation_method`: सेल सेगमेंटेशन के लिए कौन सा एल्गोरिदम उपयोग करना है -- `--outdir`: परिणाम कहां सेव करने हैं +आइए इन पैरामीटर्स का उपयोग करके पाइपलाइन चलाने का प्रयास करें: + +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "यह कमांड विफल होगी - यह जानबूझकर है!" @@ -172,17 +180,10 @@ process { } ``` -अब समान कमांड के साथ पाइपलाइन फिर से चलाएं: +अब पाइपलाइन फिर से चलाएं, इस बार तीनों segmentation methods चलाएं ताकि हम बाद में उनकी तुलना कर सकें: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` इस बार, Nextflow: @@ -209,12 +210,13 @@ nextflow run ./molkart \ ??? success "कमांड आउटपुट" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ nextflow run ./molkart \ |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ nextflow run ./molkart \ https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,14 +300,14 @@ executor लाइन `executor > local (22)` आपको बताती ह प्रत्येक प्रोसेस लाइन दिखाती है: -- **Hash** (`[1a/2b3c4d]`): work डायरेक्टरी आइडेंटिफ़ायर (पहले की तरह) +- **Hash** (`[b4/e57ff1]`): work डायरेक्टरी आइडेंटिफ़ायर (पहले की तरह) - **Process name**: पूर्ण मॉड्यूल पथ और प्रोसेस नाम - **Input identifier**: कोष्ठक में नमूना नाम -- **Progress**: पूर्णता का प्रतिशत और गिनती (जैसे, `1 of 1 ✔`) +- **Progress**: कार्य गिनती और पूर्णता स्थिति (जैसे, `1 of 1 ✔`) -### निष्कर्ष +### सारांश -आप जानते हैं कि टेस्ट डेटा के साथ nf-core पाइपलाइन कैसे लॉन्च करें और इसके निष्पादन आउटपुट की व्याख्या कैसे करें। +तुम जानते हो कि टेस्ट डेटा के साथ nf-core पाइपलाइन कैसे लॉन्च करें और इसके निष्पादन आउटपुट की व्याख्या कैसे करें। ### आगे क्या है? @@ -372,7 +369,7 @@ MultiQC रिपोर्ट एक व्यापक HTML फ़ाइल ह - सेगमेंटेशन गुणवत्ता मेट्रिक्स - पाई गई सेल्स और स्पॉट्स की संख्या -!!! Tip +!!! Tip "सुझाव" MultiQC रिपोर्ट आमतौर पर सभी nf-core पाइपलाइनों में शामिल होती हैं। वे हमेशा पाइपलाइन निष्पादन और डेटा गुणवत्ता का उच्च-स्तरीय अवलोकन प्रदान करती हैं। @@ -426,7 +423,7 @@ code results/pipeline_info/execution_report.html - CPU और मेमोरी उपयोग - कौन से कार्य कैश्ड थे बनाम निष्पादित -!!! Tip +!!! Tip "सुझाव" ये रिपोर्ट संसाधन आवंटन को अनुकूलित करने और प्रदर्शन समस्याओं को ट्रबलशूट करने के लिए अविश्वसनीय रूप से उपयोगी हैं। @@ -447,7 +444,7 @@ work डायरेक्टरी के बारे में जाने ### 4.1. work डायरेक्टरी संरचना को समझना work डायरेक्टरी में निष्पादित प्रत्येक कार्य के लिए एक subdirectory होती है। -22 कार्यों वाली इस पाइपलाइन के लिए, 22 work subdirectories होंगी। +22 कार्यों वाली इस पाइपलाइन रन के लिए, 22 work subdirectories होंगी। work डायरेक्टरी की सूची बनाएं: @@ -465,7 +462,7 @@ console आउटपुट से एक सेगमेंटेशन प् ls -la work/3m/4n5o6p*/ ``` -आपको दिखेगा: +तुम्हें दिखेगा: - **.command.\* फ़ाइलें**: Nextflow निष्पादन स्क्रिप्ट और लॉग (पहले की तरह) - **Staged इनपुट फ़ाइलें**: वास्तविक इनपुट फ़ाइलों के symlinks @@ -477,24 +474,24 @@ Hello World से मुख्य अंतर: - आउटपुट फ़ाइलें काफी बड़ी हो सकती हैं (सेगमेंटेशन मास्क, प्रोसेस्ड इमेज) - प्रति कार्य कई इनपुट और आउटपुट फ़ाइलें -!!! Tip +!!! Tip "सुझाव" - यदि कोई प्रोसेस विफल होती है, तो आप उसकी work डायरेक्टरी पर नेविगेट कर सकते हैं, एरर संदेशों के लिए `.command.err` की जांच कर सकते हैं, और समस्या को debug करने के लिए `.command.sh` को मैन्युअली फिर से चला भी सकते हैं। + यदि कोई प्रोसेस विफल होती है, तो तुम उसकी work डायरेक्टरी पर नेविगेट कर सकते हो, एरर संदेशों के लिए `.command.err` की जांच कर सकते हो, और समस्या को debug करने के लिए `.command.sh` को मैन्युअली फिर से चला भी सकते हो। ### 4.3. work डायरेक्टरी की सफाई कई पाइपलाइन रन पर work डायरेक्टरी काफी बड़ी हो सकती है। -जैसा कि हमने भाग 1 में सीखा, आप पुराने रन से work डायरेक्टरियों को हटाने के लिए `nextflow clean` का उपयोग कर सकते हैं। +जैसा कि हमने भाग 1 में सीखा, तुम पुराने रन से work डायरेक्टरियों को हटाने के लिए `nextflow clean` का उपयोग कर सकते हो। हालांकि, बड़ी intermediate फ़ाइलों वाली nf-core पाइपलाइनों के लिए, नियमित रूप से साफ करना विशेष रूप से महत्वपूर्ण है। -### निष्कर्ष +### सारांश -आप समझते हैं कि nf-core पाइपलाइनें अपनी work डायरेक्टरियों को कैसे व्यवस्थित करती हैं और debugging के लिए व्यक्तिगत कार्यों का निरीक्षण कैसे करें। +तुम समझते हो कि nf-core पाइपलाइनें अपनी work डायरेक्टरियों को कैसे व्यवस्थित करती हैं और debugging के लिए व्यक्तिगत कार्यों का निरीक्षण कैसे करें। ### आगे क्या है? -Nextflow cache के बारे में जानें और विफल पाइपलाइन रन को कैसे resume करें। +Nextflow cache के बारे में जानो और विफल पाइपलाइन रन को कैसे resume करें। --- @@ -517,30 +514,29 @@ Nextflow की सबसे शक्तिशाली विशेषता समान कमांड फिर से चलाएं, लेकिन `-resume` जोड़ें: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -आपको इस तरह का आउटपुट दिखना चाहिए: +आपको इस तरह का आउटपुट दिखना चाहिए: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -ध्यान दें प्रत्येक प्रोसेस के लिए `cached: 2` या `cached: 1` - कुछ भी फिर से निष्पादित नहीं किया गया! +ध्यान दें प्रत्येक प्रीप्रोसेसिंग और segmentation प्रोसेस पर `cached: N` का एनोटेशन - वे कार्य फिर से निष्पादित होने के बजाय पुन: उपयोग किए गए। ### 5.3. resume कब उपयोगी है @@ -551,15 +547,15 @@ Resume विशेष रूप से मूल्यवान है जब: - डेटा डाउनलोड के दौरान आपका नेटवर्क कनेक्शन टूट जाता है - आप गणना को फिर से किए बिना अतिरिक्त आउटपुट जोड़ना चाहते हैं -!!! Warning +!!! Warning "चेतावनी" Resume केवल तभी काम करता है जब आपने इनपुट डेटा, पाइपलाइन कोड, या पैरामीटर को नहीं बदला हो। यदि आप इनमें से किसी को भी बदलते हैं, तो Nextflow सही ढंग से प्रभावित कार्यों को फिर से चलाएगा। -### निष्कर्ष +### सारांश -आप जानते हैं कि सफल कार्यों को दोहराए बिना पाइपलाइनों को कुशलतापूर्वक फिर से चलाने के लिए `-resume` का उपयोग कैसे करें। +तुम जानते हो कि सफल कार्यों को दोहराए बिना पाइपलाइनों को कुशलतापूर्वक फिर से चलाने के लिए `-resume` का उपयोग कैसे करें। ### आगे क्या है? -अब जब आप टेस्ट डेटा के साथ nf-core/molkart चला सकते हैं, तो आप अपने स्वयं के डेटासेट के लिए इसे कॉन्फ़िगर करना सीखने के लिए तैयार हैं। +अब जब तुम टेस्ट डेटा के साथ nf-core/molkart चला सकते हो, तो तुम अपने स्वयं के डेटासेट के लिए इसे कॉन्फ़िगर करना सीखने के लिए तैयार हो। diff --git a/docs/hi/docs/nf4_science/imaging/03_inputs.md b/docs/hi/docs/nf4_science/imaging/03_inputs.md index cb77bf5d37..2547b1b45c 100644 --- a/docs/hi/docs/nf4_science/imaging/03_inputs.md +++ b/docs/hi/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ ### 1.1. लंबी कमांड लाइनों की समस्या -भाग 2 से हमारी कमांड याद करें: +भाग 2 में हमने पहले से ही एक पैरामीटर फ़ाइल का उपयोग किया था ताकि कमांड छोटी रहे और टाइप किए गए मान (जैसे integer प्रीप्रोसेसिंग पैरामीटर) सही बने रहें: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -यह काम करता है, लेकिन इसे पुनः उत्पन्न करना, साझा करना या संशोधित करना कठिन है। -यदि आपको अगले महीने फिर से वही विश्लेषण चलाने की आवश्यकता हो तो क्या होगा? -यदि कोई सहयोगी आपकी सटीक सेटिंग्स का उपयोग करना चाहता है तो क्या होगा? +कमांड लाइन पर कई पैरामीटर अलग-अलग पास करना पुनः उत्पन्न करना, साझा करना या संशोधित करना कठिन होता है। +यदि तुम्हें अगले महीने फिर से वही विश्लेषण चलाने की आवश्यकता हो तो क्या होगा? +यदि कोई सहयोगी तुम्हारी सटीक सेटिंग्स का उपयोग करना चाहता है तो क्या होगा? +एक पैरामीटर फ़ाइल इसे हल करती है। -### 1.2. समाधान: पैरामीटर फ़ाइल का उपयोग करें +### 1.2. पैरामीटर फ़ाइल -`params.yaml` नाम की एक फ़ाइल बनाएं: +यहाँ वह `params.yaml` फ़ाइल है जिसका हम उपयोग कर रहे हैं: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,34 +34,37 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -अब आपकी कमांड बन जाती है: +प्रत्येक पैरामीटर `key: value` जोड़े के रूप में लिखा जाता है। +integers को बिना quotes के लिखना (उदाहरण के लिए `mindagap_tilesize: 90`) उनके integer प्रकार को बनाए रखता है, जिसकी pipeline के पैरामीटर validation को आवश्यकता होती है। + +तुम्हारी कमांड बन जाती है: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -बस इतना ही! पैरामीटर फ़ाइल आपके सटीक कॉन्फ़िगरेशन को दस्तावेज़ित करती है और इसे फिर से चलाना या साझा करना आसान बनाती है। +पैरामीटर फ़ाइल तुम्हारे सटीक कॉन्फ़िगरेशन को दस्तावेज़ित करती है और इसे फिर से चलाना या साझा करना आसान बनाती है। ### 1.3. पैरामीटर को ओवरराइड करना -आप अभी भी कमांड लाइन से विशिष्ट पैरामीटर को ओवरराइड कर सकते हैं: +तुम अभी भी कमांड लाइन से विशिष्ट पैरामीटर को ओवरराइड कर सकते हो: ```bash nextflow run ./molkart -params-file params.yaml --segmentation_method "stardist" --outdir stardist_results -resume ``` -उपरोक्त लाइन `segmentation_method` को `stardist` में बदल देती है और `--outdir` नाम को `params.yaml` फ़ाइल में दिए गए पैरामीटर के बजाय `stardist_results` में बदल देती है। -इसके अतिरिक्त, आप देख सकते हैं कि `-resume` फ़्लैग ने हमें पिछले रन से प्री-प्रोसेसिंग परिणामों का पुन: उपयोग करने की अनुमति दी, जिससे समय की बचत हुई। -आप इस पैटर्न का उपयोग pipeline के विभिन्न विविधताओं का शीघ्रता से परीक्षण करने के लिए कर सकते हैं। +उपरोक्त लाइन `segmentation_method` को `stardist` में बदल देती है और `--outdir` नाम को `stardist_results` में बदल देती है, न कि `params.yaml` फ़ाइल में दिए गए पैरामीटर के अनुसार। +इसके अतिरिक्त, तुम देख सकते हो कि `-resume` फ़्लैग ने हमें पिछले रन से प्री-प्रोसेसिंग परिणामों का पुन: उपयोग करने की अनुमति दी, जिससे समय की बचत हुई। +तुम इस पैटर्न का उपयोग pipeline के विभिन्न विविधताओं का शीघ्रता से परीक्षण करने के लिए कर सकते हो। ### मुख्य बात -पैरामीटर फ़ाइलें आपके विश्लेषण को पुनरुत्पादनीय और साझा करने में आसान बनाती हैं। -किसी भी वास्तविक विश्लेषण कार्य के लिए इनका उपयोग करें। +पैरामीटर फ़ाइलें तुम्हारे विश्लेषण को पुनरुत्पादनीय और साझा करने में आसान बनाती हैं। +किसी भी वास्तविक विश्लेषण कार्य के लिए इनका उपयोग करो। ### आगे क्या? -जानें कि samplesheets कैसे कई नमूनों के बारे में जानकारी को व्यवस्थित करती हैं। +जानो कि samplesheets कैसे कई नमूनों के बारे में जानकारी को व्यवस्थित करती हैं। --- @@ -125,7 +122,7 @@ sample,nuclear_image,spot_table,membrane_image mem_only,data/nuclear.tiff,data/spots.txt,data/membrane.tiff ``` -!!! warning "चेतावनी" +!!! Warning "चेतावनी" ध्यान दें कि samplesheet में पथ वहाँ से सापेक्ष हैं जहाँ आप Nextflow **चलाते** हैं, न कि जहाँ samplesheet स्थित है। diff --git a/docs/hi/docs/nf4_science/imaging/04_config.md b/docs/hi/docs/nf4_science/imaging/04_config.md index d3134e6c2b..79b814c8a5 100644 --- a/docs/hi/docs/nf4_science/imaging/04_config.md +++ b/docs/hi/docs/nf4_science/imaging/04_config.md @@ -131,19 +131,20 @@ nextflow run ./molkart \ यदि parameters, inputs, और code समान हैं, तो सभी tasks cache से पुनर्प्राप्त किए जाएंगे और pipeline लगभग तुरंत पूरा हो जाएगा। ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -ध्यान दें कि सभी processes `cached: 2` या `cached: 1` दिखाते हैं - कुछ भी फिर से execute नहीं किया गया! +ध्यान दें कि प्रत्येक process पर `cached: N` annotation है - cached preprocessing और segmentation tasks फिर से execute नहीं किए गए। ### 2.4. Test profiles -Test profiles default input parameters और datafiles को निर्दिष्ट करने के त्वरित तरीके प्रदान करते हैं ताकि आप सत्यापित कर सकें कि pipeline काम करता है। +Test profiles default input parameters और datafiles को निर्दिष्ट करने के त्वरित तरीके प्रदान करते हैं ताकि तुम सत्यापित कर सको कि pipeline काम करता है। nf-core pipelines में हमेशा कम से कम दो test profiles शामिल होंगे: - `test`: त्वरित testing के लिए छोटा dataset और fast parameters @@ -184,7 +185,7 @@ process { ध्यान दें कि इस profile में वही parameters हैं जो हमने पहले अपनी `params.yaml` फ़ाइल में उपयोग किए थे। -आप कॉमा से अलग करके कई profiles को सक्रिय कर सकते हैं। +तुम कॉमा से अलग करके कई profiles को सक्रिय कर सकते हो। आइए इसका उपयोग करके अपनी params फ़ाइल की आवश्यकता के बिना अपने pipeline को test करें: ```bash @@ -198,10 +199,10 @@ nextflow run ./molkart -profile docker,test --outdir results -resume Profiles बाएं से दाएं applied होते हैं, इसलिए बाद के profiles पहले वाले को override करते हैं यदि वे समान values set करते हैं। -### निष्कर्ष +### सारांश nf-core pipelines containers, testing, और विशेष environments के लिए built-in profiles के साथ आते हैं। -आप अपनी आवश्यकता के अनुसार configuration बनाने के लिए कई profiles को combine कर सकते हैं। +तुम अपनी आवश्यकता के अनुसार configuration बनाने के लिए कई profiles को combine कर सकते हो। ### आगे क्या है? diff --git a/docs/hi/docs/nf4_science/rnaseq/02_single-sample.md b/docs/hi/docs/nf4_science/rnaseq/02_single-sample.md index e1ed037ab5..b1222f11d1 100644 --- a/docs/hi/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/hi/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` यह बहुत जल्दी चलना चाहिए अगर तुमने भाग 1 पर काम किया है और पहले से ही कंटेनर को pull कर लिया है। @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` यह भी बहुत जल्दी चलना चाहिए, क्योंकि हम इतनी छोटी इनपुट फ़ाइल पर चला रहे हैं। @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` तुम results डायरेक्टरी में alignment outputs पा सकते हो। diff --git a/docs/hi/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/hi/docs/nf4_science/rnaseq/03_multi-sample.md index 32d8011aa1..8284560f4c 100644 --- a/docs/hi/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/hi/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` इस बार हर चरण 6 बार चलता है, CSV फ़ाइल में हर नमूने के लिए एक बार। @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` कैश किए गए process कॉलों के बाद MULTIQC के लिए एक एकल कॉल जोड़ा गया है। @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` अब हमारे पास हमारे workflow के दो थोड़े भिन्न संस्करण हैं, एक single-end रीड डेटा के लिए और एक युग्मित-अंत डेटा के लिए। diff --git a/docs/hi/docs/side_quests/debugging/index.md b/docs/hi/docs/side_quests/debugging/index.md index 3ce896d165..bf6917f32f 100644 --- a/docs/hi/docs/side_quests/debugging/index.md +++ b/docs/hi/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. गलत प्रोसेस कीवर्ड या निर्देशों का उपयोग @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. गलत वेरिएबल नामों का उपयोग @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ workflow { val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // script से पहले Groovy कोड में वेरिएबल परिभाषित करो @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Bash वेरिएबल का गलत उपयोग @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Groovy बनाम Bash वेरिएबल" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` अपने इनपुट चैनल को workflow ब्लॉक के भीतर परिभाषित रखो, और सामान्य रूप से एक्सटेंशन द्वारा की गई किसी भी अन्य सिफारिश का पालन करो। @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` इस उदाहरण की तुलना में अधिक सामान्य रूप से, तुम किसी प्रोसेस में अतिरिक्त इनपुट जोड़ सकते हो और workflow call को तदनुसार अपडेट करना भूल सकते हो, जो इस प्रकार की एरर का कारण बन सकता है। सौभाग्य से, यह समझने और ठीक करने में आसान एरर में से एक है, क्योंकि एरर मैसेज बेमेल के बारे में काफी स्पष्ट है। @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "कमांड आउटपुट" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` यह वर्कफ़्लो बिना एरर के पूरा होता है, लेकिन यह केवल एक नमूना प्रोसेस करता है! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` अब तुम्हें केवल एक के बजाय तीनों नमूने प्रोसेस होते दिखने चाहिए। @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "कमांड आउटपुट" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. चैनल डीबगिंग तकनीकें @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1518,7 +1518,7 @@ process PROCESS_FILES { sample3_output.txt ``` -इस उदाहरण के लिए यह हमें उजागर करेगा कि जबकि हमारी अपेक्षित `sample3.txt` मौजूद नहीं थी, `sample3_output.txt` थी। +इस उदाहरण के लिए यह हमें उजागर करेगा कि आउटपुट फ़ाइल नाम में एक `_output` suffix जोड़ा जा रहा है, जो हमारी `output:` परिभाषा के विपरीत है। #### कोड ठीक करो @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. गायब सॉफ़्टवेयर @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "कमांड आउटपुट" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "नोट" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker चलो `bad_resources.nf` की जांच करते हैं: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // एरर: अवास्तविक time limit input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -अगर तुम अपने एरर मैसेज ध्यान से पढ़ते हो तो इस तरह की विफलताएं तुम्हें लंबे समय तक परेशान नहीं करनी चाहिए। लेकिन सुनिश्चित करो कि तुम उन कमांड की रिसोर्स आवश्यकताओं को समझते हो जो तुम चला रहे हो ताकि तुम अपने resource निर्देशों को उचित रूप से कॉन्फ़िगर कर सको। +`local` executor पर एरर scheduler की तुलना में कम स्पष्ट होती है: तुम्हें time limit का नाम लेने वाले मैसेज की बजाय `process hasn't exited` और `WARN: Killing running tasks` मिलता है। यहाँ समझने वाली बात यह है कि Nextflow एक कार्य को तब kill करता है जब वह तुम्हारे द्वारा दिए गए रिसोर्स से अधिक हो जाता है, इसलिए जब कोई प्रोसेस script-level एरर के बिना terminate हो जाए, तो उसके resource निर्देशों की जांच करो। यहाँ दोषी `time` निर्देश है, जो प्रोसेस के काम के लिए बहुत कम है। सुनिश्चित करो कि तुम उन कमांड की रिसोर्स आवश्यकताओं को समझते हो जो तुम चला रहे हो ताकि तुम अपने resource निर्देशों को उचित रूप से कॉन्फ़िगर कर सको। ### 3.4. प्रोसेस डीबगिंग तकनीकें @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### कोड की जांच करो @@ -2234,7 +2222,7 @@ nextflow run workflow.nf -profile debug ### 4.5. व्यावहारिक डीबगिंग अभ्यास -अब व्यवस्थित डीबगिंग तरीके कोव्यवहार में लाने का समय है। वर्कफ़्लो `buggy_workflow.nf` में कई सामान्य एरर हैं जो वास्तविक दुनिया के विकास में आने वाली समस्याओं के प्रकारों का प्रतिनिधित्व करती हैं। +अब व्यवस्थित डीबगिंग तरीके को व्यवहार में लाने का समय है। वर्कफ़्लो `buggy_workflow.nf` में कई सामान्य एरर हैं जो वास्तविक दुनिया के विकास में आने वाली समस्याओं के प्रकारों का प्रतिनिधित्व करती हैं। !!! exercise "अभ्यास" @@ -2249,16 +2237,20 @@ nextflow run workflow.nf -profile debug ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - यह cryptic एरर `params{}` ब्लॉक में लाइन 11-12 के आसपास एक parsing समस्या इंगित करती है। v2 parser संरचनात्मक समस्याओं को जल्दी पकड़ता है। + parser लाइन 25 (`script:`) की ओर इशारा करता है, लेकिन असली समस्या उससे ऊपर है: लाइन 23 पर `output:` declaration के बाद trailing comma parser को एक और आउटपुट की उम्मीद में छोड़ देता है, इसलिए जब वह `script:` तक पहुंचता है तो विफल हो जाता है। यह काम करने के लिए कई सिंटैक्स एरर में से पहला है। तुमने जो चार-चरण डीबगिंग विधि सीखी है उसे लागू करो: @@ -2300,7 +2292,7 @@ nextflow run workflow.nf -profile debug ``` ??? solution "समाधान" - `buggy_workflow.nf` में 9 या 10 अलग-अलग एरर हैं (गिनने के तरीके पर निर्भर करते हुए) जो सभी प्रमुख डीबगिंग श्रेणियों को कवर करती हैं। यहाँ प्रत्येक एरर और उसे कैसे ठीक करें का व्यवस्थित विवरण है। + `buggy_workflow.nf` में 10 अलग-अलग एरर हैं जो सभी प्रमुख डीबगिंग श्रेणियों को कवर करती हैं। यहाँ प्रत्येक एरर और उसे कैसे ठीक करें का व्यवस्थित विवरण है, उस क्रम में जिसमें तुम उन्हें Nextflow 26.04 पर वास्तव में सामना करते हो। compiler वर्कफ़्लो को दो passes में resolve करता है: पहले यह सिंटैक्स parse करता है, फिर यह statically जांचता है कि हर वेरिएबल defined है। इसलिए तुम पहले सिंटैक्स एरर साफ करते हो, फिर undefined-variable एरर का एक batch, इससे पहले कि वर्कफ़्लो बिल्कुल चले और runtime एरर शुरू हों। चलो उन सिंटैक्स एरर से शुरू करते हैं: @@ -2315,6 +2307,8 @@ nextflow run workflow.nf -profile debug path "${sample_id}_result.txt" ``` + comma हटने के बाद, parser फ़ाइल के अंत तक उस brace को ढूंढता है जो `processFiles` को बंद करनी चाहिए और `Unexpected input: ''` रिपोर्ट करता है। + **एरर 2: सिंटैक्स एरर - गायब Closing Brace** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ nextflow run workflow.nf -profile debug } // गायब closing brace जोड़ो ``` + अब सिंटैक्स parse होता है, इसलिए static type checker चलता है। यह एक साथ हर undefined वेरिएबल रिपोर्ट करता है, वर्कफ़्लो चलने से पहले: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + ये चार लाइनें तीन अलग-अलग बग से मेल खाती हैं, नीचे एरर 3, 4 और 5। उनमें से आखिरी, `i`, एक Bash वेरिएबल है जिसे type checker Nextflow वेरिएबल से अलग नहीं कर सकता, इसलिए यह यहाँ compile time पर सामने आता है न कि runtime failure के रूप में। दोबारा चलाने से पहले तीनों ठीक करो। + **एरर 3: वेरिएबल नाम एरर** ```groovy linenums="26" echo "Processing: ${sample}" // एरर: sample_id होना चाहिए @@ -2348,14 +2353,23 @@ nextflow run workflow.nf -profile debug ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // एरर: sample_ids अपरिभाषित है ``` - **फिक्स:** सही चैनल का उपयोग करो और sample IDs निकालो + **फिक्स:** सही चैनल का उपयोग करो ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - इस बिंदु पर वर्कफ़्लो चलेगा, लेकिन हमें अभी भी एरर मिलेंगी (जैसे `processFiles` में `Path value cannot be null`), जो खराब चैनल संरचना के कारण हैं। + **एरर 5: Bash वेरिएबल Escaping एरर** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // एरर: $i एक undefined Nextflow वेरिएबल जैसा दिखता है + ``` + **फिक्स:** bash वेरिएबल escape करो ताकि Nextflow इसे shell के लिए छोड़ दे + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + इन्हें resolve करने के बाद वर्कफ़्लो compile होता है और चलना शुरू होता है। पहली runtime एरर `processFiles` से आती है, जो एक tuple की अपेक्षा करता है लेकिन उसे एक bare value दी जा रही है: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`। - **एरर 5: चैनल संरचना एरर - गलत Map आउटपुट** + **एरर 6: चैनल संरचना एरर - गलत Map आउटपुट** ```groovy linenums="83" .map { row -> row.sample_id } // एरर: processFiles tuple की अपेक्षा करता है ``` @@ -2364,29 +2378,18 @@ nextflow run workflow.nf -profile debug .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - लेकिन यह ऊपर `heavyProcess()` चलाने के लिए हमारे फिक्स को तोड़ देगा, इसलिए हमें उस प्रोसेस को केवल sample IDs पास करने के लिए map का उपयोग करना होगा: + यह `processFiles` ठीक करता है, लेकिन `input_ch` अब एक दो-तत्व tuple emit करता है, और `heavyProcess` को अभी भी पूरा tuple दिया जा रहा है जहाँ वह एक single value की अपेक्षा करता है। tuple script में `[sample_005, /path/sample_005.fastq.gz]` के रूप में render होता है, जो Bash कमांड को syntax error और exit status 2 के साथ तोड़ देता है। - **एरर 6: heavyProcess के लिए खराब चैनल संरचना** + **एरर 7: heavyProcess के लिए खराब चैनल संरचना** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // एरर: input_ch में अब प्रति emission 2 तत्व हैं - heavyProcess को केवल 1 (पहला) चाहिए + heavy_ch = heavyProcess(input_ch) // एरर: input_ch अब 2-तत्व tuple emit करता है; heavyProcess को केवल पहला तत्व चाहिए ``` - **फिक्स:** सही चैनल का उपयोग करो और sample IDs निकालो + **फिक्स:** केवल sample IDs पास करो ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - अब हम थोड़ा आगे बढ़ते हैं लेकिन `No such variable: i` के बारे में एरर मिलती है, क्योंकि हमने Bash वेरिएबल को escape नहीं किया। - - **एरर 7: Bash वेरिएबल Escaping एरर** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // एरर: $i escape नहीं किया - ``` - **फिक्स:** bash वेरिएबल escape करो - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - अब हमें `Process exceeded running time limit (1ms)` मिलती है, इसलिए हम संबंधित प्रोसेस के लिए run time limit ठीक करते हैं: + अब `heavyProcess` चलता है, लेकिन अपनी time limit से टकराता है। `local` executor पर मैसेज `process hasn't exited` होता है (साथ में `WARN: Killing running tasks` मैसेज) न कि एक explicit timeout, इसलिए killed task को उसके `time` निर्देश से जोड़ो: **एरर 8: Resource कॉन्फ़िगरेशन एरर** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ nextflow run workflow.nf -profile debug time '100 s' ``` - अगला हमारे पास हल करने के लिए एक `Missing output file(s)` एरर है: + अगला हमारे पास हल करने के लिए एक `Missing output file(s)` एरर है, क्योंकि script `${sample_id}.txt` लिखता है लेकिन output declaration `${sample_id}_heavy.txt` की अपेक्षा करता है: **एरर 9: आउटपुट फ़ाइल नाम बेमेल** ```groovy linenums="49" @@ -2408,11 +2411,11 @@ nextflow run workflow.nf -profile debug done > ${sample_id}_heavy.txt ``` - पहले दो प्रोसेस चले, लेकिन तीसरा नहीं। + वर्कफ़्लो अब बिना एरर के पूरा होता है, लेकिन `files` आउटपुट खाली है: `handleFiles` कभी नहीं चला। इसका input channel, `channel.fromPath("*.txt")`, launch directory में कोई फ़ाइल match नहीं करता, इसलिए प्रोसेस जोर से विफल होने के बजाय बस skip हो जाता है। - **एरर 10: आउटपुट फ़ाइल नाम बेमेल** + **एरर 10: गलत चैनल स्रोत** ```groovy linenums="88" - file_ch = channel.fromPath("*.txt") // एरर: pwd से इनपुट लेने की कोशिश कर रहा है न कि किसी प्रोसेस से + file_ch = channel.fromPath("*.txt") // एरर: किसी प्रोसेस से नहीं बल्कि pwd से इनपुट लेने की कोशिश कर रहा है handleFiles(file_ch) ``` **फिक्स:** पिछले प्रोसेस से आउटपुट लो @@ -2420,7 +2423,7 @@ nextflow run workflow.nf -profile debug file_ch = handleFiles(heavy_ch) ``` - इसके साथ, पूरा वर्कफ़्लो चलना चाहिए। + इसके साथ, पूरा वर्कफ़्लो शुरू से अंत तक चलता है और तीनों आउटपुट populated हैं। **पूर्ण सही वर्कफ़्लो:** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ nextflow run workflow.nf -profile debug script: """ # भारी computation simulate करो - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/hi/docs/side_quests/dev_environment/index.md b/docs/hi/docs/side_quests/dev_environment/index.md index 8f275070ac..e75515519c 100644 --- a/docs/hi/docs/side_quests/dev_environment/index.md +++ b/docs/hi/docs/side_quests/dev_environment/index.md @@ -74,7 +74,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "उदाहरण फ़ाइलों के बारे में" @@ -545,11 +545,11 @@ VS Code केवल कोड संपादित करने से पर - Inline diff views - Commit और push क्षमताएं -Source Control panel खोलने के लिए source control बटन (![Source control icon](../img/source_control_icon.png)) (`Ctrl+Shift+G` या यदि तुम VSCode लोकल रूप से काम कर रहे हो तो `Cmd+Shift+G`) का उपयोग करो ताकि git changes देख सको और सीधे editor में commits stage कर सको। +Source Control panel खोलने के लिए source control बटन (![Source control icon](../img/source_control_icon.png)) (`Ctrl+Shift+G` या यदि तुम VS Code लोकल रूप से काम कर रहे हो तो `Cmd+Shift+G`) का उपयोग करो ताकि git changes देख सको और सीधे editor में commits stage कर सको। ![Source Control Panel](../img/source_control.png) -### 7.2. वर्कफ़्लो चलाना और परिणाम जाँचना +### 7.2. वर्कफ़्लो चलाना और जाँचना आइए एक वर्कफ़्लो चलाएं और फिर परिणाम जाँचें। Integrated terminal में (Windows और MacOS दोनों में `Ctrl+Shift+` बैकटिक), बुनियादी वर्कफ़्लो चलाओ: diff --git a/docs/hi/docs/side_quests/essential_scripting_patterns/index.md b/docs/hi/docs/side_quests/essential_scripting_patterns/index.md index bf116d62eb..1c25ca05bd 100644 --- a/docs/hi/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/hi/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, हम इस realistic dataset का उपयोग practical programming techniques explore करने के लिए करेंगे जो तुम्हें real bioinformatics वर्कफ़्लो में मिलेंगी। - - - - #### तैयारी की जाँच क्या तुम dive in करने के लिए तैयार हो? @@ -112,9 +108,19 @@ Nextflow वर्कफ़्लो लिखते समय, **dataflow** ( ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Map Operator जोड़ना @@ -148,7 +162,7 @@ nextflow run main.nf === "बाद में" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ nextflow run main.nf === "पहले" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ nextflow run main.nf === "बाद में" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ nextflow run main.nf === "पहले" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ nextflow run main.nf === "बाद में" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ nextflow run main.nf === "पहले" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ nextflow run main.nf === "बाद में" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ nextflow run main.nf === "पहले" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` यह `view()` operation द्वारा display किया गया पूरा metadata और `println` से print किया गया extracted subset दोनों दिखाता है। @@ -390,7 +410,7 @@ nextflow run main.nf === "बाद में" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -409,7 +429,7 @@ nextflow run main.nf === "पहले" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -485,9 +505,9 @@ nextflow run collect.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -501,7 +521,7 @@ nextflow run collect.nf === "बाद में" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - कई channel emissions को एक में group करता है @@ -519,7 +539,7 @@ nextflow run collect.nf === "पहले" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - कई channel emissions को एक में group करता है @@ -543,9 +563,9 @@ nextflow run collect.nf ??? success "कमांड आउटपुट" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -614,9 +634,9 @@ nextflow run collect.nf ??? success "कमांड आउटपुट" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -673,7 +693,7 @@ Bioinformatics फ़ाइलों में अक्सर metadata encode === "बाद में" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // डेटा transformation के लिए scripting def sample_meta = [ @@ -700,7 +720,7 @@ Bioinformatics फ़ाइलों में अक्सर metadata encode === "पहले" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // डेटा transformation के लिए scripting def sample_meta = [ @@ -743,13 +763,19 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` यह फ़ाइल नामों से enriched metadata दिखाता है। @@ -796,8 +822,9 @@ include { FASTP } from './modules/fastp.nf' === "बाद में" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -824,13 +851,23 @@ include { FASTP } from './modules/fastp.nf' } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "पहले" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -853,9 +890,18 @@ include { FASTP } from './modules/fastp.nf' ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -868,28 +914,41 @@ nextflow run main.nf ??? failure "कमांड आउटपुट" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` तुम देख सकते हो कि process दूसरी input फ़ाइल के लिए `null` value के साथ `fastp` चलाने की कोशिश कर रहा है, जिससे यह fail हो रहा है। यह इसलिए है क्योंकि हमारे dataset में single-end reads हैं, लेकिन process hardcoded है कि paired-end reads (एक बार में दो input फ़ाइलें) expect करे। @@ -953,18 +1012,24 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` बढ़िया! अगर हम actual commands check करें जो run हुए (अपने task hash के लिए customize करो): ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` हम देख सकते हैं कि Nextflow ने single-end reads के लिए सही command चुना: @@ -976,7 +1041,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Dynamic script logic का एक और common usage [Nextflow for Science Genomics module](../../nf4_science/genomics/03_joint_calling.md) में देखा जा सकता है। उस module में, call किया जाने वाला GATK process कई input फ़ाइलें ले सकता है, लेकिन प्रत्येक को एक correct command line बनाने के लिए `-V` से prefix करना होगा। Process input फ़ाइलों के collection (`all_gvcfs`) को correct command arguments में transform करने के लिए scripting का उपयोग करता है: @@ -1023,11 +1088,12 @@ Process को अपने `main.nf` में include करो और वर === "बाद में" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1054,15 +1120,25 @@ Process को अपने `main.nf` में include करो और वर ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "पहले" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1088,17 +1164,44 @@ Process को अपने `main.nf` में include करो और वर } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` अब वर्कफ़्लो चलाओ और `results/reports/` में generated reports check करो। उनमें प्रत्येक sample के बारे में basic information होनी चाहिए। - +```bash +nextflow run main.nf +``` ??? success "कमांड आउटपुट" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` लेकिन क्या होगा अगर हम processing कब और कहाँ हुई इसके बारे में जानकारी जोड़ना चाहें? चलो process को modify करते हैं ताकि report में current user, hostname, और date शामिल करने के लिए **shell** variables और थोड़ी command substitution का उपयोग किया जा सके: @@ -1131,11 +1234,18 @@ Process को अपने `main.nf` में include करो और वर ??? failure "कमांड आउटपुट" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` हमें इसे escape करना होगा ताकि Bash इसे handle कर सके। @@ -1195,7 +1305,7 @@ Channel operators या process definitions में inline complex workflow l === "बाद में" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1222,22 +1332,33 @@ Channel operators या process definitions में inline complex workflow l } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "पहले" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1264,6 +1385,15 @@ Channel operators या process definitions में inline complex workflow l ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1289,13 +1419,22 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Output दोनों processes को successfully complete होते दिखाना चाहिए। वर्कफ़्लो अब बहुत cleaner और maintain करने में आसान है, सभी complex metadata processing logic `separateMetadata` function में encapsulated है। @@ -1359,26 +1498,35 @@ nextflow run main.nf -ansi-log false ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` किसी भी task के लिए CPU allocation देखने के लिए exact `docker` command check कर सकते हो: ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` तुम्हें कुछ ऐसा दिखना चाहिए: ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` इस example में हमने एक ऐसा example चुना है जिसने 2 CPUs request किए (`--cpu-shares 2048`), क्योंकि यह एक high-depth sample था, लेकिन तुम्हें sample depth के आधार पर अलग-अलग CPU allocations दिखनी चाहिए। दूसरे tasks के लिए भी यह try करो। @@ -1432,7 +1580,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` यह indicate करता है कि process memory limits exceed करने के कारण kill हो गया। @@ -1520,7 +1668,7 @@ Nextflow के [dataflow operators](https://www.nextflow.io/docs/latest/referen === "बाद में" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1538,7 +1686,7 @@ Nextflow के [dataflow operators](https://www.nextflow.io/docs/latest/referen === "पहले" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1556,14 +1704,26 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` यहाँ, हमने `.branch{}` operator के अंदर छोटे लेकिन powerful conditional expressions का उपयोग करके samples को उनके metadata के आधार पर route किया है। High coverage वाले human samples `FASTP` से गुज़रते हैं, जबकि बाकी सभी samples `TRIMGALORE` से गुज़रते हैं। @@ -1583,7 +1743,7 @@ Branch operation से पहले निम्नलिखित जोड़ === "बाद में" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1603,7 +1763,7 @@ Branch operation से पहले निम्नलिखित जोड़ === "पहले" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1624,21 +1784,31 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -क्योंकि हमने एक filter चुना है जो कुछ samples को exclude करता है, कम tasks execute हुए। + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +इस case में तीनों samples filter को satisfy करते हैं, इसलिए हर sample पाइपलाइन में आगे जाता है। +एक stricter threshold low-depth samples को exclude करेगा और run होने वाले tasks की संख्या कम करेगा। Filter expression `meta.id && meta.organism && meta.depth >= 25000000` truthiness को explicit comparisons के साथ combine करता है: @@ -1708,13 +1878,13 @@ nextflow run main.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` यह NullPointerException के साथ crash होता है। @@ -1764,7 +1934,27 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` Crash नहीं हुआ! वर्कफ़्लो अब missing field को gracefully handle करता है। जब `row.run_id` `null` होता है, तो `?.` operator `.toUpperCase()` call को prevent करता है, और `run_id` exception cause करने की बजाय `null` बन जाता है। @@ -1808,7 +1998,7 @@ Results देखने के लिए वर्कफ़्लो में === "बाद में" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1817,7 +2007,7 @@ Results देखने के लिए वर्कफ़्लो में === "पहले" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1870,7 +2060,7 @@ nextflow run main.nf === "बाद में" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1888,6 +2078,7 @@ nextflow run main.nf } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1901,6 +2092,7 @@ nextflow run main.nf ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1913,9 +2105,9 @@ nextflow run main.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1932,9 +2124,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1948,7 +2140,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "कमांड आउटपुट" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` इस बार यह successfully run होता है। @@ -1987,14 +2199,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 + + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2025,7 +2247,7 @@ Event handler को अपनी `main.nf` file में, अपनी workflo === "बाद में" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2041,15 +2263,21 @@ Event handler को अपनी `main.nf` file में, अपनी workflo println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "पहले" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2064,29 +2292,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` चलो इसे conditional logic जोड़कर और उपयोगी बनाते हैं: === "बाद में" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2109,12 +2352,15 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "पहले" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2130,34 +2376,53 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` अब हमें एक और informative summary मिलती है, जिसमें success/failure message और specified होने पर output directory शामिल है: - +```bash +nextflow run main.nf +``` ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` तुम file operations का उपयोग करके summary को एक file में भी लिख सकते हो: diff --git a/docs/hi/docs/side_quests/metadata/index.md b/docs/hi/docs/side_quests/metadata/index.md index 67b5589b9e..59707b198d 100644 --- a/docs/hi/docs/side_quests/metadata/index.md +++ b/docs/hi/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` जैसा कि तुम देख सकते हो, ऑपरेटर ने CSV फ़ाइल की प्रत्येक पंक्ति के लिए key-value pairs का एक map बनाया है, जिसमें column headers संबंधित values की keys हैं। @@ -265,9 +271,9 @@ nextflow run main.nf और यहाँ है जो तुम आउटपुट में देखने की उम्मीद कर सकते हो: ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` इससे पता चलता है कि हम प्रत्येक पंक्ति के लिए `character` कॉलम की values तक पहुँचने में सक्षम हैं। @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` जैसा कि तुम देख सकते हो, `COWPY` प्रत्येक फ़ाइल पर सही character का उपयोग करके चला। @@ -654,12 +679,25 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` आउटपुट पहले जैसी ही सात `cowpy-*.txt` फ़ाइलें हैं, अब `COWPY` को एक सरल call के साथ produce की गई। @@ -744,7 +782,7 @@ Datasheet में columns जोड़ने या हटाने से `me === "पहले" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -770,9 +808,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -781,6 +819,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` चैनल में प्रत्येक element अब एक two-element tuple है: पहले meta map, दूसरे स्थान पर फ़ाइल। @@ -792,7 +836,7 @@ nextflow run main.nf ] ``` -अगर हम बाद में datasheet में एक `language` column जोड़ते हैं, तो वह `meta.language` के रूप में उपलब्ध हो जाएगा बिना process input definition में कोई बदलाव किए। +अगर हम बाद में datasheet में एक `language` column जोड़ते हैं और उसे `map` operation में शामिल करते हैं (जैसे `language: row.language`), तो वह `meta.language` के रूप में उपलब्ध हो जाएगा बिना process input definition में कोई बदलाव किए। #### 1.5.3. Meta map का उपयोग करने के लिए `COWPY` प्रोसेस update करो @@ -891,12 +935,25 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Results डायरेक्टरी में अब ASCII art फ़ाइलें हैं। @@ -1044,20 +1101,33 @@ nextflow run main.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` अब हमारे पास dataset में प्रत्येक फ़ाइल के लिए language prediction है। @@ -1206,19 +1276,32 @@ nextflow run main.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` हाँ, यह सही है! @@ -1322,19 +1405,32 @@ nextflow run main.nf -resume ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` Meta map में अब चार fields हैं: `id`, `character`, `lang`, और `lang_group`। @@ -1445,13 +1541,26 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` Results डायरेक्टरी अब language family के अनुसार व्यवस्थित है, प्रत्येक फ़ाइल का नाम उसकी detected language के अनुसार है: @@ -1509,18 +1618,19 @@ Datasheet parse होने पर सभी entries के लिए `characte ??? failure "कमांड आउटपुट" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1540,7 +1650,7 @@ Datasheet parse होने पर सभी entries के लिए `characte cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1564,28 +1674,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -Meta map में `character` key कभी नहीं बनाई जाती। -जब process script `#!groovy ${meta.character}` evaluate करती है, तो missing key `null` return करती है, और Nextflow literally string `null` को command में substitute कर देता है: +हमारा `map` operation explicitly `#!groovy character: row.character` लिखता है, इसलिए meta map में `character` key फिर भी बनाई जाती है, लेकिन parsed row पर मौजूद न होने वाले column को access करने पर `null` return होता है, तो उसकी value `null` हो जाती है। +जब process script `#!groovy ${meta.character}` evaluate करती है, तो Nextflow literally string `null` को command में substitute कर देता है: ??? failure "कमांड आउटपुट" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1610,7 +1721,7 @@ Meta map में `character` key कभी नहीं बनाई जात TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/hi/docs/side_quests/nf_test/index.md b/docs/hi/docs/side_quests/nf_test/index.md index 10f87c4fcb..019386ba2c 100644 --- a/docs/hi/docs/side_quests/nf_test/index.md +++ b/docs/hi/docs/side_quests/nf_test/index.md @@ -19,7 +19,7 @@ हम कई अलग-अलग प्रकार के परीक्षण लिख सकते हैं: -1. **मॉड्यूल-स्तरीय परीक्षण**: अलग-अलग प्रोसेस के लिए +1. **प्रोसेस-स्तरीय परीक्षण**: अलग-अलग प्रोसेस के लिए 2. **वर्कफ़्लो-स्तरीय परीक्षण**: एकल वर्कफ़्लो के लिए 3. **पाइपलाइन-स्तरीय परीक्षण**: पूरी पाइपलाइन के लिए 4. **प्रदर्शन परीक्षण**: पाइपलाइन की गति और दक्षता के लिए @@ -27,16 +27,16 @@ अलग-अलग प्रोसेस का परीक्षण करना अन्य भाषाओं में यूनिट परीक्षणों के समान है। वर्कफ़्लो या पूरी पाइपलाइन का परीक्षण करना अन्य भाषाओं में इंटीग्रेशन परीक्षण के समान है, जहाँ हम घटकों की परस्पर क्रियाओं का परीक्षण करते हैं। -[**nf-test**](https://www.nf-test.com/) एक ऐसा टूल है जो तुम्हें मॉड्यूल, वर्कफ़्लो और पाइपलाइन स्तर के परीक्षण लिखने की अनुमति देता है। संक्षेप में, यह तुम्हें व्यवस्थित रूप से जाँचने की अनुमति देता है कि पाइपलाइन का हर अलग हिस्सा अपेक्षित रूप से काम कर रहा है, _अलगाव में_। +[**nf-test**](https://www.nf-test.com/) एक ऐसा टूल है जो तुम्हें प्रोसेस, वर्कफ़्लो और पाइपलाइन स्तर के परीक्षण लिखने की अनुमति देता है। संक्षेप में, यह तुम्हें व्यवस्थित रूप से जाँचने की अनुमति देता है कि पाइपलाइन का हर अलग हिस्सा अपेक्षित रूप से काम कर रहा है, _अलगाव में_। ### सीखने के लक्ष्य -इस साइड क्वेस्ट में, तुम पाइपलाइन के लिए वर्कफ़्लो-स्तरीय परीक्षण और इसके द्वारा बुलाए जाने वाले तीन प्रोसेस के लिए मॉड्यूल-स्तरीय परीक्षण लिखने के लिए nf-test का उपयोग करना सीखोगे। +इस साइड क्वेस्ट में, तुम पाइपलाइन के लिए वर्कफ़्लो-स्तरीय परीक्षण और इसके द्वारा बुलाए जाने वाले दो प्रोसेस के लिए प्रोसेस-स्तरीय परीक्षण लिखने के लिए nf-test का उपयोग करना सीखोगे। इस साइड क्वेस्ट के अंत तक, तुम निम्नलिखित तकनीकों का प्रभावी ढंग से उपयोग करने में सक्षम होगे: - अपने प्रोजेक्ट में nf-test को इनिशियलाइज़ करना -- मॉड्यूल-स्तरीय और वर्कफ़्लो-स्तरीय परीक्षण जनरेट करना +- प्रोसेस-स्तरीय और वर्कफ़्लो-स्तरीय परीक्षण जनरेट करना - सामान्य प्रकार के assertions जोड़ना - यह समझना कि snapshots बनाम content assertions का उपयोग कब करना है - पूरे प्रोजेक्ट के लिए परीक्षण चलाना @@ -50,6 +50,16 @@ - [Hello Nextflow](../../hello_nextflow/index.md) ट्यूटोरियल या समकक्ष शुरुआती कोर्स पूरा करना चाहिए। - बुनियादी Nextflow अवधारणाओं और तंत्रों (प्रोसेस, चैनल, ऑपरेटर, फ़ाइलों के साथ काम करना, मेटा डेटा) का उपयोग करने में सहज होना चाहिए। +!!! warning "nf-test संस्करण आवश्यकता" + + प्रोसेस-स्तरीय परीक्षणों के लिए **nf-test 0.9.3 या उसके बाद का संस्करण** आवश्यक है। पुराने संस्करण (0.9.2 सहित) ऐसा test harness कोड जनरेट करते हैं जो Nextflow के strict syntax parser के साथ असंगत है, जिसे Nextflow संस्करण 26.04 से डिफ़ॉल्ट रूप से उपयोग करता है, जिससे अपेक्षित परीक्षण परिणाम के बजाय `Script compilation failed` त्रुटि आती है। + + अपना संस्करण `nf-test version` से जाँचो। अगर तुम्हें अपग्रेड करना है: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. शुरू करना @@ -81,7 +91,8 @@ code . ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` फ़ाइलों के विस्तृत विवरण के लिए, [Hello Nextflow का वार्मअप](../../hello_nextflow/00_orientation.md) देखो। @@ -111,21 +122,23 @@ code . ??? example "वर्कफ़्लो कोड" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * पाइपलाइन पैरामीटर - */ + * पाइपलाइन पैरामीटर + */ params.input_file = "greetings.csv" /* - * 'Hello World!' को standard out पर प्रिंट करने के लिए echo का उपयोग करें - */ + * 'Hello World!' को standard out पर प्रिंट करने के लिए echo का उपयोग करें + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -134,15 +147,15 @@ code . } /* - * अभिवादन को अपरकेस में बदलने के लिए text replace utility का उपयोग करें - */ + * अभिवादन को अपरकेस में बदलने के लिए text replace utility का उपयोग करें + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -183,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` बधाई हो! तुमने अभी एक परीक्षण चलाया! @@ -435,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` सफलता! पाइपलाइन सफलतापूर्वक चलती है और परीक्षण पास होता है। इसे जितनी बार चाहो चलाओ और तुम्हें हमेशा वही परिणाम मिलेगा! @@ -460,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -534,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` सफलता! पाइपलाइन सफलतापूर्वक चलती है और परीक्षण पास होता है। अब हमने पाइपलाइन के विवरण के साथ-साथ समग्र स्थिति का परीक्षण करना शुरू कर दिया है। @@ -619,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` सफलता! परीक्षण पास होते हैं क्योंकि पाइपलाइन सफलतापूर्वक पूरी हुई, सही संख्या में प्रोसेस चले और आउटपुट फ़ाइलें बनाई गईं। यह तुम्हें यह भी दिखाना चाहिए कि अपने परीक्षणों के लिए वे सूचनाप्रद नाम प्रदान करना कितना उपयोगी है। @@ -730,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -800,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -808,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` सफलता! परीक्षण पास होता है क्योंकि `sayHello` प्रोसेस सफलतापूर्वक चला और आउटपुट बनाया गया। @@ -858,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` सफलता! परीक्षण पास होता है क्योंकि `sayHello` प्रोसेस सफलतापूर्वक चला और आउटपुट snapshot से मेल खाया। @@ -951,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. `convertToUpper` प्रोसेस का परीक्षण करो @@ -998,10 +1040,10 @@ nextflow_process { अब हमें convertToUpper प्रोसेस को एक single इनपुट फ़ाइल प्रदान करनी होगी, जिसमें कुछ टेक्स्ट है जिसे हम अपरकेस में बदलना चाहते हैं। हम इसे कई तरीकों से कर सकते हैं: - हम परीक्षण के लिए एक समर्पित फ़ाइल बना सकते हैं -- हम मौजूदा data/greetings.csv फ़ाइल का पुनः उपयोग कर सकते हैं +- हम मौजूदा greetings.csv फ़ाइल का पुनः उपयोग कर सकते हैं - हम इसे परीक्षण के भीतर ही बना सकते हैं -अभी के लिए, आइए पाइपलाइन स्तर के परीक्षण के साथ उपयोग किए गए उदाहरण का उपयोग करके मौजूदा data/greetings.csv फ़ाइल का पुनः उपयोग करें। पहले की तरह, हम परीक्षण का नाम बेहतर ढंग से दर्शाने के लिए रख सकते हैं कि हम क्या परीक्षण कर रहे हैं, लेकिन इस बार आइए इसे सामग्री को 'snapshot' करने दें बजाय विशिष्ट strings की जाँच करने के (जैसा हमने दूसरे प्रोसेस में किया था)। +अभी के लिए, आइए पाइपलाइन स्तर के परीक्षण के साथ उपयोग किए गए उदाहरण का उपयोग करके मौजूदा greetings.csv फ़ाइल का पुनः उपयोग करें। पहले की तरह, हम परीक्षण का नाम बेहतर ढंग से दर्शाने के लिए रख सकते हैं कि हम क्या परीक्षण कर रहे हैं, लेकिन इस बार आइए इसे सामग्री को 'snapshot' करने दें बजाय विशिष्ट strings की जाँच करने के (जैसा हमने दूसरे प्रोसेस में किया था)। === "बाद में" @@ -1070,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1078,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` ध्यान दो, हमने `convertToUpper` प्रोसेस के लिए `tests/main.converttoupper.nf.test.snap` पर एक snapshot फ़ाइल बनाई है। अगर हम परीक्षण फिर से चलाते हैं, तो हमें nf-test फिर से पास होते देखना चाहिए। @@ -1097,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### सारांश @@ -1139,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` देखो! हमने एक ही कमांड से 4 परीक्षण चलाए, प्रत्येक प्रोसेस के लिए 1 और पूरी पाइपलाइन के लिए 2। कल्पना करो कि एक बड़े codebase पर यह कितना शक्तिशाली है! @@ -1193,7 +1235,7 @@ SUCCESS: Executed 4 tests in 13.481s - अपने परीक्षणों में अधिक व्यापक assertions जोड़ना - edge cases और त्रुटि स्थितियों के लिए परीक्षण लिखना - परीक्षणों को स्वचालित रूप से चलाने के लिए continuous integration सेट करना -- वर्कफ़्लो और मॉड्यूल परीक्षणों जैसे अन्य प्रकार के परीक्षणों के बारे में जानना +- वर्कफ़्लो, प्रदर्शन और स्ट्रेस परीक्षणों जैसे अन्य प्रकार के परीक्षणों के बारे में जानना - अधिक उन्नत content validation तकनीकों का पता लगाना **याद रखो:** परीक्षण इस बात का जीवंत दस्तावेज़ीकरण है कि तुम्हारा कोड कैसे व्यवहार करना चाहिए। जितने अधिक परीक्षण तुम लिखते हो, और जितने अधिक विशिष्ट तुम्हारे assertions होते हैं, उतना ही अधिक तुम अपनी पाइपलाइन की विश्वसनीयता पर भरोसा कर सकते हो। diff --git a/docs/hi/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/hi/docs/side_quests/plugin_development/01_plugin_basics.md index ab14a9a847..7a39858a1e 100644 --- a/docs/hi/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/hi/docs/side_quests/plugin_development/01_plugin_basics.md @@ -511,7 +511,7 @@ nf-hello और nf-schema दोनों function plugins हैं: वे fun plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -534,7 +534,7 @@ Plugin execution के दौरान कई INFO और WARN messages उत ये local machine पर चलने वाले एक छोटे उदाहरण के लिए सामान्य हैं: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -600,7 +600,7 @@ nf-co2footprint plugin एक `co2footprint` configuration scope परिभा plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -614,7 +614,7 @@ nf-co2footprint plugin एक `co2footprint` configuration scope परिभा plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -635,11 +635,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: Zone warning चली गई। Plugin अब global fallback (480.0 gCO₂eq/kWh) के बजाय GB-specific carbon intensity (163.92 gCO₂eq/kWh) का उपयोग करता है। -!!! note "नोट" - - तुम्हें `WARN: Unrecognized config option 'co2footprint.location'` message भी दिख सकता है। - यह केवल दिखावटी है और इसे सुरक्षित रूप से नज़रअंदाज़ किया जा सकता है; plugin फिर भी value को सही तरीके से पढ़ता है। - भाग 6 में, तुम अपने plugin के लिए एक configuration scope बनाओगे। यह plugin पूरी तरह से observer mechanism के माध्यम से काम करता है, resource metrics एकत्र करने और पाइपलाइन पूरी होने पर अपनी report उत्पन्न करने के लिए workflow lifecycle events में hook करता है। diff --git a/docs/hi/docs/side_quests/plugin_development/02_create_project.md b/docs/hi/docs/side_quests/plugin_development/02_create_project.md index 99b99b6433..d12a4379c6 100644 --- a/docs/hi/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/hi/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ tree ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ cat build.gradle ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ Template एक `nextflowVersion` value generate करता है जो प ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ Template एक `nextflowVersion` value generate करता है जो प ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **चेतावनियाँ expected हैं।** diff --git a/docs/hi/docs/side_quests/plugin_development/03_custom_functions.md b/docs/hi/docs/side_quests/plugin_development/03_custom_functions.md index 0143253e15..4198f806bb 100644 --- a/docs/hi/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/hi/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/hi/docs/side_quests/plugin_development/04_build_and_test.md b/docs/hi/docs/side_quests/plugin_development/04_build_and_test.md index 95a042ee2e..bb1990f88e 100644 --- a/docs/hi/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/hi/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **टेस्ट के परिणाम कहाँ हैं?** जब सभी टेस्ट पास हो जाते हैं तो Gradle विस्तृत आउटपुट छुपा देता है। diff --git a/docs/hi/docs/side_quests/plugin_development/05_observers.md b/docs/hi/docs/side_quests/plugin_development/05_observers.md index d5e895f93a..5c677a1311 100644 --- a/docs/hi/docs/side_quests/plugin_development/05_observers.md +++ b/docs/hi/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/hi/docs/side_quests/plugin_development/06_configuration.md b/docs/hi/docs/side_quests/plugin_development/06_configuration.md index 1eeb605e4b..ce37285327 100644 --- a/docs/hi/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/hi/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ Build fail होती है: ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` Groovy (और Java) में, variable को उपयोग करने से पहले _declare_ करना ज़रूरी है। diff --git a/docs/hi/docs/side_quests/plugin_development/index.md b/docs/hi/docs/side_quests/plugin_development/index.md index a8597fb3a2..f00ea7c1a4 100644 --- a/docs/hi/docs/side_quests/plugin_development/index.md +++ b/docs/hi/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ Parts 2-6 में अपना खुद का plugin बनाना शा **Working directory:** `side-quests/plugin_development` +#### Training codespace खोलें + +अगर तुमने अभी तक ऐसा नहीं किया है, तो [Environment Setup](../../envsetup/index.md) में बताए अनुसार training environment ज़रूर खोलो। + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Learning objectives इस प्रशिक्षण के अंत तक, तुम यह करने में सक्षम होगे: diff --git a/docs/hi/docs/side_quests/splitting_and_grouping/index.md b/docs/hi/docs/side_quests/splitting_and_grouping/index.md index 19f62445b9..8e6c3e814c 100644 --- a/docs/hi/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/hi/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ workflow { === "बाद में" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ nextflow run main.nf ### 3.2. Multiple fields पर join करना -sampleA के लिए हमारे पास 2 replicates हैं, लेकिन sampleB और sampleC के लिए केवल 1। इस case में हम `id` field का उपयोग करके उन्हें प्रभावी ढंग से join कर सके, लेकिन क्या होता अगर वे sync से बाहर होते? हम अलग-अलग replicates के normal और tumor नमूनों को mix up कर सकते थे! +patientA के लिए हमारे पास 2 replicates हैं, लेकिन patientB और patientC के लिए केवल 1। इस case में हम `id` field का उपयोग करके उन्हें प्रभावी ढंग से join कर सके, लेकिन क्या होता अगर वे sync से बाहर होते? हम अलग-अलग replicates के normal और tumor नमूनों को mix up कर सकते थे! इससे बचने के लिए, हम multiple fields पर join कर सकते हैं। इसे achieve करने के वास्तव में कई तरीके हैं लेकिन हम एक नई joining key बनाने पर focus करेंगे जिसमें नमूना `id` और `replicate` number दोनों शामिल हों। @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + क्योंकि closure अब प्रत्येक path को `file()` से wrap करता है, file entries samplesheet के bare filenames के बजाय resolved absolute paths के रूप में दिखती हैं। + Named closure का उपयोग करने से हम कई जगहों पर एक ही transformation reuse कर सकते हैं, जिससे errors का जोखिम कम होता है और code अधिक readable और maintainable बनता है। ### 3.5. डेटा की duplication कम करना @@ -723,21 +725,21 @@ Named closure का उपयोग करने से हम कई जगह ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ nextflow run main.nf ## 5. `groupTuple` का उपयोग करके samples को aggregate करना -पिछले sections में, हमने सीखा कि input फ़ाइल से डेटा कैसे split करें और specific fields (हमारे case में normal और tumor नमूने) के आधार पर filter करें। लेकिन यह केवल एक प्रकार के joining को cover करता है। क्या होगा अगर हम किसी specific attribute के आधार पर नमूनों को group करना चाहते हैं? उदाहरण के लिए, matched normal-tumor pairs join करने के बजाय, हम "sampleA" के सभी नमूनों को उनके type की परवाह किए बिना एक साथ प्रोसेस करना चाहते हैं। यह pattern बायोइनफॉर्मेटिक्स वर्कफ़्लो में सामान्य है जहाँ तुम efficiency के कारणों से अंत में परिणामों की तुलना या combine करने से पहले संबंधित नमूनों को अलग-अलग प्रोसेस करना चाहते हो। +पिछले sections में, हमने सीखा कि input फ़ाइल से डेटा कैसे split करें और specific fields (हमारे case में normal और tumor नमूने) के आधार पर filter करें। लेकिन यह केवल एक प्रकार के joining को cover करता है। क्या होगा अगर हम किसी specific attribute के आधार पर नमूनों को group करना चाहते हैं? उदाहरण के लिए, matched normal-tumor pairs join करने के बजाय, हम "patientA" के सभी नमूनों को उनके type की परवाह किए बिना एक साथ प्रोसेस करना चाहते हैं। यह pattern बायोइनफॉर्मेटिक्स वर्कफ़्लो में सामान्य है जहाँ तुम efficiency के कारणों से अंत में परिणामों की तुलना या combine करने से पहले संबंधित नमूनों को अलग-अलग प्रोसेस करना चाहते हो। Nextflow में इसके लिए built-in methods हैं, जिनमें से मुख्य एक हम देखेंगे वह है `groupTuple`। @@ -1008,7 +1014,7 @@ Nextflow में इसके लिए built-in methods हैं, जिन ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Pipeline से होकर बहते समय डेटा को modify 2. **डेटा को अलग चैनलों में split करना:** हमने `type` field के आधार पर डेटा को independent streams में divide करने के लिए `filter` का उपयोग किया ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Matched नमूनों को join करना:** हमने `id` और `repeat` fields के आधार पर संबंधित नमूनों को recombine करने के लिए `join` का उपयोग किया @@ -1199,31 +1205,31 @@ Pipeline से होकर बहते समय डेटा को modify - Key (tuple के पहले element) द्वारा दो चैनलों को join करना ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Joining key extract करना और इस value द्वारा join करना ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - subMap का उपयोग करके multiple fields पर join करना + - `subMap` का उपयोग करके multiple fields पर join करना ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Intervals में वितरित करना:** हमने parallel processing के लिए genomic intervals के साथ नमूनों के Cartesian products बनाने के लिए `combine` का उपयोग किया। ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Grouping keys द्वारा aggregate करना:** हमने प्रत्येक tuple के पहले element द्वारा group करने के लिए `groupTuple` का उपयोग किया, जिससे `id` और `interval` fields share करने वाले नमूने collect हुए और technical replicates merge हुए। diff --git a/docs/hi/docs/side_quests/workflows_of_workflows/index.md b/docs/hi/docs/side_quests/workflows_of_workflows/index.md index 50b7a396fa..1f675d8839 100644 --- a/docs/hi/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/hi/docs/side_quests/workflows_of_workflows/index.md @@ -111,7 +111,7 @@ workflow { main: names_ch = channel.of('Alice', 'Bob', 'Charlie') - // Chain processes: validate -> create greeting -> add timestamp + // प्रोसेस को जंजीर में जोड़ो: सत्यापित करो -> अभिवादन बनाओ -> टाइमस्टैम्प जोड़ो validated_ch = VALIDATE_NAME(names_ch) greetings_ch = SAY_HELLO(validated_ch) timestamped_ch = TIMESTAMP_GREETING(greetings_ch) @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` इसे अन्य वर्कफ़्लो के साथ composable बनाने के लिए, कुछ चीज़ें बदलनी होंगी। ### 1.2. वर्कफ़्लो को composable बनाओ -एक वर्कफ़्लो को composable बनाने के लिए, चार चीज़ें बदलनी होती हैं: -वर्कफ़्लो को एक नाम मिलता है, इनपुट `take:` ब्लॉक में जाते हैं, आउटपुट `emit:` ब्लॉक में जाते हैं, -और standalone `publish:`/`output {}` ब्लॉक हटा दिए जाते हैं (वे entry workflow में होने चाहिए)। +एक वर्कफ़्लो को composable बनाने के लिए, तीन चीज़ें बदलनी होती हैं: +वर्कफ़्लो को एक नाम मिलता है, इनपुट `take:` ब्लॉक में जाते हैं, और आउटपुट `emit:` ब्लॉक में जाते हैं +(standalone `publish:`/`output {}` ब्लॉक की जगह, जो entry workflow में होने चाहिए)। चलो इन बदलावों को एक-एक करके देखते हैं। @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "डायरेक्टरी सामग्री" @@ -412,7 +435,7 @@ Greeting फ़ाइलें `results/greetings/` में publish होत --- -## 2. Transform Workflow को पाइपलाइन में जोड़ो +## 2. Transformation Workflow को पाइपलाइन में जोड़ो Transform वर्कफ़्लो टाइमस्टैम्प वाले अभिवादन पर टेक्स्ट परिवर्तन लागू करता है। @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` इसे `GREETING_WORKFLOW` के साथ composable बनाने के लिए, सेक्शन 1.2 के समान तीन बदलाव लागू होते हैं। @@ -477,7 +514,7 @@ include { REVERSE_TEXT } from '../modules/reverse_text' workflow TRANSFORM_WORKFLOW { take: - input_ch // संदेशों के साथ इनपुट चैनल + input_ch // अभिवादन के साथ इनपुट चैनल main: // क्रम में परिवर्तन लागू करो @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "डायरेक्टरी सामग्री" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "फ़ाइल सामग्री" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` पाइपलाइन end-to-end काम कर रही है: अभिवादन को अपरकेस किया गया है और उलटा किया गया है। diff --git a/docs/hi/docs/side_quests/working_with_files/index.md b/docs/hi/docs/side_quests/working_with_files/index.md index 6b1368e473..8ade02e5d1 100644 --- a/docs/hi/docs/side_quests/working_with_files/index.md +++ b/docs/hi/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` जैसा तुम देख सकते हो, Nextflow ने string path को ठीक वैसे ही print किया जैसा हमने लिखा था। @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` इस बार, तुम हमारे द्वारा इनपुट के रूप में दिए गए relative path के बजाय पूरा absolute path देखते हो। @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` तुम ऊपर console पर print की गई विभिन्न फ़ाइल विशेषताएँ देखते हो। @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` यह दिखाता है कि हम एक process के अंदर फ़ाइल पर उचित रूप से काम करने में सक्षम हैं। @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` यह महत्वपूर्ण हिस्सा है: @@ -543,12 +568,13 @@ nextflow run main.nf ??? failure "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -576,9 +602,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` यह error के बारे में बहुत सारे विवरण दिखाता है क्योंकि process ऊपर बताए अनुसार debugging जानकारी output करने के लिए सेट है। @@ -692,9 +718,9 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -702,9 +728,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` यह काम करता है! तुम देख सकते हो कि बहुत कम बदला है। @@ -813,16 +845,11 @@ Console आउटपुट में एक अंतर यह है कि pa ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` यह काम करता है, लेकिन यह clunky है। -!!! tip "`file()` बनाम `channel.fromPath()` का उपयोग कब करें" - - - `file()` का उपयोग तब करो जब तुम्हें direct manipulation के लिए एक single Path object चाहिए (जाँचना कि फ़ाइल exist करती है, उसकी attributes पढ़ना, या एक single process invocation को pass करना) - - `channel.fromPath()` का उपयोग तब करो जब तुम्हें एक channel चाहिए जो कई फ़ाइलें hold कर सके, विशेष रूप से glob patterns के साथ, या जब फ़ाइलें कई processes से flow करेंगी - यहीं पर [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath) आता है: एक convenient channel factory जो एक या अधिक static file strings के साथ-साथ glob patterns से channel generate करने के लिए हमें जो functionality चाहिए वह सब bundle करता है। ### 3.1. Channel factory जोड़ो @@ -877,11 +904,17 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` जैसा तुम देख सकते हो, file path channel में एक `Path` type object के रूप में load हो रहा है। @@ -889,6 +922,11 @@ nextflow run main.nf `channel.fromPath()` का उपयोग करना फ़ाइलों की list से populated एक नया channel बनाने का एक convenient तरीका है। +!!! tip "`file()` बनाम `channel.fromPath()` का उपयोग कब करें" + + - `file()` का उपयोग तब करो जब तुम्हें direct manipulation के लिए एक single Path object चाहिए (जाँचना कि फ़ाइल exist करती है, उसकी attributes पढ़ना, या एक single process invocation को pass करना) + - `channel.fromPath()` का उपयोग तब करो जब तुम्हें एक channel चाहिए जो कई फ़ाइलें hold कर सके, विशेष रूप से glob patterns के साथ, या जब फ़ाइलें कई processes से flow करेंगी + ### 3.2. Channel में फ़ाइलों की विशेषताएँ देखो Channel factory का उपयोग करने के हमारे पहले प्रयास में, हमने code को simplify किया और सिर्फ file name print किया। @@ -934,12 +972,12 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -947,6 +985,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` और यह रहा, पहले जैसे ही results लेकिन अब हमारे पास फ़ाइल एक channel में है, इसलिए हम और जोड़ सकते हैं। @@ -1003,12 +1047,12 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1024,6 +1068,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` जैसा तुम देख सकते हो, अब हमारे channel में दो Path objects हैं, जो दिखाता है कि Nextflow ने filename expansion सही ढंग से की है, और दोनों फ़ाइलों को load और process किया है। @@ -1108,19 +1158,25 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Channel में प्रत्येक element अब `simpleName` और original file object वाला एक tuple है। @@ -1164,19 +1220,25 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` अब हमारे channel में प्रत्येक element के लिए tuple में मेटाडेटा की list (_जैसे_ `[patientA, rep1, normal, R1, 001]`) और original file object शामिल है। @@ -1265,19 +1327,25 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` अब मेटाडेटा clearly labeled है (_जैसे_ `[id:patientA, replicate:1, type:normal, readNum:2]`) इसलिए यह बताना बहुत आसान है कि क्या है। @@ -1337,10 +1405,10 @@ data/patientA_rep1_normal_R{1,2}_001.fastq.gz ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* अभी के लिए mapping को comment out करें, हम बाद में वापस आएंगे! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1355,13 +1423,13 @@ data/patientA_rep1_normal_R{1,2}_001.fastq.gz === "पहले" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // channel.fromFilePairs के साथ फ़ाइलें लोड करें + // channel.fromPath के साथ फ़ाइलें लोड करें ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1383,12 +1451,11 @@ nextflow run main.nf ??? failure "कमांड आउटपुट" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1398,9 +1465,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` अरे नहीं, इस बार run fail हो गया! @@ -1451,11 +1518,17 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` बढ़िया, इस बार वर्कफ़्लो सफल हुआ! @@ -1476,10 +1549,10 @@ nextflow run main.nf // channel.fromFilePairs के साथ फ़ाइलें लोड करें ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1496,10 +1569,10 @@ nextflow run main.nf ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* अभी के लिए mapping को comment out करें, हम बाद में वापस आएंगे! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1526,11 +1599,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` और यह रहा: हमारे पास output tuple की पहली position में metadata map (`[id:patientA, replicate:1, type:normal]`) है, उसके बाद paired files का tuple है, जैसा intended था। @@ -1642,10 +1721,10 @@ Main workflow में, `.view()` operator को `#!groovy .set { ch_samples } // channel.fromFilePairs के साथ फ़ाइलें लोड करें ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1664,10 +1743,10 @@ Main workflow में, `.view()` operator को `#!groovy .set { ch_samples } // channel.fromFilePairs के साथ फ़ाइलें लोड करें ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1686,11 +1765,17 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` यह confirm करता है कि अब हम channel को नाम से refer कर सकते हैं। @@ -1714,10 +1799,10 @@ Main workflow में, निम्नलिखित code changes करो: // channel.fromFilePairs के साथ फ़ाइलें लोड करें ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1747,10 +1832,10 @@ Main workflow में, निम्नलिखित code changes करो: // channel.fromFilePairs के साथ फ़ाइलें लोड करें ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1784,12 +1869,19 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` आउटपुट एक `results` directory में publish होते हैं, इसलिए वहाँ देखो। @@ -1849,12 +1941,26 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` Results directory में अब सभी available data के results होने चाहिए। @@ -1885,7 +1991,7 @@ Results directory में अब सभी available data के results ह === "बाद में" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1893,7 +1999,7 @@ Results directory में अब सभी available data के results ह === "पहले" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1911,12 +2017,26 @@ nextflow run main.nf ??? success "कमांड आउटपुट" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` अब results directory जाँचो: @@ -1998,7 +2118,7 @@ nextflow run main.nf println myFile.parent // path/to ``` -2. **Remote Files का उपयोग करना**: हमने सीखा कि URIs का उपयोग करके local और remote files के बीच transparently कैसे switch करें, Nextflow की workflow logic बदले बिना विभिन्न sources से files handle करने की क्षमता demonstrate करते हुए। +2. **Remote Files का उपयोग करना**: हमने सीखा किURIs का उपयोग करके local और remote files के बीच transparently कैसे switch करें, Nextflow की workflow logic बदले बिना विभिन्न sources से files handle करने की क्षमता demonstrate करते हुए। - Local फ़ाइल @@ -2069,7 +2189,7 @@ nextflow run main.nf 5. **`channel.fromFilePairs` के साथ Simplify करना:** हमने `channel.fromFilePairs()` का उपयोग करके automatically related files को pair किया और paired file IDs से metadata extract किया। ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Processes में File Operations का उपयोग करना:** हमने proper input handling के साथ Nextflow processes में file operations को integrate किया, metadata के आधार पर outputs organize करने के लिए `output {}` block का उपयोग किया। @@ -2079,10 +2199,10 @@ nextflow run main.nf ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -2095,16 +2215,13 @@ nextflow run main.nf - Metadata के आधार पर outputs organize करो - ````groovy - output { - analysis_results { - path { meta,```groovy + ```groovy output { analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } } - ```` + ``` ### अतिरिक्त संसाधन diff --git a/docs/it/docs/hello_nextflow/01_hello_world.md b/docs/it/docs/hello_nextflow/01_hello_world.md index d6e07c58c1..c2edb5a7ef 100644 --- a/docs/it/docs/hello_nextflow/01_hello_world.md +++ b/docs/it/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "Output del comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -L'output del terminale dovrebbe sembrare familiare. Esternamente, nulla è cambiato. +L'output del terminale ora termina con un riepilogo `Outputs:` che elenca gli output pubblicati e la directory in cui sono stati scritti. -Tuttavia, controllate il vostro esplora file: questa volta, Nextflow ha creato una nuova directory chiamata `results/`. +Controllate il vostro esplora file: questa volta, Nextflow ha anche creato una nuova directory chiamata `results/`. ??? abstract "Contenuto della directory" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Questa volta il risultato viene scritto nella sottodirectory specificata. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Questa volta, se guardate i risultati, il file è una copia vera e propria invece di un semplice symlink. @@ -767,19 +785,19 @@ Nel blocco del process, fate la seguente modifica al codice: === "Dopo" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "Prima" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` Il simbolo `$` e le parentesi graffe (`{ }`) dicono a Nextflow che questo è un nome di variabile che deve essere sostituito con il valore di input effettivo (=interpolato). @@ -811,15 +829,15 @@ Nel blocco del workflow, fate la seguente modifica al codice: === "Dopo" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // emette un saluto - sayHello(params.input) + // emette un saluto + sayHello(params.input) ``` === "Prima" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // emette un saluto - sayHello() + // emette un saluto + sayHello() ``` Questo dice a Nextflow di eseguire il process `sayHello` sul valore fornito tramite il parametro `--input`. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Se avete fatto tutte queste modifiche correttamente, dovreste ottenere un'altra esecuzione riuscita. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "Se non ha funzionato" @@ -936,7 +966,8 @@ nextflow run hello-world.nf Questo è stato menzionato all'inizio del corso, ma forse ve lo siete perso. Controllate il materiale di aiuto sulle [versioni di Nextflow](../info/nxf_versions.md). - In breve, se state usando Nextflow `25.10` allora dovete abilitare il parser del linguaggio v2: + Il parser v2 è quello predefinito a partire da Nextflow 26.04, quindi questo problema si presenterà solo con versioni precedenti. + Su una versione precedente alla 26.04 dovete abilitare il parser del linguaggio v2: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Ancora una volta, dovreste trovare l'output aggiornato corrispondente nella vostra directory results. @@ -1004,8 +1041,6 @@ Sapere come avviare workflow e recuperare output è ottimo, ma scoprirete rapida Qui vi mostriamo come usare la funzione [`-resume`](https://nextflow.io/docs/latest/cache-and-resume.html) per quando dovete ri-avviare lo stesso workflow, come ispezionare il log delle esecuzioni passate con [`nextflow log`](https://nextflow.io/docs/latest/reference/cli.html#log), e come eliminare le directory work più vecchie con [`nextflow clean`](https://nextflow.io/docs/latest/reference/cli.html#clean). - - ### 4.1. Ri-avviare un workflow con `-resume` A volte vorrete ri-eseguire una pipeline che avete già avviato in precedenza senza rifare alcuno step che è già stato completato con successo. @@ -1022,17 +1057,23 @@ Ci sono due vantaggi chiave nel fare questo: Per usarlo, aggiungete semplicemente `-resume` al vostro comando ed eseguitelo: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "Output del comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` L'output della console dovrebbe sembrare familiare, ma c'è una cosa leggermente diversa rispetto a prima. diff --git a/docs/it/docs/hello_nextflow/02_hello_channels.md b/docs/it/docs/hello_nextflow/02_hello_channels.md index 0f6a9cd512..7c69f068d3 100644 --- a/docs/it/docs/hello_nextflow/02_hello_channels.md +++ b/docs/it/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` Come in precedenza, troverete il file di output chiamato `output.txt` nella directory `results/hello_channels` (come specificato nel blocco `output` dello script del flusso di lavoro, mostrato sopra). @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Se avete effettuato entrambe le modifiche correttamente, dovreste ottenere un'esecuzione riuscita. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "Output del comando" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Come potete vedere, questo mostra i contenuti del canale sulla console. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "Output del comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Sembra certamente che abbia funzionato correttamente. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Questa volta vediamo tutte e tre le esecuzioni dei processi e le loro sottodirectory di lavoro associate elencate nell'output. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Tornando alla vista riassuntiva, l'output è di nuovo riassunto su una riga. @@ -605,8 +652,6 @@ Date un'occhiata alla directory `results` per vedere se tutti i saluti di output └── output.txt ``` -Sì! E ognuno ha i contenuti attesi. - ??? abstract "Contenuto del file" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "Output del comando" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -941,16 +986,25 @@ nextflow run hello-channels.nf ??? success "Output del comando" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Questa volta funziona E ci dà la comprensione aggiuntiva di come appaiono i contenuti del canale prima e dopo l'esecuzione dell'operatore `flatten()`. @@ -1024,11 +1078,13 @@ Effettuate la seguente modifica alla dichiarazione del parametro: === "Prima" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Pipeline parameters */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` Questo presuppone che il file sia nella stessa posizione del codice del flusso di lavoro. @@ -1095,9 +1151,9 @@ nextflow run hello-channels.nf ??? failure "Output del comando" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1198,12 +1254,12 @@ nextflow run hello-channels.nf ??? failure "Output del comando" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1318,12 +1374,12 @@ nextflow run hello-channels.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1331,6 +1387,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` Questa volta dovrebbe funzionare senza errori. diff --git a/docs/it/docs/hello_nextflow/03_hello_workflow.md b/docs/it/docs/hello_nextflow/03_hello_workflow.md index 815a4ed43e..e08ff3de93 100644 --- a/docs/it/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/it/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` Come in precedenza, troverete i file di output nella posizione specificata nel blocco `output`. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` Ora c'è una riga extra nell'output della console che corrisponde al nuovo processo che abbiamo appena aggiunto. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "Output del comando" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + L'output del terminale ora termina anche con un blocco di riepilogo `Outputs:`. Lo abbiamo omesso qui per concentrarci sulle righe di stato dei processi. + Viene eseguito con successo, incluso il terzo passaggio. Tuttavia, guardate il numero di chiamate per `collectGreetings()` nell'ultima riga. @@ -627,8 +651,8 @@ Ora date un'occhiata ai contenuti del file di output finale. ??? abstract "Contenuto del file" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` Oh no. Il passaggio di raccolta è stato eseguito individualmente su ogni saluto, il che NON è quello che volevamo. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ Infine, potete dare un'occhiata ai contenuti del file di output per assicurarvi ??? abstract "Contenuto del file" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` Viene eseguito con successo e produce l'output desiderato: ??? abstract "Contenuto del file" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` Se guardate nella directory `results/hello_workflow/`, troverete il nuovo file di report, `trio-report.txt`. @@ -1273,5 +1326,5 @@ Quando si forniscono input multipli a un processo, cosa deve essere vero? - [x] L'ordine degli input deve corrispondere all'ordine definito nel blocco input - [ ] Possono essere forniti solo due input alla volta -Per approfondire: [3. Passare parametri aggiuntivi a un processo](#3-pass-more-than-one-input-to-a-process) +Per approfondire: [3. Passare parametri aggiuntivi a un processo](#3-pass-additional-parameters-to-a-process) diff --git a/docs/it/docs/hello_nextflow/04_hello_modules.md b/docs/it/docs/hello_nextflow/04_hello_modules.md index a7ed28bb79..fd396a0b7d 100644 --- a/docs/it/docs/hello_nextflow/04_hello_modules.md +++ b/docs/it/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` Come in precedenza, troverete i file di output nella directory specificata nel blocco `output` (qui, `results/hello_modules/`). @@ -172,7 +187,7 @@ Inseriamola sopra il blocco `params` e compiliamola appropriatamente. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ Inseriamola sopra il blocco `params` e compiliamola appropriatamente. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ Inserite la dichiarazione di include sopra il blocco `params` e compilatela appr * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ Inserite la dichiarazione di include sopra il blocco `params` e compilatela appr * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ Inserite la dichiarazione di include sopra il blocco `params` e compilatela appr * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ Inserite la dichiarazione di include sopra il blocco `params` e compilatela appr * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/it/docs/hello_nextflow/05_hello_containers.md b/docs/it/docs/hello_nextflow/05_hello_containers.md index 732c5c6f0b..9e1481c715 100644 --- a/docs/it/docs/hello_nextflow/05_hello_containers.md +++ b/docs/it/docs/hello_nextflow/05_hello_containers.md @@ -3,7 +3,7 @@ :material-information-outline:{ .ai-translation-notice-icon } Traduzione assistita da IA - [scopri di più e suggerisci miglioramenti](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md)
- +
/// caption @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` Come in precedenza, troverete i file di output nella directory specificata nel blocco `output` (`results/hello_containers/`). @@ -259,22 +273,22 @@ Ora che siete all'interno del container, potete eseguire il comando `cowpy` dire Per esempio, la documentazione dello strumento dice che possiamo cambiare il personaggio ('cowacter') con `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Output del comando" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "Output del comando (modificato per chiarezza)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` Questa volta funziona davvero! diff --git a/docs/it/docs/hello_nextflow/06_hello_config.md b/docs/it/docs/hello_nextflow/06_hello_config.md index 123412bfcf..8ff17a2669 100644 --- a/docs/it/docs/hello_nextflow/06_hello_config.md +++ b/docs/it/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Come in precedenza, troverete i file di output nella directory specificata nel blocco `output` (`results/hello_config/`). @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Questo produce ancora lo stesso output di prima. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` Questo creerà un nuovo set di directory sotto `tux-run/` incluse `tux-run/work/` e `tux-run/results/`. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` Il file di output finale dovrebbe contenere il personaggio stegosaurus che dice i saluti. @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Questo pubblica gli output in `custom-outdir-cli/` invece di `results/`: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` Questo pubblica gli output in `custom-outdir-config-2/rep2/`, con il percorso base specificato _e_ la sottodirectory del nome del batch _e_ i risultati raggruppati per processo: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Questo pubblica gli output in `config-output-mode/`, e sono ancora tutte copie appropriate, non symlink. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "Output del comando" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` Questo dovrebbe funzionare senza problemi e produrre gli stessi output di prima sotto `custom-outdir-config/conda`. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Come potete vedere, questo ci permette di alternare tra configurazioni molto comodamente a runtime. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` Questo userà Docker dove possibile e produrrà output sotto `custom-outdir-config/test`, e questa volta il personaggio è il duo comico `dragonandcow`. diff --git a/docs/it/docs/hello_nf-core/00_orientation.md b/docs/it/docs/hello_nf-core/00_orientation.md index 9e90f35480..de7d648860 100644 --- a/docs/it/docs/hello_nf-core/00_orientation.md +++ b/docs/it/docs/hello_nf-core/00_orientation.md @@ -22,25 +22,20 @@ Se state seguendo questo corso autonomamente, vi preghiamo di familiarizzare con ### Requisiti di versione -Questa formazione è progettata per **Nextflow 25.10.2** o successivo **con il parser di sintassi v2 DISABILITATO**. +Questa formazione funziona con Nextflow 25.10.2 o successivo **con il parser di sintassi v2**, che è quello predefinito a partire da Nextflow 26.04. +Nel nostro ambiente di formazione non dovete fare nulla: esegue Nextflow 26.04.4 con il parser v2. Se state utilizzando un ambiente locale o personalizzato, consultate le [note sulla versione](../info/nxf_versions.md). -#### Se state utilizzando il nostro ambiente di formazione: - -DOVETE eseguire il seguente comando prima di procedere oltre: - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### Se state utilizzando un ambiente locale o personalizzato: - -Assicuratevi di utilizzare le impostazioni corrette come documentato [qui](../info/nxf_versions.md). - -La formazione richiede inoltre **nf-core tools 3.5.2**. +Questa formazione richiede inoltre **nf-core tools 4.0.2**. Se utilizzate una versione diversa degli strumenti nf-core, potreste avere difficoltà a seguire. Potete verificare quale versione è installata nel vostro ambiente utilizzando il comando `nf-core --version`. +!!! warning "Compatibilità con il parser v2" + + Molte pipeline nf-core non supportano ancora il parser di sintassi v2. + Se eseguite una pipeline nf-core diversa da quelle utilizzate in questo corso e riscontrate errori, potrebbe essere necessario passare al parser v1 impostando `export NXF_SYNTAX_PARSER=v1`. + Consultate le [note sulla versione](../info/nxf_versions.md) per i dettagli. + ## Prepararsi a lavorare Una volta che il vostro codespace è in esecuzione, ci sono due cose da fare prima di immergersi nella formazione: impostare la directory di lavoro per questo corso specifico e dare un'occhiata ai materiali forniti. @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ Utilizziamo sezioni espandibili come questa per includere l'output previsto dei - **Il file `greetings.csv`** è un CSV contenente alcuni dati colonnari minimi che utilizziamo a scopo di test. +- **Il file `custom.config`** è un esempio di file di configurazione Nextflow utilizzato nella Parte 1 per illustrare gli override delle risorse dei processi e `ext.args`. + +- **Il file `malformed_samplesheet.csv`** è un samplesheet intenzionalmente non valido utilizzato nella Parte 1 per illustrare la validazione dell'input. + +- **Il file `my_params.yml`** è un esempio di file di parametri utilizzato nella Parte 1 per illustrare come passare parametri booleani a una pipeline. + - **La directory `original-hello`** contiene una copia del codice sorgente prodotto lavorando attraverso la serie completa di formazione Hello Nextflow (con Docker abilitato). - **La directory `solutions`** contiene gli script del flusso di lavoro completati che risultano da ogni fase del corso. @@ -108,11 +112,11 @@ Utilizziamo sezioni espandibili come questa per includere l'output previsto dei ## Lista di controllo della preparazione -Pensa di essere pronto/a per iniziare? +Pensate di essere pronti per iniziare? - [ ] Comprendo l'obiettivo di questo corso e i suoi prerequisiti - [ ] Il mio ambiente è attivo e funzionante -- [ ] Mi sono assicurato/a che il parser di sintassi sia impostato su **v1** +- [ ] Sto utilizzando nf-core tools 4.0.2 (verificate con `nf-core --version`) - [ ] Ho impostato la mia directory di lavoro in modo appropriato Se potete spuntare tutte le caselle, siete pronti per iniziare. diff --git a/docs/it/docs/hello_nf-core/01_run_demo.md b/docs/it/docs/hello_nf-core/01_run_demo.md index 9a4d535cf0..5cdb49fd4c 100644 --- a/docs/it/docs/hello_nf-core/01_run_demo.md +++ b/docs/it/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ La scheda `Introduction` fornisce una panoramica della pipeline, inclusa una rap ![mappa della metropolitana della pipeline](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. Esempio di riga di comando @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow esegue un `pull` del codice della pipeline, cioè scarica il repository completo sul vostro disco locale. @@ -106,40 +107,73 @@ nextflow list Potete provare a fare il pull di alcune altre pipeline per vedere come vengono elencate quando ne avete più di una. -#### 1.2.3. Trovare le pipeline in `$NXF_HOME/assets/` +#### 1.2.3. Trovare dove è stata scaricata la pipeline Noterete che i file non sono nella vostra directory di lavoro corrente. -Per impostazione predefinita, Nextflow li salva in `$NXF_HOME/assets`. +Per impostazione predefinita, Nextflow salva le pipeline scaricate in `$NXF_HOME/assets`. + +Per trovare dove si trova una pipeline specifica, chiedete direttamente a Nextflow: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "Output del comando" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "Nota" +!!! info "Info" Il percorso completo potrebbe differire sul vostro sistema se non state utilizzando il nostro ambiente di formazione. Nextflow mantiene intenzionalmente il codice sorgente scaricato 'fuori mano' sul principio che queste pipeline dovrebbero essere utilizzate più come librerie che come codice con cui interagire direttamente. +Internamente, Nextflow memorizza ogni pipeline scaricata come repository git in `$NXF_HOME/assets/.repos/`, e fa il checkout del codice per ogni revisione in una sottodirectory `clones//`. +Poiché `.repos` è una directory nascosta, un semplice `tree -L 2 $NXF_HOME/assets/` apparirà vuoto. + #### 1.2.4. Creare un symlink per accedere facilmente al codice sorgente Non esamineremo il codice in dettaglio, ma diamo una rapida occhiata per farci un'idea di come appare l'organizzazione generale. -Per rendere più facile sfogliare il codice sorgente della pipeline, create un collegamento simbolico alla directory degli asset: +Per rendere più facile sfogliare il codice sorgente della pipeline, create un collegamento simbolico che punta alla copia estratta della pipeline: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -Questo crea una scorciatoia che vi permette di esplorare il codice con `tree -L 2 pipelines` o di aprire i file direttamente. +Questo crea una scorciatoia che vi permette di esplorare il codice con `tree -L 2 pipelines/nf-core/demo` o di aprire i file direttamente. #### 1.2.5. Panoramica dell'organizzazione del codice @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` Come potete vedere, c'è molto in corso là dentro, ma la maggior parte non richiede la vostra attenzione. @@ -211,7 +247,7 @@ Convenientemente, ogni pipeline nf-core viene fornita con un profilo di test. Questo è un set minimo di impostazioni di configurazione per l'esecuzione della pipeline utilizzando un piccolo dataset di test ospitato nel repository [nf-core/test-datasets](https://github.com/nf-core/test-datasets). È un ottimo modo per provare rapidamente una pipeline su piccola scala. -!!! note "Nota" +!!! tip "Suggerimento" Il sistema di profili di configurazione di Nextflow vi permette di passare facilmente tra diversi motori di container o ambienti di esecuzione. Per maggiori dettagli, vedete [Hello Nextflow Parte 6: Configuration](../hello_nextflow/06_hello_config.md). @@ -220,10 +256,10 @@ Questo è un set minimo di impostazioni di configurazione per l'esecuzione della È buona pratica verificare cosa specifica il profilo di test di una pipeline prima di eseguirla. Il profilo `test` per `nf-core/demo` risiede nel file di configurazione `conf/test.config`. -Potete trovarlo localmente all'interno del codice sorgente della pipeline scaricato da `nextflow pull`: +Potete trovarlo localmente all'interno del codice sorgente della pipeline scaricato da `nextflow pull`, tramite il symlink `pipelines` creato nella sezione 1.2.4: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` Ecco il contenuto di quel file: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Dati di input - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` Questo è chiamato samplesheet, ed è la forma più comune di input per le pipeline nf-core. +Non preoccupatevi se non avete familiarità con i formati e i tipi di dati, non è importante per quello che segue. -!!! note "Nota" - - Non preoccupatevi se non avete familiarità con i formati e i tipi di dati, non è importante per quello che segue. - -Quindi questo conferma che abbiamo tutto ciò di cui abbiamo bisogno per provare la pipeline. +Ora abbiamo tutto ciò di cui abbiamo bisogno per provare la pipeline. ### 2.2. Eseguire la pipeline -Decidiamo di usare Docker per il sistema di container e `demo-results` come directory di output, e siamo pronti per eseguire il comando di test: +Come indicato sopra, possiamo usare il comando di test di esempio quasi così com'è; dobbiamo solo specificare quale sistema di packaging del software usare e come chiamare la directory di output. +Qui useremo Docker per il sistema di container e `demo-results`, rispettivamente. + +Con questo, possiamo eseguire il comando di test: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ Se il vostro output corrisponde a quello, congratulazioni! Avete appena eseguito Noterete che c'è molto più output sulla console rispetto a quando eseguite una pipeline Nextflow di base. C'è un'intestazione che include un riepilogo della versione della pipeline, input e output, e alcuni elementi di configurazione. -!!! note "Nota" +!!! info "Info" Il vostro output mostrerà timestamp, nomi di esecuzione e percorsi di file diversi, ma la struttura complessiva e l'esecuzione dei processi dovrebbero essere simili. Notate la riga vicino alla cima dell'output: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` Questo vi dice quale revisione della pipeline è stata utilizzata. @@ -379,7 +417,7 @@ Poiché non abbiamo specificato una versione, Nextflow ha usato l'ultimo commit Per esecuzioni riproducibili, dovreste fissare una release specifica usando il flag `-r`: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` Questo garantisce che lo stesso codice della pipeline venga utilizzato ogni volta, indipendentemente da nuovi commit o release. @@ -388,14 +426,15 @@ Per questa formazione omettiamo `-r` per semplicità, ma in produzione dovreste Passando all'output di esecuzione, diamo un'occhiata alle righe che ci dicono quali processi sono stati eseguiti: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Questo ci dice che sono stati eseguiti tre processi, corrispondenti ai tre strumenti mostrati nella pagina di documentazione della pipeline sul sito web nf-core: FASTQC, SEQTK_TRIM e MULTIQC. +Questo ci dice che sono stati eseguiti quattro processi, corrispondenti ai quattro strumenti mostrati nella pagina di documentazione della pipeline sul sito web nf-core: `FASTQC`, `SEQTK_TRIM`, `MULTIQC` e `COWPY`. I nomi completi dei processi come mostrati qui, come `NFCORE_DEMO:DEMO:MULTIQC`, sono più lunghi di quelli che potreste aver visto nel materiale introduttivo Hello Nextflow. Questi includono i nomi dei loro workflow padre e riflettono la modularità del codice della pipeline. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` Potrebbe sembrare molto. -Per saperne di più sugli output della pipeline `nf-core/demo`, consultate la sua [pagina di documentazione](https://nf-co.re/demo/1.1.0/docs/output/). +Per saperne di più sugli output della pipeline `nf-core/demo`, consultate la sua [pagina di documentazione](https://nf-co.re/demo/1.2.0/docs/output/). In questa fase, ciò che è importante osservare è che i risultati sono organizzati per modulo, e c'è inoltre una directory chiamata `pipeline_info` contenente vari report con timestamp sull'esecuzione della pipeline. @@ -443,7 +485,7 @@ Per esempio, il file `execution_timeline_*` vi mostra quali processi sono stati ![report della timeline di esecuzione](./img/execution_timeline.png) -!!! note "Nota" +!!! info "Info" Qui le attività non sono state eseguite in parallelo perché stiamo eseguendo su una macchina minimalista in Github Codespaces. Per vedere queste eseguite in parallelo, provate ad aumentare l'allocazione CPU del vostro codespace e i limiti di risorse nella configurazione di test. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,29 +596,103 @@ Nelle pipeline Nextflow semplici, `--help` funziona solo se lo sviluppatore lo h Come trattato in [Hello Config](../hello_nextflow/06_hello_config.md), potete impostare i valori dei parametri dalla riga di comando con `--nome_parametro` o raccogliere un insieme di parametri in un file YAML e passarlo con `-params-file`. Entrambi gli approcci funzionano allo stesso modo con le pipeline nf-core. -Per esempio, per saltare la fase di trimming: +Per esempio, per saltare la fase di trimming, vogliamo impostare il parametro boolean `skip_trim` a `true`. +Nella vostra directory di lavoro è fornito un file di parametri chiamato `my_params.yml` con quel valore già impostato: + +```yaml title="my_params.yml" +skip_trim: true +``` + +Passatelo con `-params-file`: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "Output del comando" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` Il processo `SEQTK_TRIM` non appare più nell'output. -!!! info "Info" +!!! warning "Avviso: limitazioni importanti sull'input dei parametri" + + **Impostare parametri boolean dalla riga di comando** + + A partire da Nextflow versione 26.04, tutti i valori forniti dalla riga di comando sono tipizzati come stringhe. + Per un parametro boolean come `skip_trim`, passarlo come flag semplice (`--skip_trim`) o come `--skip_trim true` viene valutato come la **stringa** `"true"`, che non supera la validazione dello schema: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + Per impostare un parametro boolean a un valore genuino `true`/`false`, usate un `-params-file` come mostrato sopra, oppure impostatelo in un file di configurazione. + I parametri di tipo string, integer e file-path non sono interessati e possono ancora essere impostati direttamente dalla riga di comando. + Questo corso usa questo schema per tutti i parametri boolean. + + **Usare file di configurazione personalizzati** Sebbene sia tecnicamente possibile impostare i parametri della pipeline in un file di configurazione personalizzato passato con `-c`, questo potrebbe non sovrascrivere i valori predefiniti già impostati nel `nextflow.config` della pipeline, a seconda delle regole di precedenza della configurazione di Nextflow. Usare `--nome_parametro` dalla riga di comando o `-params-file` è più affidabile, poiché questi hanno sempre la precedenza. - **Come regola generale:** se appare nell'output di `--help`, impostatelo tramite la riga di comando o un file di parametri piuttosto che un file di configurazione. + Come regola generale: se appare nell'output di `--help`, impostatelo tramite la riga di comando o un file di parametri piuttosto che un file di configurazione. #### 3.1.3. Validazione dei parametri @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` La pipeline continua a essere eseguita, ma l'avviso vi avvisa immediatamente che `--foobar` non è un parametro riconosciuto. -Questo intercetta errori di battitura come `--outDir` invece di `--outdir` prima che sprechiate tempo di calcolo chiedendovi perché l'output è finito nel posto sbagliato. +Questo è pensato per attirare la vostra attenzione su errori di battitura non bloccanti, come `--outDir` usato invece di `--outdir`, che può aiutarvi a evitare di sprecare tempo e risorse di calcolo. ##### 3.1.3.2. Valori di parametri non validi @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` La pipeline si ferma prima che vengano eseguiti i processi, risparmiandovi un'esecuzione fallita o errata. -I parametri boolean dovrebbero essere passati come flag (`--skip_trim`) senza un valore, oppure impostati a `true`/`false` in un file di parametri. +Come indicato nella sezione 3.1.2, i parametri boolean dovrebbero essere impostati a un valore genuino `true`/`false` in un file di parametri piuttosto che passati dalla riga di comando, poiché i valori da riga di comando sono tipizzati come stringhe. #### 3.1.4. Validazione dell'input @@ -637,7 +756,7 @@ Tratteremo anche questo in maggior dettaglio nella [Parte 5: Input Validation](0 La pipeline `nf-core/demo` si aspetta un file CSV con le colonne `sample`, `fastq_1` e `fastq_2`. Questo è definito in un file di schema (`assets/schema_input.json`) che specifica la struttura attesa, i tipi di colonna e i vincoli. -??? abstract "assets/schema_input.json" +??? abstract "File di schema per gli input" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Questo è definito in un file di schema (`assets/schema_input.json`) che specifi Lo schema specifica che `sample` e `fastq_1` sono obbligatori, mentre `fastq_2` è opzionale (supportando sia dati paired-end che single-end). I percorsi dei file vengono validati per esistenza e pattern dell'estensione. -##### 3.1.4.1. Creare un samplesheet non valido - -Create un samplesheet con una colonna mancante e un percorso di file inesistente: +Per dimostrarlo, nella vostra directory di lavoro è fornito un samplesheet non valido chiamato `malformed_samplesheet.csv`: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` Questo samplesheet manca della colonna obbligatoria `fastq_1` e ha un percorso di file inesistente in `fastq_2`. -Entrambi i problemi produrranno errori di validazione nel passo successivo. - -##### 3.1.4.2. Eseguire la pipeline demo con il samplesheet non valido -Eseguite la pipeline demo usando `malformed_samplesheet.csv` come input. +Eseguite la pipeline demo usando `malformed_samplesheet.csv` come input: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -725,14 +840,27 @@ Le pipeline nf-core includono la configurazione predefinita in `nextflow.config` Prima di sovrascrivere qualsiasi cosa, è utile sapere dove si trovano i valori predefiniti. Avete già visto nella sezione 2.1 che il codice sorgente della pipeline si trova in `$NXF_HOME/assets`. -Elencate i file di configurazione per vedere cosa è disponibile: +Usando il symlink `pipelines` dalla sezione 1.2.4, elencate i file di configurazione per vedere cosa è disponibile: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ Se desiderate modificare qualsiasi impostazione specificata in questi file, non Create invece il vostro file di configurazione e passatelo con `-c`. I valori che specificate sovrascriveranno i valori predefiniti impostati in quegli altri file. -Eseguiamo alcuni esercizi per farlo in pratica. +Proviamo questo in pratica. -#### 3.2.1. Modificare l'allocazione delle risorse per un processo +#### 3.2.1. Personalizzare le risorse dei processi e gli argomenti degli strumenti -La pipeline demo assegna le risorse usando etichette definite in `base.config`. -Per esempio, `FASTQC` usa l'etichetta `process_medium`, che alloca 6 CPU e 36 GB di memoria. +I moduli nf-core supportano due tipi comuni di sovrascrittura della configurazione: **allocazione delle risorse** (CPU, memoria, tempo) e **argomenti degli strumenti** tramite `ext.args`. -Il profilo di test limita le risorse tramite `resourceLimits`, ma potete anche sovrascrivere le risorse per processi specifici. +Molti strumenti da riga di comando hanno argomenti che non sono abbastanza comunemente usati da essere esposti come parametri della pipeline. +La convenzione `ext.args` vi permette di passare questi argomenti allo strumento sottostante tramite un file di configurazione. -Create un file chiamato `custom.config`: +Il file `custom.config` fornito nella vostra directory di lavoro dimostra entrambe le sovrascritture: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -Eseguite la pipeline con la vostra configurazione personalizzata: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "Output del comando" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -Il flag `-c` aggiunge la vostra configurazione sopra la configurazione integrata della pipeline. - -#### 3.2.2. Impostare i valori degli argomenti degli strumenti con `ext.args` - -Molti strumenti da riga di comando hanno argomenti che non sono obbligatori e quindi non vengono impostati come parametri della pipeline a meno che non siano molto comunemente usati. -Per quegli argomenti degli strumenti, i moduli nf-core usano una convenzione Nextflow chiamata `ext.args` per passare argomenti allo strumento sottostante tramite un file di configurazione. - -Per esempio, aggiungiamo un argomento di trimming al modulo `SEQTK_TRIM` usando `ext.args`. - -##### 3.2.2.1. Aggiornare la configurazione personalizzata - -Aggiornate il vostro `custom.config`: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -Questo dice a `seqtk trimfq` di tagliare 5 basi dall'inizio di ogni read in aggiunta al trimming di qualità. +Il primo blocco sovrascrive l'allocazione delle risorse di `FASTQC`. +Per impostazione predefinita, `FASTQC` usa l'etichetta `process_medium` da `base.config`, che alloca 6 CPU e 36 GB di memoria; qui la limitiamo a 2 CPU e 4 GB. -##### 3.2.2.2. Eseguire la pipeline +Il secondo blocco passa un argomento aggiuntivo a `SEQTK_TRIM` tramite `ext.args`. +Il flag `-b 5` dice a `seqtk trimfq` di tagliare 5 basi dall'inizio di ogni read in aggiunta al trimming di qualità. -Eseguite di nuovo la pipeline con questa configurazione per vedere l'effetto: +Eseguite la pipeline con questa configurazione: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "Output del comando" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Per verificare che l'argomento sia stato applicato, trovate l'hash della directory di lavoro di `SEQTK_TRIM` dall'output dell'esecuzione (ad es. `work/ab/cd1234...`) e controllate il file `.command.sh` al suo interno: +Il flag `-c` aggiunge la vostra configurazione sopra la configurazione integrata della pipeline. + +Per verificare che la sovrascrittura di `ext.args` abbia avuto effetto, trovate l'hash della directory di lavoro di `SEQTK_TRIM` dall'output dell'esecuzione (ad es. `work/17/428668...`) e controllate il file `.command.sh` al suo interno: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "Output del comando" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` -Dovreste vedere `-b 5` nel comando `seqtk trimfq`, confermando che la vostra sovrascrittura di `ext.args` ha avuto effetto. +Dovreste vedere `-b 5` nel comando `seqtk trimfq`. -##### 3.2.2.3. Sovrascrivere i valori predefiniti - -Alcuni moduli hanno `ext.args` già impostato per impostazione predefinita. -Per esempio, il modulo `FASTQC` è configurato con `ext.args = '--quiet'` per impostazione predefinita (definito in `conf/modules.config`). +Una cosa importante da sapere su `ext.args`: se un modulo ha già un valore predefinito impostato, il vostro valore lo **sostituirà completamente** invece di aggiungersi ad esso. +Per esempio, `FASTQC` ha `ext.args = '--quiet'` impostato per impostazione predefinita in `conf/modules.config`: ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -Se fornite un valore per `ext.args` tramite un file di configurazione personalizzato, quel valore sostituirà completamente il valore predefinito impostato per quel processo. - -Quindi per esempio, se il valore predefinito era `'--quiet'` e impostate `ext.args = '--kmers 8'`, il flag `--quiet` non verrà più applicato. +Se impostate `ext.args = '--kmers 8'` per `FASTQC`, il flag `--quiet` non verrà più applicato. Per mantenere entrambi, impostate `ext.args = '--quiet --kmers 8'`. -Questo significa che siete responsabili di verificare qual è la configurazione predefinita degli strumenti a cui volete fornire valori di argomenti con `ext.args`. +Dovreste sempre verificare la configurazione predefinita di un modulo prima di sovrascrivere `ext.args`. ### Takeaway @@ -878,4 +976,6 @@ Sapete come ottenere aiuto da una pipeline nf-core, impostare i parametri e capi ### Cosa c'è dopo? -Prendetevi una pausa! Quando siete pronti, passate alla Parte 2, dove creerete la vostra pipeline compatibile con nf-core da zero. +Se volete solo eseguire pipeline nf-core, avete finito! + +Se volete imparare a sviluppare le vostre pipeline secondo gli standard nf-core, prendetevi una pausa e passate alla Parte 2 quando siete pronti. Imparerete a creare la vostra pipeline compatibile con nf-core usando gli strumenti basati sul template nf-core. diff --git a/docs/it/docs/hello_nf-core/02_rewrite_hello.md b/docs/it/docs/hello_nf-core/02_rewrite_hello.md index 73ec17569c..92a94a24d9 100644 --- a/docs/it/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/it/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Se non avete familiarità con la pipeline Hello o potreste aver bisogno di un ri - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "Nota" - - Assicuratevi di trovarvi nella directory `hello-nf-core` nel vostro terminale. - --- ## 1. Esaminare la struttura del codice della pipeline @@ -30,6 +26,7 @@ Il progetto nf-core impone linee guida rigorose su come le pipeline sono struttu Prima di affrontare il nostro progetto di creazione della pipeline, dobbiamo comprendere quella struttura e organizzazione. Quindi diamo un'occhiata a come il codice della pipeline è organizzato nel repository `nf-core/demo`, utilizzando il symlink `pipelines` che abbiamo creato nella Parte 1. +Assicuratevi di trovarvi nella directory `hello-nf-core` nel vostro terminale. Come promemoria, potete usare `tree` o il file explorer per trovare e aprire la directory `nf-core/demo`. @@ -82,7 +79,7 @@ Ecco come appaiono le relazioni tra i componenti del codice rilevanti: Il flusso di lavoro senza nome in `main.nf` è chiamato script _entrypoint_. Funge da wrapper per due tipi di flussi di lavoro annidati: il flusso di lavoro `DEMO` contenente la logica di analisi effettiva, situato in `workflows/demo.nf`, e un insieme di flussi di lavoro di housekeeping situati sotto `subworkflows/`. Il flusso di lavoro `demo.nf` si avvale di **moduli** situati sotto `modules/`; questi contengono i **processi** che eseguiranno i passi di analisi effettivi. -!!! note "Nota" +!!! info "Info" I subworkflow non sono limitati alle funzioni di housekeeping e possono utilizzare moduli di processo. @@ -107,7 +104,7 @@ Tratteremo le differenze rilevanti nella prossima parte di questo corso, quando Il flusso di lavoro `demo.nf` si avvale di **moduli** situati sotto `modules/`, che esamineremo di seguito. -!!! note "Nota" +!!! info "Info" Alcuni flussi di lavoro di analisi nf-core mostrano livelli aggiuntivi di annidamento chiamando subworkflow di livello inferiore. Questo viene utilizzato principalmente per raggruppare due o più moduli comunemente usati insieme in segmenti di pipeline facilmente riutilizzabili. @@ -266,13 +263,20 @@ Una volta chiusa la TUI, dovreste vedere il seguente output nella console. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -Non c'è una conferma esplicita nell'output della console che la creazione della pipeline abbia funzionato, ma dovreste vedere una nuova directory chiamata `core-hello`. +Una volta completata la TUI, lo strumento segnala che ha creato la pipeline e generato la sua configurazione dei container: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +Dovreste ora vedere una nuova directory chiamata `core-hello`. Visualizzate i contenuti della nuova directory per vedere quanto lavoro vi siete risparmiati utilizzando il template. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "Contenuto della directory" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` Sono molti file! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +Le righe `WARN: Unrecognized config option 'validation.*'` provengono dalla versione del plugin nf-schema fissata nel template appena creato. +Sono innocue e non influenzano l'esecuzione. + Questo vi mostra che tutto il cablaggio di base è a posto. Quindi, dove sono gli output? Ce ne sono? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -435,7 +446,7 @@ Diamo un'occhiata più da vicino. Questo funge da placeholder per il nostro flusso di lavoro di analisi, con alcune funzionalità nf-core già in atto. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -454,14 +465,16 @@ workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -478,19 +491,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -503,15 +513,15 @@ workflow HELLO { Rispetto a un flusso di lavoro Nextflow di base come quello sviluppato in [Hello Nextflow](../hello_nextflow/index.md), noterete alcune cose nuove qui (righe evidenziate sopra): - Il blocco workflow ha un nome -- Gli input del flusso di lavoro sono dichiarati utilizzando la parola chiave `take:` e la costruzione del canale viene spostata al flusso di lavoro genitore +- Gli input del flusso di lavoro sono dichiarati utilizzando la parola chiave `take:` (qui un canale samplesheet e una directory di output), e la costruzione del canale viene spostata al flusso di lavoro genitore - Il contenuto del flusso di lavoro è posizionato all'interno di un blocco `main:` - Gli output sono dichiarati utilizzando la parola chiave `emit:` Queste sono funzionalità opzionali di Nextflow che rendono il flusso di lavoro **componibile**, il che significa che può essere richiamato dall'interno di un altro flusso di lavoro. -??? note "Il blocco `Channel.topic`" +??? note "Il blocco `channel.topic`" - Potreste aver notato il blocco `def topic_versions = Channel.topic("versions")` che inizia alla riga 17. + Potreste aver notato il blocco `def topic_versions = channel.topic("versions")` che inizia alla riga 28. Si tratta di codice di housekeeping standard che raccoglie automaticamente le informazioni sulla versione del software da tutti i moduli. nf-core sta introducendo questo meccanismo in tutte le pipeline nel 2026, quindi lo vedrete in tutte le nuove pipeline da ora in avanti. La Parte 4 di questo corso spiega come funziona in dettaglio. @@ -575,15 +585,15 @@ nextflow run original-hello/hello.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` Se funziona, siete pronti per iniziare. @@ -704,7 +714,7 @@ Mentre ci siamo, possiamo anche commentare la riga `params.greeting = 'greetings params.character = 'turkey' ``` -!!! note "Nota" +!!! info "Info" Se avete installato l'estensione del language server di Nextflow, il controllo della sintassi evidenzierà il vostro codice con sottolineature rosse ondulate. Questo perché se inserite una dichiarazione `take:`, dovete anche avere un `main:`. @@ -851,7 +861,7 @@ Ci sono due osservazioni importanti da fare qui: - La sintassi per chiamare il flusso di lavoro importato è essenzialmente la stessa della sintassi per chiamare i moduli. - Tutto ciò che è correlato al trasferimento degli input nel flusso di lavoro (parametro di input e costruzione del canale) è ora dichiarato in questo flusso di lavoro genitore. -!!! note "Nota" +!!! info "Info" Nominare il file del flusso di lavoro entrypoint `main.nf` è una convenzione, non un requisito. @@ -878,19 +888,19 @@ Se avete effettuato tutte le modifiche correttamente, questo dovrebbe essere ese ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -Questo significa che abbiamo aggiornato con successo il nostro flusso di lavoro HELLO per essere componibile. +Questo significa che abbiamo aggiornato con successo il nostro flusso di lavoro `HELLO` per essere componibile. ### Takeaway @@ -932,14 +942,16 @@ workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -956,19 +968,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -978,8 +987,8 @@ workflow HELLO { */ ``` -Le righe evidenziate definiscono la struttura del flusso di lavoro componibile: `workflow HELLO {`, `take:`, `main:` ed `emit:`. -Il grande blocco tra le righe 17–34 è più sostanziale: gestisce la cattura delle versioni del software utilizzando i topic channel, un meccanismo che nf-core sta introducendo in tutte le pipeline nel 2026. +Questa è la struttura del flusso di lavoro componibile: un blocco `workflow HELLO {` con nome, con `take:`, `main:` ed `emit:`. +Il blocco sotto `// Collate and save software versions` è più sostanziale: gestisce la cattura delle versioni del software utilizzando i topic channel, un meccanismo che nf-core sta introducendo in tutte le pipeline nel 2026. Lo spiegheremo nella Parte 4; per ora, trattatelo come codice standard che potete lasciare invariato. Dobbiamo aggiungere il codice pertinente dalla versione componibile del flusso di lavoro originale che abbiamo sviluppato nella sezione 2. @@ -991,7 +1000,7 @@ Affronteremo questo nelle seguenti fasi: 3. Aggiungere la logica del flusso di lavoro al blocco `main` 4. Aggiornare il blocco `emit` -!!! note "Nota" +!!! info "Info" Ignoreremo il blocco di cattura delle versioni per questo primo passaggio. La Parte 4 spiega come funziona. @@ -1079,9 +1088,10 @@ Altre due osservazioni interessanti qui: Il progetto nf-core ha molte funzionalità pre-costruite intorno al concetto di samplesheet, che è tipicamente un file CSV contenente dati in colonne. Poiché è essenzialmente ciò che è il nostro file `greetings.csv`, manterremo l'attuale dichiarazione `take` così com'è, e aggiorneremo semplicemente il nome del canale di input nel prossimo passaggio. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // channel: samplesheet read in from --input + outdir ``` La gestione dell'input sarà fatta a monte di questo flusso di lavoro (non in questo file di codice). @@ -1111,20 +1121,21 @@ Come promemoria, questo è il codice pertinente nel flusso di lavoro originale, Dobbiamo copiare il codice che viene dopo `main:` nella nuova versione del flusso di lavoro. C'è già del codice lì che ha a che fare con la cattura delle versioni degli strumenti che vengono eseguiti dal flusso di lavoro. Lo lasceremo in pace per ora (ci occuperemo delle versioni degli strumenti più tardi). -Manterremo l'inizializzazione `ch_versions = channel.empty()` in alto, quindi inseriremo la nostra logica del flusso di lavoro, mantenendo il codice di raccolta delle versioni alla fine. +Manterremo l'inizializzazione `def ch_versions = channel.empty()` in alto, quindi inseriremo la nostra logica del flusso di lavoro, mantenendo il codice di raccolta delle versioni alla fine. Questo ordinamento ha senso perché in una pipeline reale, i processi emetterebbero informazioni sulla versione che verrebbero aggiunte al canale `ch_versions` mentre il flusso di lavoro viene eseguito. === "Dopo" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // emette un saluto sayHello(greeting_ch) @@ -1141,7 +1152,7 @@ Questo ordinamento ha senso perché in una pipeline reale, i processi emetterebb // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1158,37 +1169,36 @@ Questo ordinamento ha senso perché in una pipeline reale, i processi emetterebb "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` === "Prima" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1205,36 +1215,31 @@ Questo ordinamento ha senso perché in una pipeline reale, i processi emetterebb "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` -Noterete che abbiamo anche aggiunto una riga vuota prima di `main:` per rendere il codice più leggibile. - Sembra ottimo, ma dobbiamo ancora aggiornare il nome del canale che stiamo passando al processo `sayHello()` da `greeting_ch` a `ch_samplesheet` come mostrato di seguito, per corrispondere a ciò che è scritto sotto la parola chiave `take:`. === "Dopo" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // emette un saluto (updated to use the nf-core convention for samplesheets) sayHello(ch_samplesheet) ``` === "Prima" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // emette un saluto sayHello(greeting_ch) ``` @@ -1247,7 +1252,7 @@ Infine, dobbiamo aggiornare il blocco `emit` per includere la dichiarazione degl === "Dopo" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // channel: [ path(versions.yml) ] @@ -1255,12 +1260,12 @@ Infine, dobbiamo aggiornare il blocco `emit` per includere la dichiarazione degl === "Prima" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // channel: [ path(versions.yml) ] ``` -Questo conclude le modifiche che dobbiamo apportare al flusso di lavoro HELLO stesso. +Questo conclude le modifiche che dobbiamo apportare al flusso di lavoro `HELLO` stesso. A questo punto, abbiamo raggiunto la struttura complessiva del codice che ci eravamo proposti di implementare. ### Takeaway @@ -1324,7 +1329,8 @@ workflow CORE_HELLO { // WORKFLOW: Run pipeline // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1361,7 +1367,6 @@ workflow { // SUBWORKFLOW: Run completion tasks // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1377,7 +1382,7 @@ Il progetto nf-core fa un uso intensivo di subworkflow annidati, quindi questa p Ciò che conta qui è che ci sono due flussi di lavoro definiti: -- `CORE_HELLO` è un wrapper sottile per l'esecuzione del flusso di lavoro HELLO che abbiamo appena finito di adattare in `core-hello/workflows/hello.nf`. +- `CORE_HELLO` è un wrapper sottile per l'esecuzione del flusso di lavoro `HELLO` che abbiamo appena finito di adattare in `core-hello/workflows/hello.nf`. - Un flusso di lavoro senza nome che chiama `CORE_HELLO` così come altri due subworkflow, `PIPELINE_INITIALISATION` e `PIPELINE_COMPLETION`. Ecco un diagramma di come si relazionano tra loro: @@ -1422,9 +1427,9 @@ Se apriamo quel file e scorriamo verso il basso, arriviamo a questo blocco di co versions = ch_versions ``` -Questa è la fabbrica di canali che analizza il samplesheet e lo passa in una forma pronta per essere consumata dal flusso di lavoro HELLO. +Questa è la fabbrica di canali che analizza il samplesheet e lo passa in una forma pronta per essere consumata dal flusso di lavoro `HELLO`. -!!! note "Nota" +!!! info "Info" La sintassi sopra è un po' diversa da quella che abbiamo usato in precedenza, ma fondamentalmente questo: @@ -1533,7 +1538,7 @@ Ora possiamo aggiornare il file `test.config` come segue: === "Dopo" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1595,13 +1600,53 @@ E mentre ci siamo, stringiamo i limiti di risorse predefiniti per assicurarci ch Questo completa le modifiche del codice che dobbiamo fare. -### 5.4. Eseguire la pipeline con il profilo test +### 5.4. Disabilitare la validazione dei parametri + +Abbiamo sostituito il parsing del samplesheet del template con la nostra semplice costruzione del canale, ma il template include ancora un `nextflow_schema.json` e `assets/schema_input.json` che descrivono un samplesheet basato su fastq. +Poiché non abbiamo ancora adattato quegli schemi al nostro formato `greetings.csv`, dobbiamo disattivare la validazione dei parametri per ora (la configureremo correttamente più tardi). + +Aprite `core-hello/nextflow.config` e impostate `validate_params` su `false`: + +=== "Dopo" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "Prima" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +Impostiamo questo nel file di configurazione anziché sulla riga di comando perché a partire da Nextflow versione 26.04, tutti i valori forniti sulla riga di comando sono tipizzati come stringhe. +Di conseguenza, i parametri Boolean devono essere impostati in un file di configurazione o in un `-params-file` per assumere un valore genuino `true`/`false`. + +Ad esempio, usare `--validate_params false` qui verrebbe valutato come la **stringa** `"false"`, il che lascia la validazione attiva. + +!!! tip "Righe di compatibilità con il parser v2 in `nextflow.config`" + + A proposito di sintassi v2, potreste notare queste due righe appena sotto il blocco `params` nel file di configurazione: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + Queste sono necessarie per la compatibilità con il parser della sintassi v2. + + - Con la sintassi v2, le variabili `params.*` non possono essere referenziate direttamente all'interno delle direttive `publishDir` nei moduli di processo, quindi `outputDir` è definita qui come variabile di configurazione di livello superiore a cui quelle direttive possono accedere. + + - `workflow.output.mode` imposta la modalità di pubblicazione predefinita per il blocco di output del flusso di lavoro v2. + + Entrambe sono generate automaticamente dal template della pipeline nf-core e non devono essere modificate. + +### 5.5. Eseguire la pipeline con il profilo test È stato molto, ma possiamo finalmente provare a eseguire la pipeline! -Notate che dobbiamo aggiungere `--validate_params false` alla riga di comando perché non abbiamo ancora configurato la validazione (che arriverà più tardi). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` Se avete effettuato tutte le modifiche correttamente, dovrebbe essere eseguita fino al completamento. @@ -1609,9 +1654,9 @@ Se avete effettuato tutte le modifiche correttamente, dovrebbe essere eseguita f ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1623,10 +1668,10 @@ Se avete effettuato tutte le modifiche correttamente, dovrebbe essere eseguita f Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1637,17 +1682,17 @@ Se avete effettuato tutte le modifiche correttamente, dovrebbe essere eseguita f !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -Come potete vedere, questo ha prodotto il tipico riepilogo nf-core all'inizio grazie al subworkflow di inizializzazione, e le righe per ogni modulo ora mostrano i nomi completi PIPELINE:WORKFLOW:module. +Come potete vedere, questo ha prodotto il tipico riepilogo nf-core all'inizio grazie al subworkflow di inizializzazione, e le righe per ogni modulo ora mostrano i nomi completi `PIPELINE:WORKFLOW:module`. -### 5.5. Trovare gli output della pipeline +### 5.6. Trovare gli output della pipeline La domanda ora è: dove sono gli output della pipeline? E la risposta è abbastanza interessante: ci sono ora due posti diversi dove cercare i risultati. @@ -1663,17 +1708,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1683,7 +1728,7 @@ Questa volta vedete tutte le attività che sono state eseguite come previsto. ![report timeline di esecuzione per la pipeline Hello](./img/execution_timeline_hello.png) -!!! note "Nota" +!!! info "Info" Ancora una volta le attività non sono state eseguite in parallelo perché stiamo eseguendo su una macchina minimalista in Github Codespaces. Per vederle eseguire in parallelo, provate ad aumentare l'allocazione della CPU del vostro codespace e i limiti di risorse nella configurazione di test. diff --git a/docs/it/docs/hello_nf-core/03_use_module.md b/docs/it/docs/hello_nf-core/03_use_module.md index 1743500b61..aa8c526a00 100644 --- a/docs/it/docs/hello_nf-core/03_use_module.md +++ b/docs/it/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ Per dimostrare come funziona, sostituiremo il modulo personalizzato `collectGree È possibile verificare che funzioni correttamente eseguendo il seguente comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ Navigare alla pagina dei moduli nel browser web e utilizzare la barra di ricerca Come potete vedere, ci sono diversi risultati, molti dei quali moduli progettati per concatenare tipi di file molto specifici. Tra questi, dovrebbe essercene uno chiamato `find_concatenate` che è generico. -!!! note "Convenzione di denominazione dei moduli" +!!! info "Convenzione di denominazione dei moduli" Il trattino basso (`_`) viene utilizzato come sostituto del carattere barra (`/`) nei nomi dei moduli. @@ -120,9 +120,11 @@ Questo visualizza la documentazione sul modulo, inclusi input, output e informaz | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ Questo visualizza la documentazione sul modulo, inclusi input, output e informaz Queste sono esattamente le stesse informazioni che si possono trovare sul sito web. +È possibile ignorare il messaggio `INFO Reinstalling modules found in 'modules.json' but missing from directory`; viene emesso da nf-core/tools 4.0.2 per qualsiasi modulo interrogato con `info`, indipendentemente dal fatto che sia effettivamente installato o meno, e non ha alcun effetto poiché il comando `info` non scrive alcun file. + ### 1.4. Installare il modulo find/concatenate Ora che abbiamo trovato il modulo che vogliamo, dobbiamo aggiungerlo al codice sorgente della nostra pipeline. @@ -193,15 +197,13 @@ Ora che abbiamo trovato il modulo che vogliamo, dobbiamo aggiungerlo al codice s La buona notizia è che il progetto nf-core include degli strumenti per rendere questa parte facile. Specificamente, il comando `nf-core modules install` permette di automatizzare il recupero del codice e renderlo disponibile al proprio progetto in un singolo passaggio. -Navigare nella directory della pipeline ed eseguire il comando di installazione: +Assicurarsi che la directory di lavoro corrente sia la radice del progetto della pipeline `core-hello`, quindi eseguire il comando di installazione: ```bash cd core-hello nf-core modules install find/concatenate ``` -Lo strumento procederà con l'installazione del modulo. - ??? success "Output del comando" ```console @@ -212,26 +214,20 @@ Lo strumento procederà con l'installazione del modulo. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -Il comando automaticamente: - -- Scarica i file del modulo in `modules/nf-core/find/concatenate/` -- Aggiorna `modules.json` per tracciare il modulo installato -- Fornisce l'istruzione `include` corretta da utilizzare nel workflow - -!!! tip "Suggerimento" - - Assicurarsi sempre che la directory di lavoro corrente sia la radice del progetto della pipeline prima di eseguire il comando di installazione del modulo. +Il comando scarica i file del modulo in `modules/nf-core/find/concatenate/` e aggiorna `modules.json` per tracciare il modulo installato. +È possibile ignorare il `NotADirectoryError` alla fine; si verifica perché nf-core/tools 4.0.2 si aspetta che ogni modulo locale risieda nella propria directory (`modules/local//main.nf`), mentre `core-hello` utilizza ancora moduli locali a file singolo in questa fase. +Tuttavia, il modulo `find/concatenate` viene installato correttamente e `modules.json` viene aggiornato come previsto. +Convertiremo `cowpy` al layout a directory nella Parte 4. -Verifichiamo che il modulo sia stato installato correttamente: +Verifichiamo che i file del modulo siano al loro posto: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -È anche possibile verificare l'installazione chiedendo all'utility nf-core di elencare i moduli installati localmente: +È anche possibile confermare l'installazione ispezionando `modules.json`, che ora elenca `find/concatenate` sotto il repository nf-core/modules. + +??? abstract "Contenuto del file" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +Questo conferma che il modulo `find/concatenate` fa ora parte del codice sorgente del progetto. +Tuttavia, per utilizzare effettivamente il nuovo modulo, dobbiamo importarlo nella nostra pipeline. + +Infine, è anche possibile utilizzare il comando `nf-core modules list local` per verificare quali moduli sono attualmente tracciati nella pipeline. ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "Output del comando" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -Questo conferma che il modulo `find/concatenate` fa ora parte del codice sorgente del progetto. - -Tuttavia, per utilizzare effettivamente il nuovo modulo, dobbiamo importarlo nella nostra pipeline. +Questo mostra `find/concatenate` nella tabella risultante insieme al repository, alla versione SHA, al messaggio e alla data. ### 1.5. Aggiornare le importazioni dei moduli @@ -292,17 +344,17 @@ Sostituiamo l'istruzione `include` per il modulo `collectGreetings` con quella p Come promemoria, lo strumento di installazione del modulo ci ha fornito l'esatta istruzione da utilizzare: -```groovy title="Istruzione di importazione prodotta dal comando di installazione" +```groovy title="Import statement produced by install command" include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` Si noti che la convenzione nf-core prevede l'uso di maiuscole per i nomi dei moduli quando li si importa. -Aprire [core-hello/workflows/hello.nf](core-hello/workflows/hello.nf) e apportare la seguente sostituzione: +Aprire `core-hello/workflows/hello.nf` e apportare la seguente sostituzione: === "Dopo" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ Aprire [core-hello/workflows/hello.nf](core-hello/workflows/hello.nf) e apportar include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "Prima" @@ -345,7 +397,7 @@ A questo punto, si potrebbe essere tentati di immergersi e iniziare a modificare Affronteremo questo aspetto come sezione separata perché coinvolge un nuovo meccanismo che non abbiamo ancora trattato: le mappe di metadati. -!!! note "Nota" +!!! info "Info" È possibile eliminare facoltativamente il file `collectGreetings.nf`: @@ -373,7 +425,7 @@ Questo ci permetterà di determinare se possiamo semplicemente trattare il nuovo Idealmente questo è qualcosa che si dovrebbe fare _prima_ di installare il modulo, ma meglio tardi che mai. (Tanto per la cronaca, esiste un comando `uninstall` per eliminare i moduli che si decide di non volere più.) -!!! note "Nota" +!!! info "Info" Il processo FIND_CONCATENATE include una gestione piuttosto intelligente di diversi tipi di compressione, estensioni di file e così via che non sono strettamente rilevanti per ciò che stiamo cercando di mostrarvi qui, quindi ignoreremo la maggior parte di essi e ci concentreremo solo sulle parti che sono importanti. @@ -381,7 +433,7 @@ Idealmente questo è qualcosa che si dovrebbe fare _prima_ di installare il modu Come promemoria, questa è l'interfaccia del nostro modulo `collectGreetings`: -```groovy title="modules/local/collectGreetings.nf (estratto)" linenums="1" hl_lines="6-7 10" +```groovy title="modules/local/collectGreetings.nf (excerpt)" linenums="1" hl_lines="6-7 10" process collectGreetings { publishDir 'results', mode: 'copy' @@ -403,7 +455,7 @@ Al completamento, `collectGreetings` produce un singolo percorso di file, emesso In confronto, l'interfaccia del modulo `find/concatenate` è più complessa: -```groovy title="modules/nf-core/find/concatenate/main.nf (estratto)" linenums="1" hl_lines="11 14" +```groovy title="modules/nf-core/find/concatenate/main.nf (excerpt)" linenums="1" hl_lines="11 14" process FIND_CONCATENATE { tag "${meta.id}" label 'process_low' @@ -459,19 +511,19 @@ Per convenzione, una metamap nf-core è denominata `meta` e contiene il campo ob Ad esempio, una tipica mappa di metadati potrebbe apparire così: -```groovy title="Esempio di metamap a livello di campione" +```groovy title="Example of sample-level metamap" [id: 'sample1', single_end: false, strandedness: 'forward'] ``` O nel caso in cui i metadati siano associati a livello di batch: -```groovy title="Esempio di metamap a livello di batch" +```groovy title="Example of batch-level metamap" [id: 'batch1', date: '25.10.01'] ``` Ora mettiamo questo nel contesto del processo `FIND_CONCATENATE`, che si aspetta che i file di input siano confezionati in una tupla con una metamap, ed emette anche la metamap come parte della tupla di output. -```groovy title="modules/nf-core/find/concatenate/main.nf (estratto)" linenums="10" hl_lines="2 5" +```groovy title="modules/nf-core/find/concatenate/main.nf (excerpt)" linenums="10" hl_lines="2 5" input: tuple val(meta), path(files_in) @@ -485,7 +537,7 @@ I processi successivi possono quindi accedere facilmente anche a quei metadati. Ricordate quando vi abbiamo detto che il file prodotto da `FIND_CONCATENATE` sarà denominato in base a un identificatore che fa parte dei metadati? Questo è il codice rilevante: -```groovy title="modules/nf-core/find/concatenate/main.nf (estratto)" linenums="37" +```groovy title="modules/nf-core/find/concatenate/main.nf (excerpt)" linenums="37" prefix = task.ext.prefix ?: "${meta.id}${file_extensions[0]}" ``` @@ -493,7 +545,7 @@ Questo si traduce approssimativamente come segue: se un `prefix` viene fornito t Potete immaginare il canale di input che arriva a questo modulo con contenuti come questo: -```groovy title="Esempio di contenuto del canale di input" +```groovy title="Example input channel contents" ch_input = [[[id: 'batch1', date: '25.10.01'], ['file1A.txt', 'file1B.txt']], [[id: 'batch2', date: '25.10.26'], ['file2A.txt', 'file2B.txt']], [[id: 'batch3', date: '25.11.14'], ['file3A.txt', 'file3B.txt']]] @@ -501,7 +553,7 @@ ch_input = [[[id: 'batch1', date: '25.10.01'], ['file1A.txt', 'file1B.txt']], Quindi il contenuto del canale di output che esce così: -```groovy title="Esempio di contenuto del canale di output" +```groovy title="Example output channel contents" ch_input = [[[id: 'batch1', date: '25.10.01'], 'batch1.txt'], [[id: 'batch2', date: '25.10.26'], 'batch2.txt'], [[id: 'batch3', date: '25.11.14'], 'batch3.txt']] @@ -512,7 +564,7 @@ Come accennato in precedenza, la configurazione di input `tuple val(meta), path( Speriamo che possiate iniziare a vedere quanto questo possa essere utile. Non solo permette di denominare gli output in base ai metadati, ma è possibile anche fare cose come usarli per applicare valori di parametri diversi, e in combinazione con operatori specifici, è possibile persino raggruppare, ordinare o filtrare i dati mentre fluiscono attraverso la pipeline. -!!! note "Ulteriori informazioni sui metadati" +!!! info "Ulteriori informazioni sui metadati" Per un'introduzione completa al lavoro con i metadati nei workflow Nextflow, incluso come leggere i metadati dai samplesheet e utilizzarli per personalizzare l'elaborazione, consultare la missione secondaria [Metadati nei workflow](../side_quests/metadata/index.md). @@ -543,7 +595,7 @@ Ora che sapete tutto sulle metamap (o abbastanza per gli scopi di questo corso, Per chiarezza, suddivideremo questo processo e tratteremo ogni passaggio separatamente. -!!! note "Nota" +!!! info "Info" Tutte le modifiche mostrate di seguito sono apportate alla logica del workflow nel blocco `main` nel file del workflow `core-hello/workflows/hello.nf`. @@ -553,14 +605,14 @@ Per prima cosa, dobbiamo creare una mappa di metadati per `FIND_CONCATENATE`, te Poiché non abbiamo bisogno di altri metadati, possiamo mantenerla semplice e usare qualcosa come questo: -```groovy title="Esempio di sintassi" +```groovy title="Syntax example" def cat_meta = [id: 'test'] ``` Tranne che non vogliamo codificare il valore di `id`; vogliamo usare il valore del parametro `params.batch`. Quindi il codice diventa: -```groovy title="Esempio di sintassi" +```groovy title="Syntax example" def cat_meta = [id: params.batch] ``` @@ -570,8 +622,8 @@ Aggiungiamo queste righe dopo la chiamata a `convertToUpper`, rimuovendo la chia === "Dopo" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // emettere un saluto + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // emettere un saluto (aggiornato per usare la convenzione nf-core per i samplesheet) sayHello(ch_samplesheet) // convertire il saluto in maiuscolo @@ -586,8 +638,8 @@ Aggiungiamo queste righe dopo la chiamata a `convertToUpper`, rimuovendo la chia === "Prima" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // emettere un saluto + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // emettere un saluto (aggiornato per usare la convenzione nf-core per i samplesheet) sayHello(ch_samplesheet) // convertire il saluto in maiuscolo @@ -608,8 +660,8 @@ Successivamente, trasformare il canale di file in un canale di tuple contenenti === "Dopo" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // emettere un saluto + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // emettere un saluto (aggiornato per usare la convenzione nf-core per i samplesheet) sayHello(ch_samplesheet) // convertire il saluto in maiuscolo @@ -627,8 +679,8 @@ Successivamente, trasformare il canale di file in un canale di tuple contenenti === "Prima" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // emettere un saluto + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // emettere un saluto (aggiornato per usare la convenzione nf-core per i samplesheet) sayHello(ch_samplesheet) // convertire il saluto in maiuscolo @@ -654,8 +706,8 @@ Ora chiamare `FIND_CONCATENATE` sul canale appena creato: === "Dopo" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // emettere un saluto + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // emettere un saluto (aggiornato per usare la convenzione nf-core per i samplesheet) sayHello(ch_samplesheet) // convertire il saluto in maiuscolo @@ -676,8 +728,8 @@ Ora chiamare `FIND_CONCATENATE` sul canale appena creato: === "Prima" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // emettere un saluto + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // emettere un saluto (aggiornato per usare la convenzione nf-core per i samplesheet) sayHello(ch_samplesheet) // convertire il saluto in maiuscolo @@ -704,8 +756,8 @@ Poiché `cowpy` non accetta ancora tuple di metadati (risolveremo questo problem === "Dopo" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // emettere un saluto + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // emettere un saluto (aggiornato per usare la convenzione nf-core per i samplesheet) sayHello(ch_samplesheet) // convertire il saluto in maiuscolo @@ -729,8 +781,8 @@ Poiché `cowpy` non accetta ancora tuple di metadati (risolveremo questo problem === "Prima" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // emettere un saluto + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // emettere un saluto (aggiornato per usare la convenzione nf-core per i samplesheet) sayHello(ch_samplesheet) // convertire il saluto in maiuscolo @@ -753,7 +805,7 @@ L'operazione `#!groovy .map { meta, file -> file }` estrae il file dalla tupla ` Quindi è solo questione di passare `ch_for_cowpy` a `cowpy` invece di `collectGreetings.out.outfile` in quest'ultima riga. -!!! note "Nota" +!!! info "Info" Nella prossima parte del corso, aggiorneremo `cowpy` per lavorare direttamente con tuple di metadati, quindi questo passaggio di estrazione non sarà più necessario. @@ -762,7 +814,7 @@ Quindi è solo questione di passare `ch_for_cowpy` a `cowpy` invece di `collectG Testiamo che il workflow funzioni con il modulo `find/concatenate` appena integrato: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` Questo dovrebbe eseguirsi ragionevolmente rapidamente. @@ -770,40 +822,40 @@ Questo dovrebbe eseguirsi ragionevolmente rapidamente. ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` Si noti che `FIND_CONCATENATE` appare ora nell'elenco di esecuzione dei processi invece di `collectGreetings`. diff --git a/docs/it/docs/hello_nf-core/04_make_module.md b/docs/it/docs/hello_nf-core/04_make_module.md index 4f55e47269..5a6fa20681 100644 --- a/docs/it/docs/hello_nf-core/04_make_module.md +++ b/docs/it/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ Successivamente, vi mostreremo come utilizzare la creazione di moduli basata su Potete verificare che funzioni correttamente eseguendo il seguente comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ Aprite il file del modulo `cowpy.nf` (sotto `core-hello/modules/local/`) e modif === "Dopo" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Generate ASCII art with cowpy (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "Prima" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Generate ASCII art with cowpy (https://github.com/jeffbuttars/cowpy) process cowpy { ``` In questo caso la conversione in maiuscolo è completamente diretta. -Se il nome del processo fosse composto da più parole, ad esempio se avessimo un processo chiamato MyCowpyTool originariamente in camel case, la convenzione nf-core sarebbe utilizzare underscore per separarle, ottenendo MY_COWPY_TOOL. +Se il nome del processo fosse composto da più parole, ad esempio se avessimo un processo chiamato `MyCowpyTool` originariamente in camel case, la convenzione nf-core sarebbe utilizzare underscore per separarle, ottenendo `MY_COWPY_TOOL`. #### 1.1.2. Aggiornare l'istruzione di import del modulo @@ -164,7 +164,7 @@ Quindi ora aggiorniamo i due riferimenti al processo nel blocco workflow di `hel // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ Quindi ora aggiorniamo i due riferimenti al processo nel blocco workflow di `hel // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -240,22 +240,22 @@ Quindi ora aggiorniamo i due riferimenti al processo nel blocco workflow di `hel versions = ch_versions ``` -Assicuratevi di effettuare **entrambe** le modifiche, altrimenti riceverà un errore quando eseguirà questo. +Assicuratevi di effettuare **entrambe** le modifiche, altrimenti riceverete un errore quando eseguirete questo. #### 1.1.4. Eseguire il pipeline per testarlo Eseguiamo il workflow per verificare che tutto funzioni correttamente dopo queste modifiche. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ Torni al file del modulo `cowpy.nf` e lo modifichi per accettare tuple di metada === "Dopo" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ Torni al file del modulo `cowpy.nf` e lo modifichi per accettare tuple di metada === "Prima" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ Questo tecnicamente non è richiesto, ma è buona pratica fare riferimento a out Eseguiamo il workflow per verificare che tutto funzioni correttamente dopo queste modifiche. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Può vedere che abbiamo effettuato tre modifiche. Di conseguenza, l'interfaccia del modulo è ora più semplice: si aspetta solo gli input essenziali di metadati e file. -!!! note "Nota" +!!! info "Info" L'operatore `?:` è spesso chiamato 'operatore Elvis' perché assomiglia a un viso di Elvis Presley laterale, con il carattere `?` che simboleggia l'onda nei suoi capelli. @@ -623,15 +623,15 @@ Verifichiamo che il workflow funzioni ancora come previsto, specificando un pers Eseguite questo comando usando `kosh`, una delle opzioni più... enigmatiche: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "Output del comando" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ Per riassumere i vantaggi di questo approccio: - **Portabilità**: I moduli possono essere riutilizzati senza opzioni dello strumento hardcoded - **Nessuna modifica al workflow**: Aggiungere o modificare opzioni dello strumento non richiede l'aggiornamento del codice del workflow -!!! note "Nota" +!!! info "Info" Il sistema `ext.args` ha potenti capacità aggiuntive non trattate qui, inclusa la commutazione dinamica dei valori degli argomenti in base ai metadati. Veda le [specifiche dei moduli nf-core](https://nf-co.re/docs/guidelines/components/modules) per maggiori dettagli. @@ -841,15 +841,15 @@ Nel caso si stesse chiedendo, la closure `ext.prefix` ha accesso al pezzo corret Verifichiamo che il workflow funzioni ancora come previsto. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ Aprite il file del modulo `cowpy.nf` (sotto `core-hello/modules/local/`) e rimuo Diamo un'occhiata a cosa succede se eseguiamo il pipeline ora. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ Ora `core-hello-results` contiene anche gli output del modulo `COWPY`. Potete vedere che Nextflow ha creato questa gerarchia di directory basata sui nomi del workflow e del modulo. -!!! note "Nota" +!!! info "Info" Potreste notare `hello_software_versions.yml` in `pipeline_info/`. Al momento contiene solo le informazioni sulla versione di `FIND_CONCATENATE`, perché `COWPY` non riporta ancora la sua versione. @@ -1098,9 +1098,9 @@ Detto questo, potreste decidere di voler organizzare i vostri input in modo dive Per sovrascrivere la direttiva `publishDir` predefinita, potete semplicemente aggiungere le vostre direttive al file `conf/modules.config`. -Ad esempio, potreste sovrascrivere il valore predefinito per un singolo processo utilizzando il selettore `withName:`, come in questo esempio dove aggiungiamo una direttiva `publishDir` personalizzata per il processo 'COWPY'. +Ad esempio, potreste sovrascrivere il valore predefinito per un singolo processo utilizzando il selettore `withName:`, come in questo esempio dove aggiungiamo una direttiva `publishDir` personalizzata per il processo `COWPY`. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ Non sono necessarie modifiche al blocco script — la versione è dichiarata sta #### 1.6.2. Eseguire il pipeline e ispezionare il report delle versioni ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -La raccolta lato workflow — il blocco `Channel.topic("versions")` che avete visto nel workflow segnaposto nella Parte 2 — si sottoscrive al topic e scrive automaticamente questo report combinato. +La raccolta lato workflow — il blocco `channel.topic("versions")` che avete visto nel workflow segnaposto nella Parte 2 — si sottoscrive al topic e scrive automaticamente questo report combinato. -!!! note "Compatibilità con le versioni precedenti" +!!! info "Compatibilità con le versioni precedenti" Il ramo `versions_file` nel blocco del topic channel del workflow esiste per gestire i moduli che non sono ancora stati aggiornati per usare `topic: versions` e scrivono ancora un file `versions.yml` nel blocco script con `emit: versions`. Entrambi gli stili sono supportati simultaneamente durante la transizione. @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Pattern 1: Metadata tuples ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ Il codice predefinito offre di alternare tra Docker e Singularity, ma semplifich === "Prima" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Ambiente Conda -Per l'ambiente Conda, il codice del modulo specifica `conda "${moduleDir}/environment.yml"`, il che significa che deve essere configurato nel file `environment.yml`. +Per l'ambiente Conda, il codice del modulo specifica `#!groovy conda "${moduleDir}/environment.yml"`, il che significa che deve essere configurato nel file `environment.yml`. Lo strumento di creazione del modulo ci ha avvertito che non è riuscito a trovare il pacchetto `cowpy` in Bioconda (il canale principale per gli strumenti di bioinformatica). Tuttavia, `cowpy` è disponibile in conda-forge, quindi è possibile completare l'`environment.yml` in questo modo: @@ -1428,7 +1431,7 @@ Aggiorni i blocchi di input e output: === "Dopo" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Aggiorni i blocchi di input e output: === "Prima" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` Questo specifica: @@ -1453,6 +1456,7 @@ Questo specifica: - Il nome del parametro del file di input (`input_file` invece del generico `input`) - Il nome del file di output usando il pattern del prefisso configurabile (`#!groovy ${prefix}.txt` invece del carattere jolly `*`) - Un nome di emissione descrittivo (`cowpy_output` invece del generico `output`) +- Una stringa di versione statica (`#!groovy val("1.1.5")`) al posto del `#!groovy eval("cowpy --version")` del template, in linea con il modulo manuale della sezione 1.6 (lo strumento `cowpy` non espone un flag `--version`) Se sta usando il language server di Nextflow per validare la sintassi, la parte `#!groovy ${prefix}` sarà segnalata come errore in questa fase perché non l'abbiamo ancora aggiunta al blocco script. Passiamo a quello adesso. @@ -1517,7 +1521,7 @@ Non si preoccupi troppo se questo sembra misterioso; lo includiamo per completez === "Prima" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1576,15 +1580,15 @@ Tutto ciò che dobbiamo fare per provare questa nuova versione del modulo `COWPY Eseguiamo la pipeline per testarla. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Output del comando" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1611,10 +1615,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/it/docs/hello_nf-core/05_input_validation.md b/docs/it/docs/hello_nf-core/05_input_validation.md index 0f4eb64040..4ce4b04b07 100644 --- a/docs/it/docs/hello_nf-core/05_input_validation.md +++ b/docs/it/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ In questa quinta parte del corso di formazione Hello nf-core, mostriamo come uti Potete verificare che venga eseguita con successo eseguendo il seguente comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema è il successore del plugin nf-validation deprecato e utilizza lo stan ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ Ora applichiamo questi principi nella pratica, iniziando con la validazione dei Iniziamo aggiungendo la validazione dei parametri alla nostra pipeline. Questo valida i flag da riga di comando come `--input`, `--outdir` e `--batch`. -### 1.1. Configurare la validazione per saltare la validazione del file di input +### 1.1. Abilitare la validazione e saltare la validazione del file di input Il template della pipeline nf-core viene fornito con nf-schema già installato e configurato: - Il plugin nf-schema è installato tramite il blocco `plugins{}` in `nextflow.config` -- La validazione dei parametri è abilitata per impostazione predefinita tramite `params.validate_params = true` +- La validazione dei parametri è controllata da `params.validate_params` - La validazione viene eseguita dal subworkflow `UTILS_NFSCHEMA_PLUGIN` durante l'inizializzazione della pipeline -Il comportamento della validazione è controllato tramite lo scope `validation{}` in `nextflow.config`. +Nelle Parti 3 e 4 abbiamo impostato `validate_params = false` in modo che la pipeline potesse essere eseguita prima di aver configurato qualsiasi schema. +Ora che siamo pronti ad aggiungere la validazione, il primo passo è attivarla. -Poiché lavoreremo prima sulla validazione dei parametri (questa sezione) e non configureremo lo schema dei dati input fino alla sezione 2, dobbiamo temporaneamente dire a nf-schema di saltare la validazione del contenuto del file del parametro `input`. +Aprite `nextflow.config` e trovate il parametro `validate_params` (intorno alla riga 37), e impostatelo su `true`: -Aprite `nextflow.config` e trovate il blocco `validation` (intorno alla riga 247). Aggiungete `ignoreParams` per saltare la validazione del file di input: +=== "Dopo" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "Prima" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +Il comportamento della validazione stesso è controllato tramite lo scope `validation{}` in `nextflow.config`. + +Poiché lavoreremo prima sulla validazione dei parametri (questa sezione) e non configureremo lo schema dei dati input fino alla sezione 2, dobbiamo anche temporaneamente dire a nf-schema di saltare la validazione del contenuto del file del parametro `input`. + +Trovate il blocco `validation` (intorno alla riga 252) e aggiungete `ignoreParams` per saltare la validazione del file di input: === "Dopo" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ Aprite `nextflow.config` e trovate il blocco `validation` (intorno alla riga 247 === "Prima" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ Questa configurazione dice a nf-schema di: - **`ignoreParams`**: Saltare la validazione del contenuto del file del parametro `input` (temporaneo; riabiliteremo questo nella sezione 2) - **`monochromeLogs`**: Disabilitare l'output colorato nei messaggi di validazione quando impostato su `true` (controllato da `params.monochrome_logs`) -!!! note "Perché ignorare il parametro input?" +!!! info "Perché ignorare il parametro input?" Il parametro `input` in `nextflow_schema.json` ha `"schema": "assets/schema_input.json"` che dice a nf-schema di validare il *contenuto* del file CSV di input rispetto a quello schema. Poiché non abbiamo ancora configurato quello schema, ignoriamo temporaneamente questa validazione. @@ -263,7 +280,7 @@ Dovreste vedere qualcosa del genere: | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -Dovreste vedere che il parametro `batch` è stato aggiunto allo schema con il campo "required" che ora mostra `["input", "outdir", "batch"]`. +Dovreste vedere che il parametro `batch` è stato aggiunto allo schema con il campo `required` che ora mostra `["input", "outdir", "batch"]`. ### 1.5. Testare la validazione dei parametri @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ Aprite `nextflow.config` e rimuovete la riga `ignoreParams` dal blocco `validati === "Dopo" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ Aprite `nextflow.config` e rimuovete la riga `ignoreParams` dal blocco `validati === "Prima" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ Verifichiamo che la nostra validazione funzioni testando sia input validi che no #### 2.7.1. Test con input valido Prima, confermiamo che la pipeline venga eseguita con successo con un input valido. -Notate che non abbiamo più bisogno di `--validate_params false` poiché la validazione funziona! +Con `validate_params = true` e lo schema di input configurato, sia la validazione dei parametri che quella dei dati input vengono ora eseguite per davvero. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/it/docs/info/nxf_versions.md b/docs/it/docs/info/nxf_versions.md index d11f98bbba..2a772d53a5 100644 --- a/docs/it/docs/info/nxf_versions.md +++ b/docs/it/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: A partire dalla versione 3.0 del portale di formazione, tutti i nostri corsi di formazione sono compatibili con Nextflow versione 25.10.2 o successiva, salvo diversa indicazione nella pagina indice del corso. (Questo non include i materiali deprecati o archiviati che potrebbero non includere un avviso sulla versione). -La versione di Nextflow attualmente caricata per impostazione predefinita nel nostro ambiente di formazione è **Nextflow 25.10.4**. +La versione di Nextflow attualmente caricata per impostazione predefinita nel nostro ambiente di formazione è **Nextflow 26.04.4**. Poiché i corsi ora utilizzano input tipizzati a livello di flusso di lavoro e direttive di output a livello di flusso di lavoro, richiedono l'uso del parser di sintassi V2, **salvo diversa indicazione**. +Il parser V2 è quello predefinito a partire da Nextflow 26.04, quindi nella versione che carichiamo non è necessario abilitarlo manualmente. Se prevedete di utilizzare l'ambiente che forniamo tramite [Github Codespaces](../envsetup/01_setup.md) o [devcontainer locali](../envsetup/03_devcontainer.md), non dovete fare nulla a meno che non sia specificato nelle istruzioni del corso. -Tuttavia, se prevedete di seguire le formazioni nel vostro ambiente ([Installazione manuale](../envsetup/02_local.md)), dovrete assicurarvi di utilizzare Nextflow versione 25.10.2 o successiva con il parser di sintassi v2 abilitato. +Tuttavia, se prevedete di seguire le formazioni nel vostro ambiente ([Installazione manuale](../envsetup/02_local.md)), dovrete assicurarvi di utilizzare Nextflow versione 25.10.2 o successiva e di abilitare il parser di sintassi v2 se utilizzate una versione precedente alla 26.04. ## Versioni precedenti dei materiali di formazione @@ -40,7 +41,7 @@ Tutto il codice Nextflow moderno utilizza DSL2. Il parser v1 è il parser originale, più permissivo. Il parser v2 è più rigoroso e abilita nuove funzionalità del linguaggio come la tipizzazione statica (input e output tipizzati) e direttive di output a livello di flusso di lavoro. Il parser v2 fornisce anche messaggi di errore migliori e rileva più errori al momento del parsing piuttosto che durante l'esecuzione. -Il parser v2 diventerà il predefinito in Nextflow 26.04. +Il parser v2 è il predefinito a partire da Nextflow 26.04. In sintesi: DSL2 è il linguaggio che scrivete; la versione del parser di sintassi determina quanto rigorosamente quel linguaggio viene interpretato e quali funzionalità avanzate sono disponibili. @@ -52,21 +53,22 @@ Per maggiori informazioni su come aggiornare la vostra versione di Nextflow, con ### Abilitare il parser di sintassi v2 +A partire da Nextflow 26.04 il parser v2 è il predefinito, quindi i passaggi seguenti sono necessari solo per le versioni precedenti alla 26.04. + Per **abilitare** il parser di sintassi v2 per la sessione corrente, eseguite il seguente comando nel vostro terminale: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Per rendere questa impostazione permanente (in attesa che v2 diventi il predefinito in Nextflow 26.04), aggiungete il comando export al vostro profilo shell (`~/.bashrc`, `~/.zshrc`, ecc.): +Per rendere questa impostazione permanente, aggiungete il comando export al vostro profilo shell (`~/.bashrc`, `~/.zshrc`, ecc.): ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -Notate che la variabile d'ambiente `NXF_SYNTAX_PARSER=v2` è un requisito temporaneo. -Da Nextflow 26.04 in poi, il parser v2 diventerà il predefinito e questa impostazione non sarà più necessaria. +Notate che nelle versioni di Nextflow precedenti alla 26.04 la variabile d'ambiente `NXF_SYNTAX_PARSER=v2` è necessaria per accedere alle funzionalità v2 utilizzate in questi corsi. ### Disabilitare il parser di sintassi v2 diff --git a/docs/it/docs/nextflow_run/01_basics.md b/docs/it/docs/nextflow_run/01_basics.md index 3213c29a7a..f2b1307822 100644 --- a/docs/it/docs/nextflow_run/01_basics.md +++ b/docs/it/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "Output del comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Se l'output della tua console appare più o meno così, congratulazioni, hai appena eseguito il tuo primo workflow Nextflow! @@ -115,13 +121,14 @@ Se l'output della tua console appare più o meno così, congratulazioni, hai app Questo è stato menzionato all'inizio del corso, ma forse te lo sei perso. Controlla il materiale di aiuto [Versioni di Nextflow](../info/nxf_versions.md). - In breve, se stai usando Nextflow `25.10` allora devi abilitare il parser del linguaggio v2: + Il parser v2 è quello predefinito a partire da Nextflow 26.04, quindi questo problema si verificherà solo con versioni precedenti. + Su una versione precedente alla 26.04 devi abilitare il parser del linguaggio v2: ```bash export NXF_SYNTAX_PARSER=v2 ``` -L'output più importante qui è l'ultima riga, che è evidenziata nell'output sopra: +La parte più importante qui è la riga evidenziata: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` Dovresti vedere che i tuoi output sono ora pubblicati in una directory chiamata `hello_results` invece di `results`: @@ -206,7 +219,7 @@ Potrebbe sembrare confuso, quindi vediamo come appare in pratica. Tornando all'output della console per il workflow che abbiamo eseguito prima, avevamo questa riga: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` Vedi come la riga inizia con `[a3/1e1535]`? @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "Output del comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` L'output della console dovrebbe sembrare familiare, ma c'è una cosa che è un po' diversa rispetto a prima. @@ -767,7 +786,7 @@ Nella riga di output della console `[a3/7be2fa] SAYHELLO | 1 of 1 ✔`, cosa rap - [x] Il percorso troncato alla directory di lavoro dell'attività - [ ] Il checksum del file di output -Approfondisci: [2.4. Trova l'output originale e i log nella directory `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +Approfondisci: [2.3. Trova l'output originale e i log nella directory `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ Qual è lo scopo del file `.command.sh` in una directory di attività? - [ ] Contiene messaggi di errore dalle attività fallite - [ ] Elenca i file di input messi in staging per l'attività -Approfondisci: [2.4. Trova l'output originale e i log nella directory `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +Approfondisci: [2.3. Trova l'output originale e i log nella directory `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ Cosa succede ai risultati pubblicati quando riesegui un workflow senza `-resume` - [ ] Nextflow previene la sovrascrittura e fallisce - [ ] Vengono automaticamente backed up -Approfondisci: [2.5. Riesegui il workflow con saluti diversi](#24-re-run-the-workflow-with-different-greetings) +Approfondisci: [2.4. Riesegui il workflow con saluti diversi](#24-re-run-the-workflow-with-different-greetings) Cosa indica questo output della console? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] L'attività è fallita ed è stata saltata diff --git a/docs/it/docs/nextflow_run/02_pipeline.md b/docs/it/docs/nextflow_run/02_pipeline.md index c6f71a1477..98df3d1288 100644 --- a/docs/it/docs/nextflow_run/02_pipeline.md +++ b/docs/it/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Eccitante, questo sembra indicare che sono state fatte '3 of 3' chiamate per il process, il che è incoraggiante, dato che c'erano tre righe di dati nel CSV che abbiamo fornito come input. @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "Output del comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Questa volta vediamo tutti e tre i process eseguiti e le loro sottodirectory di lavoro associate elencate nell'output. @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "Output del comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` Vedi che come promesso, step multipli sono stati eseguiti come parte del workflow; i primi due (`sayHello` e `convertToUpper`) sono stati presumibilmente eseguiti su ogni singolo saluto, e il terzo (`collectGreetings`) sarà stato eseguito solo una volta, sugli output di tutte e tre le chiamate di `convertToUpper`. @@ -670,13 +706,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "Output del comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` Dovresti vedere nuovi output finali nominati con il tuo nome batch personalizzato. @@ -921,13 +975,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` Noterai che le esecuzioni dei process sono state tutte salvate nella cache con successo, il che significa che Nextflow ha riconosciuto che ha già fatto il lavoro richiesto, anche se il codice è stato diviso e il file del workflow principale è stato rinominato. @@ -1075,20 +1147,20 @@ Vedi che il filesystem dentro il container è diverso dal filesystem sul tuo sis Dall'interno del container, puoi eseguire il comando `cowpy` direttamente. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "Output del comando" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` Questo produce arte ASCII della mucca predefinita (o 'cowacter') con un fumetto contenente il testo che abbiamo specificato. @@ -1097,22 +1169,22 @@ Ora che hai testato l'utilizzo base, puoi provare a dargli alcuni parametri. Per esempio, la documentazione dello strumento dice che possiamo impostare il personaggio con `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Output del comando" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1298,15 +1370,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` I primi tre step sono stati salvati nella cache dato che li abbiamo già eseguiti prima, ma il process `cowpy` è nuovo quindi viene effettivamente eseguito. diff --git a/docs/it/docs/nextflow_run/03_config.md b/docs/it/docs/nextflow_run/03_config.md index 66f3fa7ffa..467510fd6a 100644 --- a/docs/it/docs/nextflow_run/03_config.md +++ b/docs/it/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` Questo produce ancora lo stesso output di prima. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` Questo creerà un nuovo set di directory sotto `tux-run/` incluse `tux-run/work/` e `tux-run/results/`. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` Il file di output finale dovrebbe contenere il personaggio stegosaurus che dice i saluti. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` Questo produce ancora lo stesso output di prima, tranne che questa volta troviamo i nostri output sotto `results_config/outdir/`. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` Questo produce ancora lo stesso output di prima, tranne che questa volta troviamo i nostri output sotto `results_config/pnames/`, e sono raggruppati per process. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` Questo produce ancora lo stesso output di prima, tranne che questa volta troviamo i nostri output sotto `results_config/outmode/`. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "Output del comando" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` Questo dovrebbe funzionare senza problemi e produrre gli stessi output di prima sotto `results_config/conda`. @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` Come potete vedere, questo ci permette di alternare tra configurazioni molto comodamente a runtime. @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` Questo userà Docker dove possibile e produrrà output sotto `results_config/test`, e questa volta il personaggio è il duo comico `dragonandcow`. @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/it/docs/nf4_science/_template/02_single_sample.md b/docs/it/docs/nf4_science/_template/02_single_sample.md index e8e5ebf3e9..36d971fa4b 100644 --- a/docs/it/docs/nf4_science/_template/02_single_sample.md +++ b/docs/it/docs/nf4_science/_template/02_single_sample.md @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/it/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/it/docs/nf4_science/genomics/02_per_sample_variant_calling.md index 6976b70b86..8e0ba2d8ce 100644 --- a/docs/it/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/it/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` Potete verificare che il file di indice sia stato generato correttamente guardando nella directory di lavoro o nella directory dei risultati. @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` Ora se guardiamo l'output della console, vediamo i due processi elencati. @@ -891,13 +911,32 @@ Cosa curiosa: questo _potrebbe funzionare_, OPPURE _potrebbe fallire_. Ad esempi ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Se l'esecuzione del vostro flusso di lavoro ha avuto successo, eseguitelo di nuovo finché non ottenete un errore come questo: @@ -905,9 +944,9 @@ Se l'esecuzione del vostro flusso di lavoro ha avuto successo, eseguitelo di nuo ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ Questa volta (e ogni volta) tutto dovrebbe funzionare correttamente: ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` La directory dei risultati ora contiene sia file BAM che BAI per ogni campione (dalla tupla), insieme agli output VCF: @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Questo dovrebbe produrre lo stesso risultato di prima. Il nostro semplice flusso di lavoro di variant calling ora ha tutte le funzionalità di base che volevamo. diff --git a/docs/it/docs/nf4_science/genomics/03_joint_calling.md b/docs/it/docs/nf4_science/genomics/03_joint_calling.md index dda08b0d6a..e80b85a45f 100644 --- a/docs/it/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/it/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` L'output di Nextflow appare uguale a prima, ma i file `.g.vcf` e i loro file indice sono ora organizzati in sottodirectory. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` I primi due passaggi sono in cache dall'esecuzione precedente, e il nuovo passaggio `GATK_JOINTGENOTYPING` viene eseguito una volta sugli input raccolti da tutti e tre i campioni. diff --git a/docs/it/docs/nf4_science/imaging/01_basics.md b/docs/it/docs/nf4_science/imaging/01_basics.md index 623d1461b6..f1149f3b55 100644 --- a/docs/it/docs/nf4_science/imaging/01_basics.md +++ b/docs/it/docs/nf4_science/imaging/01_basics.md @@ -6,7 +6,7 @@ In questa prima parte del corso di formazione Nextflow per il Bioimaging, utiliz ## 1. Eseguire il workflow -Le forniamo uno script di workflow denominato `hello-world.nf` che accetta un input tramite un argomento da riga di comando chiamato `--greeting` e produce un file di testo contenente quel saluto. +Vi forniamo uno script di workflow denominato `hello-world.nf` che accetta un input tramite un argomento da riga di comando chiamato `--greeting` e produce un file di testo contenente quel saluto. Non esamineremo ancora il codice; vediamo prima come si presenta la sua esecuzione. ### 1.1. Avviare il workflow e monitorare l'esecuzione @@ -20,37 +20,37 @@ nextflow run hello-world.nf --greeting 'Hello World!' L'output della console dovrebbe apparire così: ```console title="Output" linenums="1" - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` -Congratulazioni, ha appena eseguito il suo primo workflow Nextflow! +Congratulazioni, avete appena eseguito il vostro primo workflow Nextflow! L'output più importante qui è l'ultima riga (riga 6): ```console title="Output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Questo ci indica che il processo `sayHello` è stato eseguito con successo una volta (`1 of 1 ✔`). -È ottimo, ma potrebbe chiedersi: dove si trova l'output? +È ottimo, ma potreste chiedervi: dove si trova l'output? ### 1.2. Trovare il file di output nella directory `results` Questo workflow è configurato per pubblicare il suo output in una directory chiamata `results`. -Se osserva la directory corrente, vedrà che quando ha eseguito il workflow, Nextflow ha creato una nuova directory chiamata `results`, che contiene un file chiamato `output.txt`. +Se osservate la directory corrente, vedrete che quando avete eseguito il workflow, Nextflow ha creato una nuova directory chiamata `results`, che contiene un file chiamato `output.txt`. ```console title="results/" linenums="1" results └── output.txt ``` -Aprite il file; il contenuto dovrebbe corrispondere al saluto che ha specificato dalla riga di comando. +Aprite il file; il contenuto dovrebbe corrispondere al saluto che avete specificato dalla riga di comando.
Contenuto del file @@ -63,18 +63,18 @@ Hello World! È ottimo, il nostro workflow ha fatto ciò che doveva fare! -Tuttavia, sia consapevole che il risultato 'pubblicato' è una copia (o in alcuni casi un symlink) dell'output effettivo prodotto da Nextflow quando ha eseguito il workflow. +Tuttavia, siate consapevoli che il risultato 'pubblicato' è una copia (o in alcuni casi un symlink) dell'output effettivo prodotto da Nextflow quando ha eseguito il workflow. Quindi ora, daremo un'occhiata dietro le quinte per vedere dove Nextflow ha effettivamente eseguito il lavoro. !!! warning "Avviso" Non tutti i workflow saranno configurati per pubblicare gli output in una directory results, e/o il nome della directory potrebbe essere diverso. - Un po' più avanti in questa sezione, le mostreremo come scoprire dove è specificato questo comportamento. + Un po' più avanti in questa sezione, vi mostreremo come scoprire dove è specificato questo comportamento. ### 1.3. Trovare l'output originale e i log nella directory `work/` -Quando esegue un workflow, Nextflow crea una 'directory di attività' distinta per ogni singola invocazione di ciascun processo nel workflow (=ogni passaggio nella pipeline). +Quando eseguite un workflow, Nextflow crea una 'directory di attività' distinta per ogni singola invocazione di ciascun processo nel workflow (=ogni passaggio nella pipeline). Per ognuna, preparerà gli input necessari, eseguirà le istruzioni pertinenti e scriverà output e file di log all'interno di quella directory, che viene nominata automaticamente utilizzando un hash per renderla unica. Tutte queste directory di attività risiederanno sotto una directory chiamata `work` all'interno della vostra directory corrente (dove state eseguendo il comando). @@ -83,41 +83,41 @@ Questo potrebbe sembrare confuso, quindi vediamo come appare nella pratica. Tornando all'output della console per il workflow che abbiamo eseguito in precedenza, avevamo questa riga: -```console title="Estratto dell'output del comando" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Excerpt of command output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` -Vede come la riga inizia con `[a3/7be2fa]`? -Questa è una forma troncata del percorso della directory di attività per quella singola chiamata di processo, e le indica dove trovare l'output della chiamata del processo `sayHello` all'interno del percorso della directory `work/`. +Vedete come la riga inizia con `[71/8143bd]`? +Questa è una forma troncata del percorso della directory di attività per quella singola chiamata di processo, e vi indica dove trovare l'output della chiamata del processo `sayHello` all'interno del percorso della directory `work/`. -Può trovare il percorso completo digitando il seguente comando (sostituendo `a3/7be2fa` con ciò che vede nel suo terminale) e premendo il tasto tab per completare automaticamente il percorso o aggiungendo un asterisco: +Potete trovare il percorso completo digitando il seguente comando (sostituendo `71/8143bd` con ciò che vedete nel vostro terminale) e premendo il tasto tab per completare automaticamente il percorso o aggiungendo un asterisco: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -Questo dovrebbe produrre il percorso completo della directory: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +Questo dovrebbe produrre il percorso completo della directory: `work/71/8143bd5ed3420e23c5f0dc1a05056d` Diamo un'occhiata a cosa c'è dentro. !!! Tip "Suggerimento" - Se esplora il contenuto della sottodirectory di attività nell'esploratore file di VSCode, vedrà tutti i file immediatamente. - Tuttavia, i file di log sono impostati per essere invisibili nel terminale, quindi se vuole utilizzare `ls` o `tree` per visualizzarli, dovrà impostare l'opzione pertinente per visualizzare i file invisibili. + Se esplorate il contenuto della sottodirectory di attività nell'esploratore file di VSCode, vedrete tutti i file immediatamente. + Tuttavia, i file di log sono impostati per essere invisibili nel terminale, quindi se volete utilizzare `ls` o `tree` per visualizzarli, dovrete impostare l'opzione pertinente per visualizzare i file invisibili. ```bash tree -a work ``` -I nomi esatti delle sottodirectory saranno diversi sul suo sistema. +I nomi esatti delle sottodirectory saranno diversi sul vostro sistema.
Contenuto della directory ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -130,13 +130,13 @@ work
-Dovrebbe riconoscere immediatamente il file `output.txt`, che è infatti l'output originale del processo `sayHello` che è stato pubblicato nella directory `results`. +Dovreste riconoscere immediatamente il file `output.txt`, che è infatti l'output originale del processo `sayHello` che è stato pubblicato nella directory `results`. Se lo aprite, troverete di nuovo il saluto `Hello World!`.
Contenuto del file output.txt -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,29 +159,28 @@ Il file `.command.sh` è particolarmente utile perché mostra il comando princip
Contenuto del file -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
!!! Tip "Suggerimento" - Quando qualcosa va storto e deve risolvere il problema, può essere utile guardare lo script `command.sh` per verificare esattamente quale comando Nextflow ha composto in base alle istruzioni del workflow, all'interpolazione delle variabili e così via. + Quando qualcosa va storto e dovete risolvere il problema, può essere utile guardare lo script `command.sh` per verificare esattamente quale comando Nextflow ha composto in base alle istruzioni del workflow, all'interpolazione delle variabili e così via. ### 1.4. Esercizio facoltativo: rieseguire con saluti diversi -Provi a rieseguire il workflow alcune volte con valori diversi per l'argomento `--greeting`, quindi osservi sia il contenuto della directory `results/` che le directory di attività. +Provate a rieseguire il workflow alcune volte con valori diversi per l'argomento `--greeting`, quindi osservate sia il contenuto della directory `results/` che le directory di attività. -Osservi come gli output e i log delle directory di attività isolate vengono preservati, mentre il contenuto della directory `results` viene sovrascritto dall'output delle esecuzioni successive. +Osservate come gli output e i log delle directory di attività isolate vengono preservati, mentre il contenuto della directory `results` viene sovrascritto dall'output delle esecuzioni successive. ### Takeaway -Sa come eseguire un semplice script Nextflow, monitorarne l'esecuzione e trovare i suoi output. +Sapete come eseguire un semplice script Nextflow, monitorarne l'esecuzione e trovare i suoi output. -### Cosa succede dopo? +### Cosa c'è dopo? Imparate a leggere uno script Nextflow di base e a identificare come i suoi componenti si relazionano alla sua funzionalità. @@ -331,24 +330,24 @@ Imparate a gestire comodamente le esecuzioni del workflow. ## 3. Gestire le esecuzioni del workflow -Sapere come avviare workflow e recuperare output è ottimo, ma scoprirà rapidamente che ci sono alcuni altri aspetti della gestione del workflow che renderanno la sua vita più facile. +Sapere come avviare workflow e recuperare output è ottimo, ma scoprirete rapidamente che ci sono alcuni altri aspetti della gestione del workflow che renderanno la vostra vita più facile. -Qui vi mostriamo come sfruttare la funzione `resume` per quando deve rilanciare lo stesso workflow, come ispezionare i log di esecuzione con `nextflow log`, e come eliminare le directory work più vecchie con `nextflow clean`. +Qui vi mostriamo come sfruttare la funzione `resume` per quando dovete rilanciare lo stesso workflow, come ispezionare i log di esecuzione con `nextflow log`, e come eliminare le directory work più vecchie con `nextflow clean`. ### 3.1. Rilanciare un workflow con `-resume` -A volte, vorrà rieseguire una pipeline che ha già avviato in precedenza senza rifare alcun lavoro che è già stato completato con successo. +A volte, vorrete rieseguire una pipeline che avete già avviato in precedenza senza rifare alcun lavoro che è già stato completato con successo. -Nextflow ha un'opzione chiamata `-resume` che le permette di farlo. +Nextflow ha un'opzione chiamata `-resume` che vi permette di farlo. Specificamente, in questa modalità, tutti i processi che sono già stati eseguiti con esattamente lo stesso codice, impostazioni e input verranno saltati. -Questo significa che Nextflow eseguirà solo i processi che ha aggiunto o modificato dall'ultima esecuzione, o ai quali sta fornendo nuove impostazioni o input. +Questo significa che Nextflow eseguirà solo i processi che avete aggiunto o modificato dall'ultima esecuzione, o ai quali state fornendo nuove impostazioni o input. Ci sono due vantaggi chiave nel farlo: -- Se sta sviluppando una pipeline, potete iterare più rapidamente poiché deve solo eseguire il/i processo/i su cui state lavorando attivamente per testare le vostre modifiche. +- Se siete nel mezzo dello sviluppo di una pipeline, potete iterare più rapidamente poiché dovete solo eseguire il/i processo/i su cui state lavorando attivamente per testare le vostre modifiche. - Se state eseguendo una pipeline in produzione e qualcosa va storto, in molti casi potete risolvere il problema e rilanciare la pipeline, e riprenderà l'esecuzione dal punto di errore, il che può farvi risparmiare molto tempo e calcolo. -Per utilizzarlo, aggiungete semplicemente `-resume` al vostro comando ed eseguite: +Per utilizzarlo, aggiungete semplicemente `-resume` al vostro comando ed eseguitelo: ```bash nextflow run hello-world.nf --greeting 'Hello World!' -resume @@ -357,25 +356,25 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Cerchi il bit `cached:` che è stato aggiunto nella riga dello stato del processo (riga 5), che significa che Nextflow ha riconosciuto di aver già fatto questo lavoro e ha semplicemente riutilizzato il risultato dall'esecuzione precedente riuscita. +Cercate il bit `cached:` che è stato aggiunto nella riga dello stato del processo, che significa che Nextflow ha riconosciuto di aver già fatto questo lavoro e ha semplicemente riutilizzato il risultato dall'esecuzione precedente riuscita. -Può anche vedere che l'hash della sottodirectory work è lo stesso dell'esecuzione precedente. +Potete anche vedere che l'hash della sottodirectory work è lo stesso dell'esecuzione precedente. Nextflow vi sta letteralmente indicando l'esecuzione precedente e dicendo "L'ho già fatto lì." !!! Tip "Suggerimento" - Quando riesegue una pipeline con `resume`, Nextflow non sovrascrive nessun file scritto in una directory `publishDir` da alcuna chiamata di processo che è stata precedentemente eseguita con successo. + Quando rieseguite una pipeline con `resume`, Nextflow non sovrascrive nessun file scritto in una directory `publishDir` da alcuna chiamata di processo che è stata precedentemente eseguita con successo. ### 3.2. Ispezionare il log delle esecuzioni passate -Ogni volta che avvia un workflow nextflow, viene scritta una riga in un file di log chiamato `history`, sotto una directory nascosta chiamata `.nextflow` nella directory di lavoro corrente. +Ogni volta che avviate un workflow nextflow, viene scritta una riga in un file di log chiamato `history`, sotto una directory nascosta chiamata `.nextflow` nella directory di lavoro corrente. Un modo più conveniente per accedere a queste informazioni è utilizzare il comando `nextflow log`. @@ -383,28 +382,28 @@ Un modo più conveniente per accedere a queste informazioni è utilizzare il com nextflow log ``` -Questo produrrà il contenuto del file di log nel terminale, mostrandole il timestamp, il nome dell'esecuzione, lo stato e la riga di comando completa per ogni esecuzione Nextflow che è stata avviata dall'interno della directory di lavoro corrente. +Questo produrrà il contenuto del file di log nel terminale, mostrandovi il timestamp, il nome dell'esecuzione, lo stato e la riga di comando completa per ogni esecuzione Nextflow che è stata avviata dall'interno della directory di lavoro corrente. ### 3.3. Eliminare le directory work più vecchie Durante il processo di sviluppo, tipicamente eseguirete le vostre bozze di pipeline un gran numero di volte, il che può portare a un accumulo di molti file in molte sottodirectory. Poiché le sottodirectory sono nominate casualmente, è difficile dire dai loro nomi quali sono le esecuzioni più vecchie rispetto a quelle più recenti. -Nextflow include un comodo sottocomando `clean` che potete eliminare automaticamente le sottodirectory work per esecuzioni passate che non vi interessano più, con diverse [opzioni](https://www.nextflow.io/docs/latest/reference/cli.html#clean) per controllare cosa verrà eliminato. +Nextflow include un comodo sottocomando `clean` che può eliminare automaticamente le sottodirectory work per esecuzioni passate che non vi interessano più, con diverse [opzioni](https://www.nextflow.io/docs/latest/reference/cli.html#clean) per controllare cosa verrà eliminato. -Può utilizzare il log Nextflow per cercare un'esecuzione in base al suo timestamp e/o alla riga di comando, quindi utilizzare `nextflow clean -before -f` per eliminare le directory work dalle esecuzioni precedenti. +Potete utilizzare il log Nextflow per cercare un'esecuzione in base al suo timestamp e/o alla riga di comando, quindi utilizzare `nextflow clean -before -f` per eliminare le directory work dalle esecuzioni precedenti. !!! Warning "Avviso" L'eliminazione delle sottodirectory work dalle esecuzioni passate le rimuove dalla cache di Nextflow ed elimina qualsiasi output che era memorizzato in quelle directory. Questo significa che interrompe la capacità di Nextflow di riprendere l'esecuzione senza rieseguire i processi corrispondenti. - È responsabile del salvataggio di qualsiasi output che vi interessa o su cui prevedete di fare affidamento! Se sta utilizzando la direttiva `publishDir` per questo scopo, assicuratevi di utilizzare la modalità `copy`, non la modalità `symlink`. + Siete responsabili del salvataggio di qualsiasi output che vi interessa o su cui prevedete di fare affidamento! Se state utilizzando la direttiva `publishDir` per questo scopo, assicuratevi di utilizzare la modalità `copy`, non la modalità `symlink`. ### Takeaway -Sa come rilanciare una pipeline senza ripetere i passaggi che sono già stati eseguiti in modo identico, ispezionare il log di esecuzione e utilizzare il comando `nextflow clean` per ripulire le vecchie directory work. +Sapete come rilanciare una pipeline senza ripetere i passaggi che sono già stati eseguiti in modo identico, ispezionare il log di esecuzione e utilizzare il comando `nextflow clean` per ripulire le vecchie directory work. -### Cosa succede dopo? +### Cosa c'è dopo? -Ora che comprende le operazioni di base di Nextflow, è pronto per eseguire una vera pipeline di bioimaging con nf-core/molkart. +Ora che comprendete le operazioni di base di Nextflow, siete pronti per eseguire una vera pipeline di bioimaging con nf-core/molkart. diff --git a/docs/it/docs/nf4_science/imaging/02_run_molkart.md b/docs/it/docs/nf4_science/imaging/02_run_molkart.md index df31d80e89..0f8f06f774 100644 --- a/docs/it/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/it/docs/nf4_science/imaging/02_run_molkart.md @@ -68,34 +68,42 @@ Questo crea una directory `molkart/` contenente il codice sorgente completo dell ### 2.1. Comprendere i requisiti dei container -Prima di eseguire la pipeline completa, comprendiamo perché i container sono essenziali per le pipeline nf-core. +Prima di eseguire la pipeline completa, capiamo perché i container sono essenziali per le pipeline nf-core. -Proviamo a eseguire la pipeline utilizzando il dataset di test e i parametri dalla configurazione di test di molkart: +Forniremo i parametri della pipeline tramite un file di parametri. +Un file di parametri è un file YAML che elenca ciascun parametro e il suo valore, il che mantiene intatti i valori tipizzati (come gli interi) e tiene la riga di comando breve. -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +Un file `params.yaml` è già disponibile nella directory di lavoro: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` -Analizziamo questi parametri: +Questi parametri sono: + +- `input`: Percorso al samplesheet contenente i metadati del campione +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: Parametri per il riempimento del pattern a griglia +- `clahe_pyramid_tile`: Dimensione del kernel per il miglioramento del contrasto +- `segmentation_method`: Quale/i algoritmo/i utilizzare per la segmentazione cellulare +- `outdir`: Dove salvare i risultati -- `--input`: Percorso al samplesheet contenente i metadati del campione -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: Parametri per il riempimento del pattern a griglia -- `--clahe_pyramid_tile`: Dimensione del kernel per il miglioramento del contrasto -- `--segmentation_method`: Quale/i algoritmo/i utilizzare per la segmentazione cellulare -- `--outdir`: Dove salvare i risultati +Proviamo a eseguire la pipeline utilizzando questi parametri: + +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "Questo comando fallirà - è intenzionale!" Stiamo deliberatamente eseguendo questo senza container per dimostrare perché sono necessari. -Dopo alcuni istanti, vedrà un errore come questo: +Dopo alcuni istanti, vedrete un errore come questo: ??? failure "Output del comando" @@ -137,7 +145,7 @@ Aprite il modulo di preprocessing CLAHE: code molkart/modules/local/clahe/main.nf ``` -Guardi alla riga 5 - vedrà: +Guardate alla riga 5 - vedrete: ```groovy container 'ghcr.io/schapirolabor/molkart-local:v0.0.4' @@ -146,7 +154,7 @@ container 'ghcr.io/schapirolabor/molkart-local:v0.0.4' Questa riga dice a Nextflow: "Per eseguire questo process, utilizzare l'immagine Docker `ghcr.io/schapirolabor/molkart-local:v0.0.4`, che contiene tutto il software richiesto." Ogni process dichiara quale immagine container fornisce i suoi strumenti richiesti. -Tuttavia, Nextflow utilizza questi container solo se glielo indica! +Tuttavia, Nextflow utilizza questi container solo se glielo indicate! **La soluzione: Abilitare Docker nella configurazione** @@ -160,7 +168,7 @@ Aprite il file di configurazione: code nextflow.config ``` -Cambi `docker.enabled = false` in `docker.enabled = true`: +Cambiate `docker.enabled = false` in `docker.enabled = true`: ```groovy docker.enabled = true @@ -172,17 +180,10 @@ process { } ``` -Ora eseguite nuovamente la pipeline con lo stesso comando: +Ora eseguite nuovamente la pipeline, questa volta eseguendo tutti e tre i metodi di segmentazione in modo da poterli confrontare in seguito: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` Questa volta, Nextflow: @@ -200,21 +201,22 @@ Questa volta, Nextflow: - I container garantiscono la riproducibilità - le stesse identiche versioni del software vengono eseguite ovunque - Non è necessario installare manualmente dozzine di strumenti e le loro dipendenze - Per maggiori dettagli sui container in Nextflow, consulti [Hello Containers](../../hello_nextflow/05_hello_containers.md) dalla formazione Hello Nextflow. + Per maggiori dettagli sui container in Nextflow, consultate [Hello Containers](../../hello_nextflow/05_hello_containers.md) dalla formazione Hello Nextflow. ### 2.3. Monitorare l'esecuzione -Durante l'esecuzione della pipeline, vedrà un output simile a questo: +Durante l'esecuzione della pipeline, vedrete un output simile a questo: ??? success "Output del comando" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ Durante l'esecuzione della pipeline, vedrà un output simile a questo: |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,26 +265,26 @@ Durante l'esecuzione della pipeline, vedrà un output simile a questo: https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` -Noti come questo output sia più dettagliato rispetto al nostro esempio Hello World grazie alle convenzioni nf-core che la pipeline segue: +Notate come questo output sia più dettagliato rispetto al nostro esempio Hello World grazie alle convenzioni nf-core che la pipeline segue: - La pipeline mostra la sua versione e il logo - I parametri di configurazione vengono visualizzati @@ -296,25 +293,25 @@ Noti come questo output sia più dettagliato rispetto al nostro esempio Hello Wo ### 2.4. Comprendere l'esecuzione dei process -La riga executor `executor > local (22)` Le dice: +La riga executor `executor > local (22)` vi dice: - **executor**: Quale ambiente di calcolo viene utilizzato (`local` = la vostra macchina) - **(22)**: Numero totale di attività lanciate Ogni riga di process mostra: -- **Hash** (`[1a/2b3c4d]`): Identificatore della directory di lavoro (come prima) +- **Hash** (`[b4/e57ff1]`): Identificatore della directory di lavoro (come prima) - **Nome del process**: Percorso completo del modulo e nome del process - **Identificatore input**: Nome del campione tra parentesi -- **Progresso**: Percentuale completata e conteggio (es., `1 of 1 ✔`) +- **Progresso**: Conteggio delle attività e stato di completamento (es., `1 of 1 ✔`) ### Takeaway -Sa come lanciare una pipeline nf-core con dati di test e interpretare il suo output di esecuzione. +Sapete come lanciare una pipeline nf-core con dati di test e interpretare il suo output di esecuzione. -### Prossimi passi +### Cosa c'è dopo? -Impari dove trovare i risultati e come interpretarli. +Imparate dove trovare i risultati e come interpretarli. --- @@ -372,7 +369,7 @@ Il report include: - Metriche di qualità della segmentazione - Numero di cellule e spot rilevati -!!! Tip +!!! Tip "Suggerimento" I report MultiQC sono tipicamente inclusi in tutte le pipeline nf-core. Forniscono sempre una panoramica ad alto livello dell'esecuzione della pipeline e della qualità dei dati. @@ -426,7 +423,7 @@ Questo mostra: - Utilizzo di CPU e memoria - Quali attività sono state memorizzate nella cache vs. eseguite -!!! Tip +!!! Tip "Suggerimento" Questi report sono incredibilmente utili per ottimizzare l'allocazione delle risorse e risolvere problemi di prestazioni. @@ -447,9 +444,9 @@ Proprio come nel nostro esempio Hello World, tutto il lavoro effettivo avviene n ### 4.1. Comprendere la struttura della directory di lavoro La directory di lavoro contiene una subdirectory per ogni attività che è stata eseguita. -Per questa pipeline con 12 attività, ci saranno 12 subdirectory di lavoro. +Per questa esecuzione della pipeline con 22 attività, ci saranno 22 subdirectory di lavoro. -Elenchi la directory di lavoro: +Elencate la directory di lavoro: ```bash ls -d work/*/*/ | head -5 @@ -459,13 +456,13 @@ Questo mostra le prime 5 directory di attività. ### 4.2. Ispezionare una directory di attività -Scelga uno degli hash dei process di segmentazione dall'output della console (es., `[3m/4n5o6p]`) e guardi all'interno: +Scegliete uno degli hash dei process di segmentazione dall'output della console (es., `[3m/4n5o6p]`) e guardate all'interno: ```bash ls -la work/3m/4n5o6p*/ ``` -Vedrà: +Vedrete: - **File .command.\***: Script di esecuzione Nextflow e log (come prima) - **File di input staged**: Symlink ai file di input effettivi @@ -477,9 +474,9 @@ La differenza chiave rispetto a Hello World: - I file di output possono essere piuttosto grandi (maschere di segmentazione, immagini elaborate) - Più file di input e output per attività -!!! Tip +!!! Tip "Suggerimento" - Se un process fallisce, potete navigare alla vostra directory di lavoro, esaminare `.command.err` per i messaggi di errore e persino rieseguire `.command.sh` manualmente per il debug del problema. + Se un processo fallisce, potete navigare alla sua directory di lavoro, esaminare `.command.err` per i messaggi di errore e persino rieseguire `.command.sh` manualmente per il debug del problema. ### 4.3. Pulizia della directory di lavoro @@ -490,11 +487,11 @@ Tuttavia, per le pipeline nf-core con grandi file intermedi, è particolarmente ### Takeaway -Comprende come le pipeline nf-core organizzano le loro directory di lavoro e come ispezionare singole attività per il debugging. +Avete compreso come le pipeline nf-core organizzano le loro directory di lavoro e come ispezionare singole attività per il debugging. -### Prossimi passi +### Cosa c'è dopo? -Impari sulla cache di Nextflow e come riprendere esecuzioni della pipeline fallite. +Imparate a conoscere la cache di Nextflow e come riprendere esecuzioni della pipeline fallite. --- @@ -504,7 +501,7 @@ Una delle caratteristiche più potenti di Nextflow è la capacità di riprendere ### 5.1. Il meccanismo di cache -Quando esegue una pipeline con `-resume`, Nextflow: +Quando eseguite una pipeline con `-resume`, Nextflow: 1. Controlla la cache per ogni attività 2. Se input, codice e parametri sono identici, riutilizza il risultato memorizzato nella cache @@ -514,52 +511,51 @@ Questo è essenziale per pipeline di lunga durata dove i fallimenti potrebbero v ### 5.2. Provare resume con molkart -Esegua nuovamente lo stesso comando, ma aggiunga `-resume`: +Eseguite nuovamente lo stesso comando, ma aggiungete `-resume`: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -Dovrebbe vedere un output come: +Dovreste vedere un output come: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -Noti `cached: 2` o `cached: 1` per ogni process - nulla è stato rieseguito! +Notate l'annotazione `cached: N` su ogni processo di preprocessing e segmentazione — quelle attività sono state riutilizzate anziché rieseguite. ### 5.3. Quando resume è utile Resume è particolarmente prezioso quando: - Una pipeline fallisce a causa di limiti di risorse (memoria esaurita, limite di tempo superato) -- È necessario modificare i process a valle senza rieseguire i passaggi a monte +- È necessario modificare i processi a valle senza rieseguire i passaggi a monte - La vostra connessione di rete si interrompe durante il download dei dati -- Desidera aggiungere output aggiuntivi senza rifare il calcolo +- Volete aggiungere output aggiuntivi senza rifare il calcolo -!!! Warning +!!! Warning "Avviso" - Resume funziona solo se non ha modificato i dati di input, il codice della pipeline o i parametri. - Se modifica uno di questi, Nextflow rieseguirà correttamente le attività interessate. + Resume funziona solo se non avete modificato i dati di input, il codice della pipeline o i parametri. + Se modificate uno di questi, Nextflow rieseguirà correttamente le attività interessate. ### Takeaway -Sa come utilizzare `-resume` per rieseguire efficientemente le pipeline senza ripetere attività riuscite. +Sapete come utilizzare `-resume` per rieseguire efficientemente le pipeline senza ripetere le attività riuscite. -### Prossimi passi +### Cosa c'è dopo? Ora che potete eseguire nf-core/molkart con dati di test, siete pronti per imparare come configurarla per i vostri dataset. diff --git a/docs/it/docs/nf4_science/imaging/03_inputs.md b/docs/it/docs/nf4_science/imaging/03_inputs.md index f673474e72..902a492e91 100644 --- a/docs/it/docs/nf4_science/imaging/03_inputs.md +++ b/docs/it/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Ora impareremo due approcci migliori per gestire gli input: **file di parametri* ### 1.1. Il problema delle righe di comando lunghe -Ricordiamo il nostro comando dalla Parte 2: +Nella Parte 2 abbiamo già utilizzato un file di parametri per mantenere il comando breve e preservare i valori digitati (come i parametri interi di pre-elaborazione) intatti: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -Questo funziona, ma è difficile da riprodurre, condividere o modificare. +Passare molti parametri singolarmente dalla riga di comando è difficile da riprodurre, condividere o modificare. Cosa succede se è necessario eseguire nuovamente la stessa analisi il prossimo mese? Cosa succede se un collaboratore vuole utilizzare le vostre stesse impostazioni? +Un file di parametri risolve questo problema. -### 1.2. Soluzione: Utilizzare un file di parametri +### 1.2. Il file di parametri -Creare un file chiamato `params.yaml`: +Ecco il file `params.yaml` che abbiamo utilizzato: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -Ora il vostro comando diventa: +Ogni parametro è scritto come una coppia `chiave: valore`. +Scrivere i numeri interi senza virgolette (ad esempio `mindagap_tilesize: 90`) preserva il loro tipo intero, richiesto dalla validazione dei parametri della pipeline. + +Il vostro comando diventa: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -Ecco fatto! Il file di parametri documenta la vostra configurazione esatta e rende facile rieseguire o condividere. +Il file di parametri documenta la vostra configurazione esatta e rende facile rieseguire o condividere. ### 1.3. Sovrascrittura dei parametri @@ -58,16 +55,16 @@ nextflow run ./molkart -params-file params.yaml --segmentation_method "stardist" La riga sopra cambia il `segmentation_method` in `stardist` e il nome di `--outdir` in `stardist_results` invece dei parametri nel file `params.yaml`. Inoltre, potete vedere che il flag `-resume` ci ha permesso di riutilizzare i risultati di pre-elaborazione dall'esecuzione precedente, risparmiando tempo. -Può utilizzare questo schema per testare rapidamente diverse variazioni della pipeline. +Potete utilizzare questo schema per testare rapidamente diverse variazioni della pipeline. ### Takeaway I file di parametri rendono le vostre analisi riproducibili e facili da condividere. -Li utilizzi per qualsiasi lavoro di analisi reale. +Utilizzateli per qualsiasi lavoro di analisi reale. -### Prossimi passi +### Cosa c'è dopo? -Scopra come i samplesheet organizzano le informazioni su più campioni. +Scoprite come i samplesheet organizzano le informazioni su più campioni. --- @@ -125,7 +122,7 @@ sample,nuclear_image,spot_table,membrane_image mem_only,data/nuclear.tiff,data/spots.txt,data/membrane.tiff ``` -!!! warning "Avviso" +!!! Warning "Avviso" Noti che i percorsi nel samplesheet sono relativi a dove **esegue** Nextflow, non a dove si trova il samplesheet. diff --git a/docs/it/docs/nf4_science/imaging/04_config.md b/docs/it/docs/nf4_science/imaging/04_config.md index 1a076dc2a7..dcbc5906fe 100644 --- a/docs/it/docs/nf4_science/imaging/04_config.md +++ b/docs/it/docs/nf4_science/imaging/04_config.md @@ -131,15 +131,16 @@ Poiché stiamo utilizzando `-resume`, Nextflow verificherà se qualcosa è cambi Se i parametri, gli input e il codice sono gli stessi, tutte le attività verranno recuperate dalla cache e la pipeline si completerà quasi istantaneamente. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -Si noti che tutti i processi mostrano `cached: 2` o `cached: 1` - nulla è stato rieseguito! +Si noti l'annotazione `cached: N` su ciascun processo - le attività di preprocessing e segmentazione memorizzate nella cache non sono state rieseguite. ### 2.4. Profili di test @@ -203,7 +204,7 @@ I profili vengono applicati da sinistra a destra, quindi i profili successivi so Le pipeline nf-core sono fornite con profili integrati per container, test e ambienti speciali. È possibile combinare più profili per costruire la configurazione necessaria. -### Prossimi passi +### Cosa c'è dopo? Scopri come creare i tuoi profili personalizzati per diversi ambienti di calcolo. diff --git a/docs/it/docs/nf4_science/rnaseq/02_single-sample.md b/docs/it/docs/nf4_science/rnaseq/02_single-sample.md index 39e47c93c6..496aaca1c2 100644 --- a/docs/it/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/it/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` Questo dovrebbe essere eseguito molto rapidamente se avete completato la Parte 1 e avete già scaricato il container. @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` Anche questo dovrebbe essere eseguito molto rapidamente, dato che stiamo lavorando su un file di input così piccolo. @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` Potete trovare gli output di allineamento nella directory results. diff --git a/docs/it/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/it/docs/nf4_science/rnaseq/03_multi-sample.md index f10cdfb27a..8dffedee40 100644 --- a/docs/it/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/it/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "Output del comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` Questa volta ogni passaggio viene eseguito 6 volte, una volta per ciascuno dei 6 campioni nel file CSV. @@ -182,7 +242,7 @@ Nextflow gestisce tutto il parallelismo per noi. Sapete come passare da un input a file singolo a un input multi-campione basato su CSV che Nextflow elabora in parallelo. -### Cosa seguirà? +### Cosa c'è dopo? Aggiungere un passaggio di aggregazione dei report QC che combina le metriche di tutti i campioni. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` Una singola chiamata a MULTIQC è stata aggiunta dopo le chiamate ai processi in cache. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "Output del comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` Ora abbiamo due versioni leggermente divergenti del nostro workflow, una per dati read single-end e una per dati paired-end. @@ -986,7 +1184,7 @@ Il passo logico successivo sarebbe rendere il workflow in grado di accettare ent Sapete come adattare un workflow per campione singolo per parallelizzare l'elaborazione di campioni multipli, generare un report QC completo e adattare il workflow per utilizzare dati read paired-end. -### Cosa seguirà? +### Cosa c'è dopo? Datevi una grande pacca sulla spalla! Avete completato il corso Nextflow per RNAseq. diff --git a/docs/it/docs/side_quests/debugging/index.md b/docs/it/docs/side_quests/debugging/index.md index e6599bb054..f30bfa0b3f 100644 --- a/docs/it/docs/side_quests/debugging/index.md +++ b/docs/it/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. Utilizzo di parole chiave o direttive di processo errate @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. Utilizzo di nomi di variabili errati @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ Se ricevete un errore 'No such variable', potete correggerlo definendo la variab val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // Definisce le variabili in codice Groovy prima dello script @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Uso errato delle variabili Bash @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Variabili Groovy vs Bash" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` Mantenete i vostri canali di input definiti all'interno del blocco workflow, e in generale seguite qualsiasi altra raccomandazione che l'estensione suggerisce. @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -889,7 +889,7 @@ Il messaggio di errore afferma chiaramente che la chiamata si aspettava 1 argome process PROCESS_FILES { input: - val sample_name // Il processo si aspetta solo 1 input + val sample_name // Il processo si aspetta solo 1 canale di input output: path "${sample_name}_output.txt" @@ -926,7 +926,7 @@ Per questo esempio specifico, il processo si aspetta un singolo canale e non ric process PROCESS_FILES { input: - val sample_name // Il processo si aspetta solo 1 input + val sample_name // Il processo si aspetta solo 1 canale di input output: path "${sample_name}_output.txt" @@ -955,7 +955,7 @@ Per questo esempio specifico, il processo si aspetta un singolo canale e non ric process PROCESS_FILES { input: - val sample_name // Il processo si aspetta solo 1 input + val sample_name // Il processo si aspetta solo 1 canale di input output: path "${sample_name}_output.txt" @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` Più comunemente rispetto a questo esempio, potreste aggiungere input aggiuntivi a un processo e dimenticare di aggiornare di conseguenza la chiamata nel workflow, il che può portare a questo tipo di errore. Fortunatamente, questo è uno degli errori più facili da capire e correggere, poiché il messaggio di errore è abbastanza chiaro riguardo alla mancata corrispondenza. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "Output del comando" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` Questo workflow si completa senza errori, ma elabora solo un singolo campione! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` Ora dovreste vedere tutti e tre i campioni elaborati invece di uno solo. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "Output del comando" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. Tecniche di debug dei canali @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. Software mancante @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "Output del comando" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "Nota" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker Esaminiamo `bad_resources.nf`: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // ERRORE: Limite di tempo irrealistico input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -Se vi assicurate di leggere i vostri messaggi di errore, fallimenti come questo non dovrebbero confondervi a lungo. Ma assicuratevi di capire i requisiti di risorse dei comandi che state eseguendo in modo da poter configurare le vostre direttive di risorse in modo appropriato. +Con l'executor `local` l'errore è meno esplicito di quanto sarebbe su uno scheduler: si ottiene `process hasn't exited` e `WARN: Killing running tasks` invece di un messaggio che nomina il limite di tempo. Il collegamento da fare è che Nextflow termina un'attività quando supera le risorse assegnate, quindi quando un processo viene terminato senza un errore a livello di script, controllate le sue direttive di risorse. In questo caso il responsabile è la direttiva `time`, che è di gran lunga troppo bassa per il lavoro che il processo svolge. Assicuratevi di capire i requisiti di risorse dei comandi che state eseguendo in modo da poter configurare le vostre direttive di risorse in modo appropriato. ### 3.4. Tecniche di debug dei processi @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### Esaminate il codice @@ -2249,16 +2237,20 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - Questo errore criptico indica un problema di analisi intorno alle righe 11-12 nel blocco `params{}`. Il parser v2 rileva i problemi strutturali in anticipo. + Il parser punta alla riga 25 (`script:`), ma il vero colpevole è appena sopra: la virgola finale dopo la dichiarazione `output:` alla riga 23 lascia il parser in attesa di un altro output, quindi fallisce quando raggiunge `script:`. Questo è il primo di diversi errori di sintassi da risolvere. Applicate il metodo di debug in quattro fasi che avete imparato: @@ -2300,7 +2292,7 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor ``` ??? solution "Soluzione" - Il `buggy_workflow.nf` contiene 9 o 10 errori distinti (a seconda di come li si conta) che coprono tutte le principali categorie di debug. Ecco una suddivisione sistematica di ogni errore e come correggerlo + Il `buggy_workflow.nf` contiene 10 errori distinti che coprono tutte le principali categorie di debug. Ecco una suddivisione sistematica di ogni errore e come correggerlo, nell'ordine in cui li si incontra effettivamente su Nextflow 26.04. Il compilatore risolve il workflow in due passaggi: prima analizza la sintassi, poi verifica staticamente che ogni variabile sia definita. Quindi si eliminano prima gli errori di sintassi, poi un gruppo di errori di variabili non definite, prima che il workflow venga eseguito e inizino gli errori a runtime. Iniziamo con quegli errori di sintassi: @@ -2315,6 +2307,8 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor path "${sample_id}_result.txt" ``` + Con la virgola rimossa, il parser arriva alla fine del file cercando la parentesi graffa che dovrebbe chiudere `processFiles` e riporta `Unexpected input: ''`. + **Errore 2: Errore di sintassi - Parentesi graffa di chiusura mancante** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor } // Aggiunge la parentesi graffa di chiusura mancante ``` + Ora la sintassi viene analizzata correttamente, quindi viene eseguito il controllo statico dei tipi. Riporta tutte le variabili non definite in una volta sola, prima che il workflow venga eseguito: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + Queste quattro righe corrispondono a tre bug distinti, gli Errori 3, 4 e 5 di seguito. L'ultimo, `i`, è una variabile Bash che il controllo dei tipi non riesce a distinguere da una variabile Nextflow, quindi emerge qui in fase di compilazione anziché come errore a runtime. Correggete tutti e tre prima di rieseguire. + **Errore 3: Errore nel nome della variabile** ```groovy linenums="26" echo "Processing: ${sample}" // ERRORE: dovrebbe essere sample_id @@ -2348,14 +2353,23 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // ERRORE: sample_ids non definita ``` - **Correzione:** Usate il canale corretto ed estraete gli ID dei campioni + **Correzione:** Usate il canale corretto ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - A questo punto il workflow verrà eseguito, ma riceveremo ancora errori (ad es. `Path value cannot be null` in `processFiles`), causati da una struttura del canale errata. + **Errore 5: Errore di escape della variabile Bash** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // ERRORE: $i sembra una variabile Nextflow non definita + ``` + **Correzione:** Fate l'escape della variabile Bash in modo che Nextflow la lasci alla shell + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + Con questi errori risolti, il workflow viene compilato e inizia l'esecuzione. Il primo errore a runtime proviene da `processFiles`, che si aspetta una tupla ma riceve un valore semplice: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **Errore 5: Errore di struttura del canale - Output map errato** + **Errore 6: Errore di struttura del canale - Output map errato** ```groovy linenums="83" .map { row -> row.sample_id } // ERRORE: processFiles si aspetta una tupla ``` @@ -2364,29 +2378,18 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - Ma questo romperà la nostra correzione per l'esecuzione di `heavyProcess()` sopra, quindi dovremo usare un map per passare solo gli ID dei campioni a quel processo: + Questo corregge `processFiles`, ma `input_ch` ora emette una tupla a due elementi, e `heavyProcess` riceve ancora l'intera tupla dove si aspetta un singolo valore. La tupla viene resa nello script come `[sample_005, /path/sample_005.fastq.gz]`, il che rompe il comando Bash con un errore di sintassi e uno stato di uscita 2. - **Errore 6: Struttura del canale errata per heavyProcess** + **Errore 7: Struttura del canale errata per heavyProcess** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // ERRORE: input_ch ora ha 2 elementi per emissione - heavyProcess ne ha bisogno solo di 1 (il primo) + heavy_ch = heavyProcess(input_ch) // ERRORE: input_ch ora emette una tupla a 2 elementi; heavyProcess ha bisogno solo del primo elemento ``` - **Correzione:** Usate il canale corretto ed estraete gli ID dei campioni + **Correzione:** Passate solo gli ID dei campioni ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - Ora andiamo un po' più avanti ma riceviamo un errore su `No such variable: i`, perché non abbiamo fatto l'escape di una variabile Bash. - - **Errore 7: Errore di escape della variabile Bash** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // ERRORE: $i non ha l'escape - ``` - **Correzione:** Fate l'escape della variabile bash - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - Ora otteniamo `Process exceeded running time limit (1ms)`, quindi correggiamo il limite di tempo di esecuzione per il processo rilevante: + Ora `heavyProcess` viene eseguito, ma raggiunge il suo limite di tempo. Sull'executor `local` il messaggio è `process hasn't exited` (insieme a un messaggio `WARN: Killing running tasks`) anziché un timeout esplicito, quindi collegatelo alla sua direttiva `time`: **Errore 8: Errore di configurazione delle risorse** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor time '100 s' ``` - Successivamente abbiamo un errore `Missing output file(s)` da risolvere: + Successivamente abbiamo un errore `Missing output file(s)` da risolvere, perché lo script scrive `${sample_id}.txt` ma la dichiarazione output si aspetta `${sample_id}_heavy.txt`: **Errore 9: Mancata corrispondenza nel nome del file di output** ```groovy linenums="49" @@ -2408,9 +2411,9 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor done > ${sample_id}_heavy.txt ``` - I primi due processi sono stati eseguiti, ma non il terzo. + Il workflow ora si completa senza errori, ma l'output `files` è vuoto: `handleFiles` non è mai stato eseguito. Il suo canale di input, `channel.fromPath("*.txt")`, non trova file nella directory di lancio, quindi il processo viene semplicemente saltato senza fallire esplicitamente. - **Errore 10: Mancata corrispondenza nel nome del file di output** + **Errore 10: Sorgente del canale errata** ```groovy linenums="88" file_ch = channel.fromPath("*.txt") // Errore: tentativo di prendere input dalla pwd invece che da un processo handleFiles(file_ch) @@ -2420,7 +2423,7 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor file_ch = handleFiles(heavy_ch) ``` - Con questo, l'intero workflow dovrebbe essere eseguito. + Con questo, l'intero workflow viene eseguito dall'inizio alla fine e tutti e tre gli output sono popolati. **Workflow corretto completo:** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ Ora è il momento di mettere in pratica l'approccio sistematico al debug. Il wor script: """ # Simula un calcolo pesante - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/it/docs/side_quests/dev_environment/index.md b/docs/it/docs/side_quests/dev_environment/index.md index f74647a9ce..17f584bbdd 100644 --- a/docs/it/docs/side_quests/dev_environment/index.md +++ b/docs/it/docs/side_quests/dev_environment/index.md @@ -74,7 +74,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "Informazioni sui file di esempio" @@ -331,7 +331,7 @@ Ora esploriamo la navigazione in un flusso di lavoro più complesso usando `comp ### 4.2. Navigazione tra Simboli -Con `complex_workflow.nf` ancora aperto, potete ottenere una panoramica di tutti i simboli nel file digitando `@` nella barra di ricerca in cima a VSCode (la scorciatoia da tastiera è `Ctrl/Cmd+Shift+O`, ma potrebbe non funzionare in Codespaces). Questo apre il pannello di navigazione dei simboli, che elenca tutti i simboli nel file corrente: +Con `complex_workflow.nf` ancora aperto, potete ottenere una panoramica di tutti i simboli nel file digitando `@` nella barra di ricerca in cima a VS Code (la scorciatoia da tastiera è `Ctrl/Cmd+Shift+O`, ma potrebbe non funzionare in Codespaces). Questo apre il pannello di navigazione dei simboli, che elenca tutti i simboli nel file corrente: ![Navigazione tra simboli](../img/symbols.png) @@ -545,7 +545,7 @@ Se il vostro progetto è un repository git (come questo), VS Code mostra: - Viste diff inline - Capacità di commit e push -Aprite il pannello Source Control usando il pulsante source control (![icona Source control](../img/source_control_icon.png)) (`Ctrl+Shift+G` o `Cmd+Shift+G` se lavorate con VSCode localmente) per vedere le modifiche git e preparare i commit direttamente nell'editor. +Aprite il pannello Source Control usando il pulsante source control (![icona Source control](../img/source_control_icon.png)) (`Ctrl+Shift+G` o `Cmd+Shift+G` se lavorate con VS Code localmente) per vedere le modifiche git e preparare i commit direttamente nell'editor. ![Pannello Source Control](../img/source_control.png) diff --git a/docs/it/docs/side_quests/essential_scripting_patterns/index.md b/docs/it/docs/side_quests/essential_scripting_patterns/index.md index 9b27d7f909..b2c6dc31ce 100644 --- a/docs/it/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/it/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, Useremo questo dataset realistico per esplorare tecniche di programmazione pratiche che incontrerete nei veri flussi di lavoro bioinformatici. - - - - #### Lista di controllo per la preparazione Pensate di essere pronti a tuffarvi? @@ -112,9 +108,19 @@ Iniziamo con un semplice flusso di lavoro che legge solo il file CSV (lo abbiamo ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "Output del comando" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Aggiungere l'Operatore Map @@ -148,7 +162,7 @@ Ecco come appare quell'operazione map: === "Dopo" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ Ecco come appare quell'operazione map: === "Prima" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ Ora scriveremo logica di **scripting** all'interno della nostra closure per tras === "Dopo" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ Ora scriveremo logica di **scripting** all'interno della nostra closure per tras === "Prima" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ Apportate la seguente modifica: === "Dopo" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ Apportate la seguente modifica: === "Prima" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ Aggiungiamo una riga per creare una versione semplificata dei nostri metadati ch === "Dopo" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ Aggiungiamo una riga per creare una versione semplificata dei nostri metadati ch === "Prima" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Questo mostra sia i metadati completi visualizzati dall'operazione `view()` sia il sottoinsieme estratto che abbiamo stampato con `println`. @@ -390,7 +410,7 @@ Produciamo una struttura di canale composta da una tupla di 2 elementi: la map d === "Dopo" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -409,7 +429,7 @@ Produciamo una struttura di canale composta da una tupla di 2 elementi: la map d === "Prima" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -485,9 +505,9 @@ nextflow run collect.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -501,7 +521,7 @@ Ora vediamo il metodo `collect` su una List in azione. Modificate `collect.nf` p === "Dopo" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - raggruppa più emissioni del canale in una sola @@ -519,7 +539,7 @@ Ora vediamo il metodo `collect` su una List in azione. Modificate `collect.nf` p === "Prima" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - raggruppa più emissioni del canale in una sola @@ -543,9 +563,9 @@ nextflow run collect.nf ??? success "Output del comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -614,9 +634,9 @@ nextflow run collect.nf ??? success "Output del comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -673,7 +693,7 @@ Apportate la seguente modifica al vostro flusso di lavoro `main.nf` esistente: === "Dopo" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // Scripting per la trasformazione dei dati def sample_meta = [ @@ -700,7 +720,7 @@ Apportate la seguente modifica al vostro flusso di lavoro `main.nf` esistente: === "Prima" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // Scripting per la trasformazione dei dati def sample_meta = [ @@ -743,13 +763,19 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Questo mostra i metadati arricchiti dai nomi dei file. @@ -796,8 +822,9 @@ Poi modificate il blocco `workflow` per connettere il canale `ch_samples` al pro === "Dopo" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -824,13 +851,23 @@ Poi modificate il blocco `workflow` per connettere il canale `ch_samples` al pro } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "Prima" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -853,9 +890,18 @@ Poi modificate il blocco `workflow` per connettere il canale `ch_samples` al pro ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -868,28 +914,41 @@ nextflow run main.nf ??? failure "Output del comando" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` Potete vedere che il processo sta cercando di eseguire `fastp` con un valore `null` per il secondo file di input, il che lo fa fallire. Questo perché il nostro dataset contiene letture single-end, ma il processo è codificato per aspettarsi letture paired-end (due file di input alla volta). @@ -953,18 +1012,24 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Ottimo! Se controlliamo i comandi effettivamente eseguiti (personalizzate con il vostro hash dell'attività): ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Possiamo vedere che Nextflow ha correttamente scelto il comando giusto per le letture single-end: @@ -976,7 +1041,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Un altro uso comune della logica di script dinamica si può vedere nel [modulo Genomics di Nextflow for Science](../../nf4_science/genomics/03_joint_calling.md). In quel modulo, il processo GATK chiamato può accettare più file di input, ma ognuno deve essere preceduto da `-V` per formare una riga di comando corretta. Il processo usa lo scripting per trasformare una collezione di file di input (`all_gvcfs`) negli argomenti di comando corretti: @@ -992,7 +1057,7 @@ Un altro uso comune della logica di script dinamica si può vedere nel [modulo G """ ``` -Questi pattern di utilizzo dello scripting nei blocchi script dei processi sono estremamente potenti e possono essere applicati in molti scenari - dalla gestione di tipi di input variabili alla costruzione di argomenti complessi della riga di comando da collezioni di file, rendendo i vostri processi veramente adattabili ai diversi requisiti dei dati del mondo reale. +Questi pattern di utilizzo dello scripting nei blocchi script dei processi sono estremamente potenti e possono essere applicati in molti scenari - dalla gestione di tipi di input variabili alla costruzione di argomenti complessi della riga di comando da collezioni di file, rendendo i vostri processi veramente adattativi ai diversi requisiti dei dati del mondo reale. ### 2.3. Interpolazione di Variabili: Nextflow e Variabili Shell @@ -1023,11 +1088,12 @@ Includete il processo nel vostro `main.nf` e aggiungetelo al flusso di lavoro: === "Dopo" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1054,15 +1120,25 @@ Includete il processo nel vostro `main.nf` e aggiungetelo al flusso di lavoro: ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Prima" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1088,17 +1164,44 @@ Includete il processo nel vostro `main.nf` e aggiungetelo al flusso di lavoro: } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` Ora eseguite il flusso di lavoro e controllate i report generati in `results/reports/`. Dovrebbero contenere informazioni di base su ogni campione. - +```bash +nextflow run main.nf +``` ??? success "Output del comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` Ma cosa succede se vogliamo aggiungere informazioni su quando e dove è avvenuta l'elaborazione? Modifichiamo il processo per usare variabili **shell** e un po' di sostituzione di comandi per includere l'utente corrente, il nome host e la data nel report: @@ -1131,11 +1234,18 @@ Se eseguite questo, noterete un errore - Nextflow cerca di interpretare `#!groov ??? failure "Output del comando" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Dobbiamo fare l'escape in modo che Bash possa gestirlo invece. @@ -1195,7 +1305,7 @@ Per illustrare come appare con il nostro flusso di lavoro esistente, apportate l === "Dopo" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1222,22 +1332,33 @@ Per illustrare come appare con il nostro flusso di lavoro esistente, apportate l } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Prima" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1264,6 +1385,15 @@ Per illustrare come appare con il nostro flusso di lavoro esistente, apportate l ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1289,13 +1419,22 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` L'output dovrebbe mostrare entrambi i processi completati con successo. Il flusso di lavoro è ora molto più pulito e facile da mantenere, con tutta la logica complessa di elaborazione dei metadati incapsulata nella funzione `separateMetadata`. @@ -1359,26 +1498,35 @@ nextflow run main.nf -ansi-log false ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` Potete controllare il comando `docker` esatto che è stato eseguito per vedere l'allocazione delle CPU per qualsiasi attività: ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` Dovreste vedere qualcosa come: ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` In questo esempio abbiamo scelto un esempio che ha richiesto 2 CPU (`--cpu-shares 2048`), perché era un campione ad alta profondità, ma dovreste vedere diverse allocazioni di CPU a seconda della profondità del campione. Provate anche per le altre attività. @@ -1432,7 +1580,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` Questo indica che il processo è stato terminato per aver superato i limiti di memoria. @@ -1520,7 +1668,7 @@ Includete il nuovo modulo da `modules/trimgalore.nf`: === "Dopo" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1538,7 +1686,7 @@ Includete il nuovo modulo da `modules/trimgalore.nf`: === "Prima" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1556,14 +1704,26 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` Qui abbiamo usato piccole ma potenti espressioni condizionali all'interno dell'operatore `.branch{}` per instradare i campioni in base ai loro metadati. I campioni umani con alta copertura passano attraverso `FASTP`, mentre tutti gli altri campioni passano attraverso `TRIMGALORE`. @@ -1583,7 +1743,7 @@ Aggiungete quanto segue prima dell'operazione di branch: === "Dopo" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1603,7 +1763,7 @@ Aggiungete quanto segue prima dell'operazione di branch: === "Prima" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1624,21 +1784,31 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -Poiché abbiamo scelto un filtro che esclude alcuni campioni, sono state eseguite meno attività. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +In questo caso tutti e tre i campioni soddisfano il filtro, quindi ogni campione continua lungo la pipeline. +Una soglia più restrittiva escluderebbe i campioni a bassa profondità e ridurrebbe il numero di attività eseguite. L'espressione del filtro `meta.id && meta.organism && meta.depth >= 25000000` combina la truthiness con confronti espliciti: @@ -1708,13 +1878,13 @@ nextflow run main.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` Questo si blocca con una NullPointerException. @@ -1764,7 +1934,27 @@ nextflow run main.nf ??? success "Output del comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` Nessun crash! Il flusso di lavoro ora gestisce il campo mancante con grazia. Quando `row.run_id` è `null`, l'operatore `?.` impedisce la chiamata a `.toUpperCase()`, e `run_id` diventa `null` invece di causare un'eccezione. @@ -1808,7 +1998,7 @@ Aggiungete anche un operatore `view()` nel flusso di lavoro per vedere i risulta === "Dopo" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1817,7 +2007,7 @@ Aggiungete anche un operatore `view()` nel flusso di lavoro per vedere i risulta === "Prima" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1870,7 +2060,7 @@ Create una funzione di validazione prima del blocco del flusso di lavoro, chiama === "Dopo" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1888,6 +2078,7 @@ Create una funzione di validazione prima del blocco del flusso di lavoro, chiama } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1901,6 +2092,7 @@ Create una funzione di validazione prima del blocco del flusso di lavoro, chiama ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1913,9 +2105,9 @@ nextflow run main.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1932,9 +2124,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1948,7 +2140,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "Output del comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Questa volta viene eseguito con successo. @@ -1987,14 +2199,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 + + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2025,7 +2247,7 @@ Aggiungete l'handler degli eventi al vostro file `main.nf`, all'interno della de === "Dopo" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2041,15 +2263,21 @@ Aggiungete l'handler degli eventi al vostro file `main.nf`, all'interno della de println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "Prima" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2064,29 +2292,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Rendiamolo più utile aggiungendo logica condizionale: === "Dopo" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2109,12 +2352,15 @@ Rendiamolo più utile aggiungendo logica condizionale: println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "Prima" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2130,34 +2376,53 @@ Rendiamolo più utile aggiungendo logica condizionale: println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` Ora otteniamo un riepilogo ancora più informativo, incluso un messaggio di successo/fallimento e la directory di output se specificata: - +```bash +nextflow run main.nf +``` ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` Potete anche scrivere il riepilogo su un file usando le operazioni sui file: @@ -2261,7 +2526,7 @@ Ogni sezione ha costruito sulla precedente, dimostrando come i costrutti di prog - **Elaborazione flessibile**: La logica condizionale permette ai vostri flussi di lavoro di elaborare diversi tipi di campioni in modo appropriato - **Risorse adattive**: Le direttive dinamiche ottimizzano l'uso delle risorse in base alle caratteristiche dell'input -Questa progressione rispecchia l'evoluzione nel mondo reale delle pipeline bioinformatiche, dai prototipi di ricerca che gestiscono pochi campioni ai sistemi di produzione che elaborano migliaia di campioni in laboratori e istituzioni. +Questa progressione rispecchia l'evoluzione nel mondo reale delle pipelinebioinformatiche, dai prototipi di ricerca che gestiscono pochi campioni ai sistemi di produzione che elaborano migliaia di campioni in laboratori e istituzioni. Ogni sfida che avete risolto e ogni pattern che avete imparato riflette problemi reali che gli sviluppatori affrontano quando scalano i flussi di lavoro Nextflow. Applicare questi pattern nel vostro lavoro vi permetterà di costruire flussi di lavoro robusti e pronti per la produzione. @@ -2444,7 +2709,7 @@ Assicuratevi di consultare queste risorse quando avete bisogno di esplorare funz Trarrete beneficio dalla pratica e dall'espansione delle vostre competenze per: -- Scrivere flussi di lavoro più puliti con una correttaseparazione tra dataflow e scripting +- Scrivere flussi di lavoro più puliti con una corretta separazione tra dataflow e scripting - Padroneggiare l'interpolazione di variabili per evitare le insidie comuni con le variabili Nextflow, Bash e shell - Usare le direttive dinamiche delle risorse per flussi di lavoro efficienti e adattativi - Trasformare le collezioni di file in argomenti della riga di comando correttamente formattati diff --git a/docs/it/docs/side_quests/metadata/index.md b/docs/it/docs/side_quests/metadata/index.md index 017f797033..f65ce9e47d 100644 --- a/docs/it/docs/side_quests/metadata/index.md +++ b/docs/it/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Come potete vedere, l'operatore ha costruito una mappa di coppie chiave-valore per ogni riga del file CSV, con le intestazioni delle colonne come chiavi per i valori corrispondenti. @@ -265,9 +271,9 @@ Ad esempio, potremmo accedere all'ID del file con `id` o al percorso del file tx Ed ecco cosa potete aspettarvi di vedere nell'output: ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Questo mostra che siamo in grado di accedere ai valori dalla colonna `character` per ogni riga. @@ -358,7 +370,7 @@ process COWPY { ``` Come potete vedere, il processo riceve due input separati: un file di registrazione e un nome di personaggio. -Abbiamo valori per entrambi, ma sono attualmente raggruppati all'interno di ogni elemento nel canale. +È importante notare che abbiamo valori per entrambi, ma sono attualmente raggruppati all'interno di ogni elemento nel canale. Un modo per estrarre più campi in canali separati è l'operatore [`multiMap`](https://www.nextflow.io/docs/latest/reference/operator.html#multimap), che divide un canale in più sotto-canali con nome in una singola operazione. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Come potete vedere, `COWPY` è stato eseguito su ogni file usando il personaggio corretto per ognuno. @@ -654,12 +679,25 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` L'output è lo stesso sette file `cowpy-*.txt` di prima, ora prodotti con una chiamata più semplice a `COWPY`. @@ -744,7 +782,7 @@ Ristrutturiamo l'operazione `map` per produrre una tupla `[meta, file]`: === "Prima" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -770,9 +808,9 @@ nextflow run main.nf ??? success "Output del comando" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -781,6 +819,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Ogni elemento nel canale è ora una tupla a due elementi: prima la meta map, poi il file. @@ -792,7 +836,7 @@ Ogni elemento nel canale è ora una tupla a due elementi: prima la meta map, poi ] ``` -Se in seguito aggiungiamo una colonna `language` al foglio dati, sarà disponibile come `meta.language` senza richiedere alcuna modifica alla definizione di input del processo. +Se in seguito aggiungiamo una colonna `language` al foglio dati e la includiamo nell'operazione `map` (ad es. `language: row.language`), sarà disponibile come `meta.language` senza richiedere alcuna modifica alla definizione di input del processo. #### 1.5.3. Aggiornare il processo `COWPY` per usare la meta map @@ -891,12 +935,25 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` La directory dei risultati ora contiene i file ASCII art. @@ -1044,20 +1101,33 @@ nextflow run main.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` Ora abbiamo una previsione della lingua per ogni file nel dataset. @@ -1206,19 +1276,32 @@ nextflow run main.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` Sì, funziona! @@ -1311,7 +1394,7 @@ Punti chiave: -#### 2.3.2. Eseguire il flusso di lavoro +#### 2.3.2. Eseguire il flusso di lavoro: Eseguiamo il flusso di lavoro per verificare che funzioni: @@ -1322,19 +1405,32 @@ nextflow run main.nf -resume ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` La meta map ora contiene quattro campi: `id`, `character`, `lang` e `lang_group`. @@ -1445,13 +1541,26 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` La directory dei risultati è ora organizzata per famiglia linguistica, con ogni file nominato in base alla lingua rilevata: @@ -1509,18 +1618,19 @@ Quando Nextflow sostituisce `#!groovy ${meta.character}` nel comando, lo strumen ??? failure "Output del comando" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1540,7 +1650,7 @@ Quando Nextflow sostituisce `#!groovy ${meta.character}` nel comando, lo strumen cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1564,28 +1674,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -La chiave `character` non viene mai creata nella meta map. -Quando lo script del processo valuta `#!groovy ${meta.character}`, la chiave mancante restituisce `null`, e Nextflow sostituisce letteralmente la stringa `null` nel comando: +La nostra operazione `map` scrive esplicitamente `#!groovy character: row.character`, quindi la chiave `character` viene comunque creata nella meta map, ma accedere a una colonna che non esiste nella riga analizzata restituisce `null`, quindi il suo valore diventa `null`. +Quando lo script del processo valuta `#!groovy ${meta.character}`, Nextflow sostituisce letteralmente la stringa `null` nel comando: ??? failure "Output del comando" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1610,7 +1721,7 @@ Quando lo script del processo valuta `#!groovy ${meta.character}`, la chiave man TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/it/docs/side_quests/nf_test/index.md b/docs/it/docs/side_quests/nf_test/index.md index d33488772a..7a8651f690 100644 --- a/docs/it/docs/side_quests/nf_test/index.md +++ b/docs/it/docs/side_quests/nf_test/index.md @@ -1,14 +1,3 @@ -Looking at the diff, I need to make the following changes to the existing Italian translation: - -1. Update link `../hello_nextflow/README.md` → `../../hello_nextflow/index.md` in Prerequisites -2. Update link `../envsetup/index.md` → `../../envsetup/index.md` in "Open the training codespace" -3. Update links `../hello_nextflow/00_orientation.md` → `../../hello_nextflow/00_orientation.md` and `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` and `../hello_nextflow/index.md` → `../../hello_nextflow/index.md` -4. Remove `publishDir 'results', mode: 'copy'` from both processes in the workflow code example, and add `main:`, `publish:`, and `output {}` blocks -5. Change `Holà` → `Hola` in the file assertions -6. Update link `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` in section 2.1 -7. Fix `!!!warning` → `!!! warning` -8. Update link `../` → `../index.md` in "What's next?" - # Test con nf-test :material-information-outline:{ .ai-translation-notice-icon } Traduzione assistita da IA - [scopri di più e suggerisci miglioramenti](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) @@ -30,7 +19,7 @@ I test vi permettono di verificare sistematicamente che ogni parte della pipelin Ci sono molti tipi diversi di test che possiamo scrivere: -1. **Test a livello di modulo**: Per i singoli processi +1. **Test a livello di processo**: Per i singoli processi 2. **Test a livello di workflow**: Per un singolo flusso di lavoro 3. **Test a livello di pipeline**: Per la pipeline nel suo insieme 4. **Test di performance**: Per la velocità e l'efficienza della pipeline @@ -38,16 +27,16 @@ Ci sono molti tipi diversi di test che possiamo scrivere: Testare i singoli processi è analogo agli unit test in altri linguaggi. Testare il flusso di lavoro o l'intera pipeline è analogo a quelli che vengono chiamati integration test in altri linguaggi, dove testiamo le interazioni tra i componenti. -[**nf-test**](https://www.nf-test.com/) è uno strumento che vi permette di scrivere test a livello di modulo, workflow e pipeline. In breve, vi permette di verificare sistematicamente che ogni singola parte della pipeline funzioni come previsto, _in isolamento_. +[**nf-test**](https://www.nf-test.com/) è uno strumento che vi permette di scrivere test a livello di processo, workflow e pipeline. In breve, vi permette di verificare sistematicamente che ogni singola parte della pipeline funzioni come previsto, _in isolamento_. ### Obiettivi di apprendimento -In questa side quest, imparerete a usare nf-test per scrivere un test a livello di workflow per la pipeline, nonché test a livello di modulo per i tre processi che essa richiama. +In questa side quest, imparerete a usare nf-test per scrivere un test a livello di workflow per la pipeline, nonché test a livello di processo per i due processi che essa richiama. Al termine di questa side quest, sarete in grado di usare efficacemente le seguenti tecniche: - Inizializzare nf-test nel vostro progetto -- Generare test a livello di modulo e di workflow +- Generare test a livello di processo e di workflow - Aggiungere tipi comuni di asserzioni - Capire quando usare gli snapshot rispetto alle asserzioni sul contenuto - Eseguire test per un intero progetto @@ -61,6 +50,16 @@ Prima di affrontare questa side quest, dovreste: - Aver completato il tutorial [Hello Nextflow](../../hello_nextflow/index.md) o un corso equivalente per principianti. - Essere a proprio agio con i concetti e i meccanismi di base di Nextflow (processi, canali, operatori, gestione di file e metadati) +!!! warning "Requisito di versione nf-test" + + I test a livello di processo richiedono **nf-test 0.9.3 o versioni successive**. Le versioni precedenti (inclusa la 0.9.2) generano codice di test harness incompatibile con il parser di sintassi strict che Nextflow usa per impostazione predefinita dalla versione 26.04 in poi, causando un errore `Script compilation failed` invece del risultato atteso del test. + + Verificate la vostra versione con `nf-test version`. Se dovete aggiornare: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. Iniziamo @@ -92,7 +91,8 @@ Troverete un file del flusso di lavoro principale e un file CSV chiamato `greeti ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` Per una descrizione dettagliata dei file, consultate il [riscaldamento di Hello Nextflow](../../hello_nextflow/00_orientation.md). @@ -122,21 +122,23 @@ Potete vedere il codice completo del flusso di lavoro qui sotto. ??? example "Codice del workflow" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * Parametri della pipeline - */ + * Parametri della pipeline + */ params.input_file = "greetings.csv" /* - * Usa echo per stampare 'Hello World!' sullo standard output - */ + * Usa echo per stampare 'Hello World!' sullo standard output + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -145,15 +147,15 @@ Potete vedere il codice completo del flusso di lavoro qui sotto. } /* - * Usa un'utilità di sostituzione testo per convertire il saluto in maiuscolo - */ + * Usa un'utilità di sostituzione testo per convertire il saluto in maiuscolo + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -194,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` CONGRATULAZIONI! Avete appena eseguito un test! @@ -446,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` Successo! La pipeline viene eseguita con successo e il test passa. Eseguitelo tutte le volte che volete e otterrete sempre lo stesso risultato! @@ -471,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -545,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` Successo! La pipeline viene eseguita con successo e il test passa. Ora abbiamo iniziato a testare i dettagli della pipeline, oltre allo stato generale. @@ -630,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` Successo! I test passano perché la pipeline è stata completata con successo, il numero corretto di processi è stato eseguito e i file di output sono stati creati. Questo dovrebbe anche mostrarvi quanto sia utile fornire quei nomi informativi per i vostri test. @@ -741,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -811,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -819,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` Successo! Il test passa perché il processo `sayHello` è stato eseguito con successo e l'output è stato creato. @@ -869,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` Successo! Il test passa perché il processo `sayHello` è stato eseguito con successo e l'output corrisponde allo snapshot. @@ -962,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. Testare il processo `convertToUpper` @@ -1009,10 +1040,10 @@ Questo è un test simile a quello del processo `sayHello`, ma sta testando il pr Ora dobbiamo fornire un singolo file di input al processo convertToUpper, che include del testo che vogliamo convertire in maiuscolo. Ci sono molti modi in cui potremmo farlo: - Potremmo creare un file dedicato per il test -- Potremmo riutilizzare il file data/greetings.csv esistente +- Potremmo riutilizzare il file greetings.csv esistente - Potremmo crearlo al volo all'interno del test -Per ora, riutilizziamo il file data/greetings.csv esistente usando l'esempio che abbiamo usato con il test a livello di pipeline. Come prima, possiamo nominare il test per riflettere meglio ciò che stiamo testando, ma questa volta lasciamo che 'snapshot' il contenuto piuttosto che verificare stringhe specifiche (come abbiamo fatto nell'altro processo). +Per ora, riutilizziamo il file greetings.csv esistente usando l'esempio che abbiamo usato con il test a livello di pipeline. Come prima, possiamo nominare il test per riflettere meglio ciò che stiamo testando, ma questa volta lasciamo che 'snapshot' il contenuto piuttosto che verificare stringhe specifiche (come abbiamo fatto nell'altro processo). === "Dopo" @@ -1081,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1089,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` Notate che abbiamo creato un file snapshot per il processo `convertToUpper` in `tests/main.converttoupper.nf.test.snap`. Se eseguiamo di nuovo il test, dovremmo vedere che nf-test passa di nuovo. @@ -1108,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### Takeaway @@ -1150,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` Guardate un po'! Abbiamo eseguito 4 test, 1 per ogni processo e 2 per l'intera pipeline con un singolo comando. Immaginate quanto sia potente su una codebase di grandi dimensioni! @@ -1204,7 +1235,7 @@ Consultate la [documentazione di nf-test](https://www.nf-test.com/) per funziona - Aggiungere asserzioni più complete ai vostri test - Scrivere test per casi limite e condizioni di errore - Configurare l'integrazione continua per eseguire i test automaticamente -- Imparare altri tipi di test come i test di workflow e di modulo +- Imparare altri tipi di test come i test di workflow, di performance e stress test - Esplorare tecniche di validazione del contenuto più avanzate **Ricordate:** I test sono documentazione vivente di come il vostro codice dovrebbe comportarsi. Più test scrivete, e più specifiche sono le vostre asserzioni, più potete essere certi dell'affidabilità della vostra pipeline. diff --git a/docs/it/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/it/docs/side_quests/plugin_development/01_plugin_basics.md index 6188ddaee5..3f19321d82 100644 --- a/docs/it/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/it/docs/side_quests/plugin_development/01_plugin_basics.md @@ -511,7 +511,7 @@ Aggiornate `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -534,7 +534,7 @@ Il plugin produce diversi messaggi INFO e WARN durante l'esecuzione. Questi sono normali per un piccolo esempio eseguito su una macchina locale: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -600,7 +600,7 @@ Aggiungete un blocco `co2footprint` a `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -614,7 +614,7 @@ Aggiungete un blocco `co2footprint` a `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -635,11 +635,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: L'avviso sulla zona è scomparso. Il plugin ora usa l'intensità di carbonio specifica per GB (163.92 gCO₂eq/kWh) invece del valore globale di fallback (480.0 gCO₂eq/kWh). -!!! note "Nota" - - Potreste anche vedere un messaggio `WARN: Unrecognized config option 'co2footprint.location'`. - È puramente cosmetico e può essere ignorato tranquillamente; il plugin legge comunque il valore correttamente. - Nella Parte 6, creerete uno scope di configurazione per il vostro plugin. Questo plugin funziona interamente attraverso il meccanismo observer, agganciandosi agli eventi del ciclo di vita del flusso di lavoro per raccogliere metriche sulle risorse e generare il suo report quando la pipeline è completata. diff --git a/docs/it/docs/side_quests/plugin_development/02_create_project.md b/docs/it/docs/side_quests/plugin_development/02_create_project.md index 3e5b644c78..c987825e9c 100644 --- a/docs/it/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/it/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ Dovresti vedere: ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ La più importante è il blocco `nextflowPlugin`: ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ Aggiornalo per corrispondere alla versione di Nextflow installata, per garantire ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ Aggiornalo per corrispondere alla versione di Nextflow installata, per garantire ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **Gli avvisi sono previsti.** diff --git a/docs/it/docs/side_quests/plugin_development/03_custom_functions.md b/docs/it/docs/side_quests/plugin_development/03_custom_functions.md index 0e4ccba5d7..5eccb48637 100644 --- a/docs/it/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/it/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/it/docs/side_quests/plugin_development/04_build_and_test.md b/docs/it/docs/side_quests/plugin_development/04_build_and_test.md index f3a4ce33c2..04f7f6333d 100644 --- a/docs/it/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/it/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **Dove sono i risultati dei test?** Gradle nasconde l'output dettagliato quando tutti i test passano. diff --git a/docs/it/docs/side_quests/plugin_development/05_observers.md b/docs/it/docs/side_quests/plugin_development/05_observers.md index a14e57d523..5c34b16d89 100644 --- a/docs/it/docs/side_quests/plugin_development/05_observers.md +++ b/docs/it/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/it/docs/side_quests/plugin_development/06_configuration.md b/docs/it/docs/side_quests/plugin_development/06_configuration.md index 191a8bb39a..ee15242762 100644 --- a/docs/it/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/it/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ La compilazione fallisce: ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` In Groovy (e Java), è necessario _dichiarare_ una variabile prima di usarla. diff --git a/docs/it/docs/side_quests/plugin_development/index.md b/docs/it/docs/side_quests/plugin_development/index.md index 7b22c354ee..efcdf137f3 100644 --- a/docs/it/docs/side_quests/plugin_development/index.md +++ b/docs/it/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ Non è richiesta alcuna esperienza precedente con Java o Groovy. **Directory di lavoro:** `side-quests/plugin_development` +#### Aprire il codespace di formazione + +Se non lo avete ancora fatto, assicuratevi di aprire l'ambiente di formazione come descritto nella sezione [Environment Setup](../../envsetup/index.md). + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Obiettivi di apprendimento Al termine di questa formazione, sarete in grado di: diff --git a/docs/it/docs/side_quests/splitting_and_grouping/index.md b/docs/it/docs/side_quests/splitting_and_grouping/index.md index 21d73572d7..ad0603ef38 100644 --- a/docs/it/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/it/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ Applicate queste modifiche a `main.nf`: === "Dopo" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ Successivamente, considereremo la situazione in cui si vuole unire su più campi ### 3.2. Unire su più campi -Abbiamo 2 repliche per il campione A, ma solo 1 per i campioni B e C. In questo caso siamo riusciti a unirli efficacemente usando il campo `id`, ma cosa succederebbe se fossero fuori sincronia? Potremmo confondere i campioni normali e tumorali di repliche diverse! +Abbiamo 2 repliche per il paziente A, ma solo 1 per i pazienti B e C. In questo caso siamo riusciti a unirli efficacemente usando il campo `id`, ma cosa succederebbe se fossero fuori sincronia? Potremmo confondere i campioni normali e tumorali di repliche diverse! Per evitare questo, possiamo unire su più campi. In realtà ci sono più modi per ottenere questo risultato, ma ci concentreremo sulla creazione di una nuova chiave di unione che includa sia l'`id` del campione che il numero di `replicate`. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + Poiché la closure ora racchiude ogni percorso con `file()`, le voci dei file appaiono come percorsi assoluti risolti anziché come semplici nomi di file dal samplesheet. + Usare una closure con nome ci permette di riutilizzare la stessa trasformazione in più punti, riducendo il rischio di errori e rendendo il codice più leggibile e manutenibile. ### 3.5. Ridurre la duplicazione dei dati @@ -723,21 +725,21 @@ Abbiamo molti dati duplicati nel nostro flusso di lavoro. Ogni elemento nei camp ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "Output del comando" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ In questa sezione, avete imparato: ## 5. Aggregare i campioni usando `groupTuple` -Nelle sezioni precedenti, abbiamo imparato come suddividere i dati da un file di input e filtrare per campi specifici (nel nostro caso campioni normali e tumorali). Ma questo copre solo un singolo tipo di unione. Cosa succede se vogliamo raggruppare i campioni per un attributo specifico? Ad esempio, invece di unire coppie normale-tumorale corrispondenti, potremmo voler elaborare tutti i campioni di "sampleA" insieme indipendentemente dal loro tipo. Questo pattern è comune nei flussi di lavoro bioinformatici dove potreste voler elaborare campioni correlati separatamente per ragioni di efficienza prima di confrontare o combinare i risultati alla fine. +Nelle sezioni precedenti, abbiamo imparato come suddividere i dati da un file di input e filtrare per campi specifici (nel nostro caso campioni normali e tumorali). Ma questo copre solo un singolo tipo di unione. Cosa succede se vogliamo raggruppare i campioni per un attributo specifico? Ad esempio, invece di unire coppie normale-tumorale corrispondenti, potremmo voler elaborare tutti i campioni di "patientA" insieme indipendentemente dal loro tipo. Questo pattern è comune nei flussi di lavoro bioinformatici dove potreste voler elaborare campioni correlati separatamente per ragioni di efficienza prima di confrontare o combinare i risultati alla fine. Nextflow include metodi integrati per farlo, il principale che esamineremo è `groupTuple`. @@ -1008,7 +1014,7 @@ Il primo passo è simile a quello che abbiamo fatto nella sezione precedente. Do ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Padroneggiare queste operazioni sui canali vi permetterà di costruire pipeline 2. **Suddividere i dati in canali separati:** Abbiamo usato `filter` per dividere i dati in flussi indipendenti in base al campo `type` ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Unire campioni corrispondenti:** Abbiamo usato `join` per ricombinare campioni correlati in base ai campi `id` e `repeat` @@ -1199,31 +1205,31 @@ Padroneggiare queste operazioni sui canali vi permetterà di costruire pipeline - Unire due canali per chiave (primo elemento della tupla) ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Estrarre la chiave di unione e unire per questo valore ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - Unire su più campi usando subMap + - Unire su più campi usando `subMap` ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Distribuire sugli intervalli:** Abbiamo usato `combine` per creare prodotti cartesiani di campioni con intervalli genomici per l'elaborazione parallela. ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Aggregare per chiavi di raggruppamento:** Abbiamo usato `groupTuple` per raggruppare per il primo elemento in ogni tupla, raccogliendo così i campioni che condividono i campi `id` e `interval` e unendo le repliche tecniche. diff --git a/docs/it/docs/side_quests/workflows_of_workflows/index.md b/docs/it/docs/side_quests/workflows_of_workflows/index.md index f28a511656..ed942a0010 100644 --- a/docs/it/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/it/docs/side_quests/workflows_of_workflows/index.md @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` Per renderlo componibile con altri flussi di lavoro, alcune cose devono cambiare. ### 1.2. Rendere il flusso di lavoro componibile -Per rendere un flusso di lavoro componibile, quattro cose devono cambiare: -il flusso di lavoro riceve un nome, gli input si spostano in un blocco `take:`, gli output si spostano in un blocco `emit:`, -e i blocchi standalone `publish:`/`output {}` vengono rimossi (appartengono all'entry workflow). +Per rendere un flusso di lavoro componibile, tre cose devono cambiare: +il flusso di lavoro riceve un nome, gli input si spostano in un blocco `take:` e gli output si spostano in un blocco `emit:` +(sostituendo i blocchi standalone `publish:`/`output {}`, che appartengono invece all'entry workflow). Esaminiamo queste modifiche una per una. @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "Contenuto della directory" @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` Per renderlo componibile con `GREETING_WORKFLOW`, si applicano le stesse tre modifiche della sezione 1.2. @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "Contenuto della directory" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "Contenuto del file" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` La pipeline funziona dall'inizio alla fine: il saluto è stato convertito in maiuscolo e invertito. diff --git a/docs/it/docs/side_quests/working_with_files/index.md b/docs/it/docs/side_quests/working_with_files/index.md index c3552683b6..fcf23ee92a 100644 --- a/docs/it/docs/side_quests/working_with_files/index.md +++ b/docs/it/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Come potete vedere, Nextflow ha stampato il percorso stringa esattamente come lo abbiamo scritto. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Questa volta, vedete il percorso assoluto completo invece del percorso relativo che abbiamo fornito come input. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Vedete i vari attributi del file stampati sulla console qui sopra. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Questo dimostra che siamo in grado di operare correttamente sul file all'interno di un processo. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Questa è la parte importante: @@ -545,12 +570,13 @@ nextflow run main.nf ??? failure "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -578,9 +604,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Questo mostra molti dettagli sull'errore perché il processo è impostato per produrre informazioni di debug, come indicato sopra. @@ -694,9 +720,9 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -704,9 +730,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Funziona! Potete vedere che è cambiato molto poco. @@ -815,16 +847,11 @@ Un modo ingenuo per farlo sarebbe combinare il metodo `file()` con [`channel.of( ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` Funziona, ma è macchinoso. -!!! tip "Suggerimento: quando usare `file()` vs `channel.fromPath()`" - - - Usate `file()` quando avete bisogno di un singolo oggetto Path per la manipolazione diretta (verificare se un file esiste, leggerne gli attributi, o passarlo a una singola invocazione di processo) - - Usate `channel.fromPath()` quando avete bisogno di un canale che può contenere più file, specialmente con pattern glob, o quando i file fluiranno attraverso più processi - È qui che entra in gioco [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath): una comoda fabbrica di canali che raggruppa tutte le funzionalità necessarie per generare un canale da una o più stringhe di file statiche nonché da pattern glob. ### 3.1. Aggiungere la fabbrica di canali @@ -879,11 +906,17 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Come potete vedere, il percorso del file viene caricato come oggetto di tipo `Path` nel canale. @@ -891,6 +924,11 @@ Questo è simile a ciò che avrebbe fatto `file()`, tranne che ora abbiamo un ca Usare `channel.fromPath()` è un modo conveniente per creare un nuovo canale popolato da un elenco di file. +!!! tip "Suggerimento: quando usare `file()` vs `channel.fromPath()`" + + - Usate `file()` quando avete bisogno di un singolo oggetto Path per la manipolazione diretta (verificare se un file esiste, leggerne gli attributi, o passarlo a una singola invocazione di processo) + - Usate `channel.fromPath()` quando avete bisogno di un canale che può contenere più file, specialmente con pattern glob, o quando i file fluiranno attraverso più processi + ### 3.2. Visualizzare gli attributi dei file nel canale Nel nostro primo utilizzo della fabbrica di canali, abbiamo semplificato il codice e stampato solo il nome del file. @@ -936,12 +974,12 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -949,6 +987,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Eccolo, gli stessi risultati di prima ma ora abbiamo il file in un canale, quindi possiamo aggiungerne altri. @@ -1005,12 +1049,12 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1026,6 +1070,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Come potete vedere, ora abbiamo due oggetti Path nel nostro canale, il che dimostra che Nextflow ha eseguito correttamente la filename expansion e ha caricato ed elaborato entrambi i file come previsto. @@ -1110,19 +1160,25 @@ nextflow run main.nf ??? success "Output del comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ogni elemento nel canale è ora una tupla contenente il `simpleName` e l'oggetto file originale. @@ -1166,19 +1222,25 @@ nextflow run main.nf ??? success "Output del comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ora la tupla per ogni elemento nel nostro canale contiene la lista di metadati (_es._ `[patientA, rep1, normal, R1, 001]`) e l'oggetto file originale. @@ -1267,19 +1329,25 @@ nextflow run main.nf ??? success "Output del comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Ora i metadati sono chiaramente etichettati (_es._ `[id:patientA, replicate:1, type:normal, readNum:2]`) quindi è molto più facile capire cosa è cosa. @@ -1339,10 +1407,10 @@ Aggiorniamo il flusso di lavoro `main.nf` di conseguenza: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Commentiamo la mappatura per ora, ci torneremo! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1357,13 +1425,13 @@ Aggiorniamo il flusso di lavoro `main.nf` di conseguenza: === "Prima" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // Carica i file con channel.fromFilePairs + // Carica i file con channel.fromPath ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1385,12 +1453,11 @@ nextflow run main.nf ??? failure "Output del comando" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1400,9 +1467,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Ops, questa volta l'esecuzione è fallita! @@ -1453,11 +1520,17 @@ nextflow run main.nf ??? success "Output del comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Questa volta il flusso di lavoro ha successo! @@ -1478,10 +1551,10 @@ Decommentate l'operazione map nel flusso di lavoro e apportate le seguenti modif // Carica i file con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1498,10 +1571,10 @@ Decommentate l'operazione map nel flusso di lavoro e apportate le seguenti modif ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Commentiamo la mappatura per ora, ci torneremo! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1528,11 +1601,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Eccolo: abbiamo la map dei metadati (`[id:patientA, replicate:1, type:normal]`) nella prima posizione della tupla di output, seguita dalla tupla dei file accoppiati, come previsto. @@ -1644,10 +1723,10 @@ Nel flusso di lavoro principale, sostituite l'operatore `.view()` con `#!groovy // Carica i file con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1666,10 +1745,10 @@ Nel flusso di lavoro principale, sostituite l'operatore `.view()` con `#!groovy // Carica i file con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1688,11 +1767,17 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Questo conferma che ora possiamo fare riferimento al canale per nome. @@ -1716,10 +1801,10 @@ Nel flusso di lavoro principale, apportate le seguenti modifiche al codice: // Carica i file con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1749,10 +1834,10 @@ Nel flusso di lavoro principale, apportate le seguenti modifiche al codice: // Carica i file con channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1786,12 +1871,19 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` Gli output vengono pubblicati in una directory `results`, quindi date un'occhiata lì. @@ -1851,12 +1943,26 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` La directory dei risultati dovrebbe ora contenere i risultati per tutti i dati disponibili. @@ -1887,7 +1993,7 @@ Apportate la seguente modifica al blocco `output {}`: === "Dopo" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1895,7 +2001,7 @@ Apportate la seguente modifica al blocco `output {}`: === "Prima" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1913,12 +2019,26 @@ nextflow run main.nf ??? success "Output del comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` Controllate ora la directory dei risultati: @@ -2071,7 +2191,7 @@ L'applicazione di queste tecniche nel vostro lavoro vi consentirà di costruire 5. **Semplificazione con channel.fromFilePairs:** Abbiamo usato `channel.fromFilePairs()` per accoppiare automaticamente i file correlati ed estrarre i metadati dagli ID dei file accoppiati. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Utilizzo delle operazioni sui file nei processi:** Abbiamo integrato le operazioni sui file nei processi Nextflow con una corretta gestione dell'input, usando il blocco `output {}` per organizzare gli output in base ai metadati. @@ -2081,10 +2201,10 @@ L'applicazione di queste tecniche nel vostro lavoro vi consentirà di costruire ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], diff --git a/docs/ko/docs/hello_nextflow/01_hello_world.md b/docs/ko/docs/hello_nextflow/01_hello_world.md index bb18b9eb59..c682c9a7da 100644 --- a/docs/ko/docs/hello_nextflow/01_hello_world.md +++ b/docs/ko/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "명령 출력" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -터미널 출력은 익숙해 보일 것입니다. 외부적으로는 아무것도 변경되지 않았습니다. +터미널 출력은 이제 게시된 출력과 해당 출력이 저장된 디렉토리를 나열하는 `Outputs:` 요약으로 끝납니다. -그러나 파일 탐색기를 확인하십시오: 이번에는 Nextflow가 `results/`라는 새 디렉토리를 생성했습니다. +파일 탐색기를 확인하십시오: 이번에는 Nextflow가 `results/`라는 새 디렉토리도 생성했습니다. ??? abstract "디렉토리 내용" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` 이번에는 결과가 지정된 하위 디렉토리 아래에 기록됩니다. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` 이번에는 결과를 보면 파일이 심볼릭 링크가 아닌 적절한 복사본입니다. @@ -767,19 +785,19 @@ process sayHello { === "후" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "전" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` `$` 기호와 중괄호(`{ }`)는 Nextflow에게 이것이 실제 입력 값으로 대체(=보간)해야 하는 변수 이름임을 알려줍니다. @@ -811,15 +829,15 @@ process sayHello { === "후" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // 인사말을 내보냅니다 - sayHello(params.input) + // 인사말을 내보냅니다 + sayHello(params.input) ``` === "전" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // 인사말을 내보냅니다 - sayHello() + // 인사말을 내보냅니다 + sayHello() ``` 이것은 Nextflow에게 `--input` 매개변수를 통해 제공된 값으로 `sayHello` 프로세스를 실행하도록 지시합니다. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` 이러한 편집을 모두 올바르게 수행했다면 또 다른 성공적인 실행을 얻어야 합니다. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "작동하지 않았다면" @@ -936,7 +966,8 @@ nextflow run hello-world.nf 이것은 과정 시작 부분에서 언급되었지만 놓쳤을 수 있습니다. [Nextflow 버전](../info/nxf_versions.md) 도움말 자료를 확인하십시오. - 간단히 말해서, Nextflow `25.10`을 사용하는 경우 v2 언어 분석기를 활성화해야 합니다: + v2 분석기는 Nextflow 26.04부터 기본값으로 설정되어 있으므로 이전 버전에서만 이 문제가 발생합니다. + 26.04 이전 버전을 사용하는 경우 v2 언어 분석기를 활성화해야 합니다: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` 다시 한번 results 디렉토리에서 해당하는 업데이트된 출력을 찾을 수 있습니다. @@ -1004,8 +1041,6 @@ nextflow run hello-world.nf --input 'Konnichiwa!' 여기서는 동일한 워크플로우를 다시 실행해야 할 때 [`-resume`](https://nextflow.io/docs/latest/cache-and-resume.html) 기능을 사용하는 방법, [`nextflow log`](https://nextflow.io/docs/latest/reference/cli.html#log)로 과거 실행 로그를 검사하는 방법, [`nextflow clean`](https://nextflow.io/docs/latest/reference/cli.html#clean)으로 이전 작업 디렉토리를 삭제하는 방법을 보여드립니다. - - ### 4.1. `-resume`으로 워크플로우 다시 실행 때로는 이전에 이미 실행한 파이프라인을 이미 성공적으로 완료된 단계를 다시 수행하지 않고 다시 실행하고 싶을 것입니다. @@ -1022,17 +1057,23 @@ Nextflow에는 이를 수행할 수 있는 [`-resume`](https://nextflow.io/docs/ 사용하려면 명령에 `-resume`을 추가하고 실행하기만 하면 됩니다: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "명령 출력" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` 콘솔 출력은 익숙해 보이지만, 이전과 약간 다른 점이 있습니다. diff --git a/docs/ko/docs/hello_nextflow/02_hello_channels.md b/docs/ko/docs/hello_nextflow/02_hello_channels.md index 01d27c5fef..801fe9b1b2 100644 --- a/docs/ko/docs/hello_nextflow/02_hello_channels.md +++ b/docs/ko/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` 이전과 마찬가지로, 위에 표시된 워크플로우 스크립트의 `output` 블록에 지정된 대로 `results/hello_channels` 디렉토리에서 `output.txt`라는 이름의 출력 파일을 찾을 수 있습니다. @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` 두 편집을 모두 올바르게 수행했다면 성공적으로 실행될 것입니다. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "명령 출력" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` 보시다시피 channel 내용이 콘솔에 출력됩니다. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "명령 출력" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` 확실히 잘 실행된 것 같습니다. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` 이번에는 세 개의 process 실행과 관련 작업 하위 디렉토리가 모두 출력에 나열됩니다. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` 요약 보기로 돌아가면 출력이 다시 한 줄로 요약됩니다. @@ -605,8 +652,6 @@ nextflow run hello-channels.nf └── output.txt ``` -그렇습니다! 각각 예상한 내용이 들어 있습니다. - ??? abstract "파일 내용" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "명령 출력" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -940,16 +985,25 @@ nextflow run hello-channels.nf ??? success "명령 출력" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` 이번에는 작동하며 `flatten()` 연산자를 실행하기 전과 후에 channel의 내용이 어떻게 보이는지에 대한 추가 통찰력을 제공합니다. @@ -1023,11 +1077,13 @@ Hola,Spanish,789 === "전" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * 파이프라인 매개변수 */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` 이것은 파일이 워크플로우 코드와 같은 위치에 있다고 가정합니다. @@ -1094,9 +1150,9 @@ nextflow run hello-channels.nf ??? failure "명령 출력" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1197,12 +1253,12 @@ nextflow run hello-channels.nf ??? failure "명령 출력" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1317,12 +1373,12 @@ nextflow run hello-channels.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1330,6 +1386,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` 이번에는 오류 없이 실행될 것입니다. diff --git a/docs/ko/docs/hello_nextflow/03_hello_workflow.md b/docs/ko/docs/hello_nextflow/03_hello_workflow.md index d0d4575e82..1108d5a995 100644 --- a/docs/ko/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/ko/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` 이전과 마찬가지로 `output` 블록에 지정된 위치에서 출력 파일을 찾을 수 있습니다. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` 방금 추가한 새 프로세스에 해당하는 추가 줄이 콘솔 출력에 나타납니다. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "명령 출력" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + 터미널 출력은 이제 `Outputs:` 요약 블록으로 끝납니다. 여기서는 프로세스 상태 줄에 집중하기 위해 생략했습니다. + 세 번째 단계를 포함하여 성공적으로 실행됩니다. 그러나 마지막 줄에서 `collectGreetings()`에 대한 호출 수를 보십시오. @@ -627,8 +651,8 @@ nextflow run hello-workflow.nf -resume ??? abstract "파일 내용" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` 이런. 수집 단계가 각 인사말에 대해 개별적으로 실행되었으며, 이것은 우리가 원했던 것이 아닙니다. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ nextflow run hello-workflow.nf -resume ??? abstract "파일 내용" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` 성공적으로 실행되고 원하는 출력을 생성합니다: ??? abstract "파일 내용" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` `results/hello_workflow/` 디렉토리를 보면 새 보고 파일인 `trio-report.txt`를 찾을 수 있습니다. @@ -1273,5 +1326,5 @@ workflow { - [x] 입력 순서가 입력 블록에 정의된 순서와 일치해야 함 - [ ] 한 번에 두 개의 입력만 제공할 수 있음 -자세히 알아보기: [3. 프로세스에 추가 매개변수 전달](#3-pass-more-than-one-input-to-a-process) +자세히 알아보기: [3. 프로세스에 추가 매개변수 전달](#3-pass-additional-parameters-to-a-process) diff --git a/docs/ko/docs/hello_nextflow/04_hello_modules.md b/docs/ko/docs/hello_nextflow/04_hello_modules.md index fe1c500503..df73096396 100644 --- a/docs/ko/docs/hello_nextflow/04_hello_modules.md +++ b/docs/ko/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` 이전과 마찬가지로 `output` 블록에 지정된 디렉토리(여기서는 `results/hello_modules/`)에서 출력 파일을 찾을 수 있습니다. @@ -172,7 +187,7 @@ include { } from '' * 파이프라인 매개변수 */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ include { } from '' * 파이프라인 매개변수 */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ process convertToUpper { * 파이프라인 매개변수 */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ process convertToUpper { * 파이프라인 매개변수 */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ process collectGreetings { * 파이프라인 매개변수 */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ process collectGreetings { * 파이프라인 매개변수 */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/ko/docs/hello_nextflow/05_hello_containers.md b/docs/ko/docs/hello_nextflow/05_hello_containers.md index 9414cd9af0..90854de98a 100644 --- a/docs/ko/docs/hello_nextflow/05_hello_containers.md +++ b/docs/ko/docs/hello_nextflow/05_hello_containers.md @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` 이전과 마찬가지로 `output` 블록에 지정된 디렉토리(`results/hello_containers/`)에서 출력 파일을 찾을 수 있습니다. @@ -259,22 +273,22 @@ ls / 예를 들어, 도구 문서에 따르면 `-c`로 캐릭터('cowacter')를 변경할 수 있습니다. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "명령 출력" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "명령 출력 (명확성을 위해 편집됨)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` 이번에는 정말로 작동합니다! diff --git a/docs/ko/docs/hello_nextflow/06_hello_config.md b/docs/ko/docs/hello_nextflow/06_hello_config.md index 37d028d171..1db618048d 100644 --- a/docs/ko/docs/hello_nextflow/06_hello_config.md +++ b/docs/ko/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` 이전과 마찬가지로 `output` 블록에 지정된 디렉토리(`results/hello_config/`)에서 출력 파일을 찾을 수 있습니다. @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` 이것은 여전히 이전과 동일한 출력을 생성합니다. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` 이것은 `tux-run/work/` 및 `tux-run/results/`를 포함하여 `tux-run/` 아래에 새로운 디렉토리 세트를 생성합니다. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` 최종 출력 파일에는 인사말을 말하는 stegosaurus 캐릭터가 포함되어야 합니다. @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` 이것은 `results/` 대신 `custom-outdir-cli/`에 출력을 게시합니다: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` 이것은 지정된 기본 경로 _및_ 배치 이름 하위 디렉토리 _및_ 프로세스별로 그룹화된 결과와 함께 `custom-outdir-config-2/rep2/`에 출력을 게시합니다: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` 이것은 `config-output-mode/`에 출력을 게시하며, 여전히 모두 심볼릭 링크가 아닌 적절한 복사본입니다. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "명령 출력" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` 이것은 문제없이 작동하고 `custom-outdir-config/conda` 아래에 이전과 동일한 출력을 생성해야 합니다. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` 보시다시피 이를 통해 런타임에 설정 간을 매우 편리하게 전환할 수 있습니다. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` 이것은 가능한 경우 Docker를 사용하고 `custom-outdir-config/test` 아래에 출력을 생성하며, 이번에는 캐릭터가 코미디 듀오 `dragonandcow`입니다. diff --git a/docs/ko/docs/hello_nf-core/00_orientation.md b/docs/ko/docs/hello_nf-core/00_orientation.md index 0cce38d1dd..97ca190aaf 100644 --- a/docs/ko/docs/hello_nf-core/00_orientation.md +++ b/docs/ko/docs/hello_nf-core/00_orientation.md @@ -22,25 +22,20 @@ codespace는 VSCode 인터페이스로 설정되어 있으며, 파일 시스템 ### 버전 요구 사항 -이 교육은 **Nextflow 25.10.2** 또는 이후 버전에서 **v2 syntax parser가 비활성화된 상태**로 설계되었습니다. +이 교육은 **v2 syntax parser가 활성화된** Nextflow 25.10.2 이상에서 작동하며, v2 parser는 Nextflow 26.04부터 기본값입니다. +제공하는 교육 환경에서는 별도로 설정할 필요가 없습니다. v2 parser가 적용된 Nextflow 26.04.4가 실행됩니다. 로컬 또는 사용자 지정 환경을 사용하는 경우 [버전 참고 사항](../info/nxf_versions.md)을 확인하십시오. -#### 제공하는 교육 환경을 사용하는 경우: - -더 진행하기 전에 다음 명령을 반드시 실행해야 합니다: - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### 로컬 또는 사용자 지정 환경을 사용하는 경우: - -[여기](../info/nxf_versions.md)에 문서화된 올바른 설정을 사용하고 있는지 확인하십시오. - -이 교육에는 추가로 **nf-core tools 3.5.2**가 필요합니다. +이 교육에는 추가로 **nf-core tools 4.0.2**가 필요합니다. 다른 버전의 nf-core 도구를 사용하는 경우 따라가기 어려울 수 있습니다. `nf-core --version` 명령을 사용하여 환경에 설치된 버전을 확인할 수 있습니다. +!!! warning "v2 parser 호환성" + + 많은 nf-core 파이프라인이 아직 v2 syntax parser를 지원하지 않습니다. + 이 과정에서 사용하는 파이프라인 외의 nf-core 파이프라인을 실행하다가 오류가 발생하면 `export NXF_SYNTAX_PARSER=v1`을 설정하여 v1 parser로 전환해야 할 수 있습니다. + 자세한 내용은 [버전 참고 사항](../info/nxf_versions.md)을 확인하십시오. + ## 작업 준비하기 codespace가 실행되면 교육에 들어가기 전에 두 가지 작업을 수행해야 합니다: 이 특정 과정의 작업 디렉토리를 설정하고 제공된 자료를 살펴보는 것입니다. @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ tree . -L 2 - **`greetings.csv` 파일**은 테스트 목적으로 사용하는 최소한의 열 데이터가 포함된 CSV입니다. +- **`custom.config` 파일**은 Part 1에서 process 리소스 재정의 및 `ext.args`를 시연하는 데 사용되는 Nextflow 설정 파일 예제입니다. + +- **`malformed_samplesheet.csv` 파일**은 Part 1에서 입력 유효성 검사를 시연하기 위해 의도적으로 잘못 작성된 samplesheet입니다. + +- **`my_params.yml` 파일**은 Part 1에서 파이프라인에 boolean 매개변수를 전달하는 방법을 시연하는 데 사용되는 매개변수 파일 예제입니다. + - **`original-hello` 디렉토리**에는 전체 Hello Nextflow 교육 시리즈를 진행하여 생성된 소스 코드의 사본이 포함되어 있습니다(Docker 활성화 상태). - **`solutions` 디렉토리**에는 과정의 각 단계에서 생성되는 완성된 워크플로우 스크립트가 포함되어 있습니다. @@ -112,7 +116,7 @@ tree . -L 2 - [ ] 이 과정의 목표와 전제 조건을 이해했습니다 - [ ] 환경이 실행 중입니다 -- [ ] syntax parser가 **v1**로 설정되어 있는지 확인했습니다 +- [ ] nf-core tools 4.0.2를 사용하고 있습니다(`nf-core --version`으로 확인) - [ ] 작업 디렉토리를 적절하게 설정했습니다 모든 항목을 체크할 수 있다면 준비가 완료된 것입니다. diff --git a/docs/ko/docs/hello_nf-core/01_run_demo.md b/docs/ko/docs/hello_nf-core/01_run_demo.md index 8e6b1e60da..9e9214e93b 100644 --- a/docs/ko/docs/hello_nf-core/01_run_demo.md +++ b/docs/ko/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ nf-core 프로젝트에서 코드 구조와 도구 작동을 시연하기 위한 ![파이프라인 지하철 노선도](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. 명령줄 예제 @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow는 파이프라인 코드를 `pull`하여 전체 저장소를 로컬 드라이브에 다운로드합니다. @@ -106,40 +107,73 @@ nextflow list 다른 파이프라인을 몇 개 더 pull하여 여러 개가 있을 때 어떻게 나열되는지 확인해볼 수 있습니다. -#### 1.2.3. `$NXF_HOME/assets/`에서 파이프라인 찾기 +#### 1.2.3. 파이프라인이 다운로드된 위치 찾기 파일들이 현재 작업 디렉토리에 없다는 것을 알 수 있습니다. -기본적으로 Nextflow는 `$NXF_HOME/assets`에 저장합니다. +기본적으로 Nextflow는 pull한 파이프라인을 `$NXF_HOME/assets`에 저장합니다. + +특정 파이프라인의 위치를 확인하려면 Nextflow에 직접 물어보십시오: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "명령 출력" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "참고" +!!! info "정보" 교육 환경을 사용하지 않는 경우 시스템에서 전체 경로가 다를 수 있습니다. Nextflow는 이러한 파이프라인을 직접 상호작용하는 코드가 아닌 라이브러리처럼 사용해야 한다는 원칙에 따라 다운로드된 소스 코드를 의도적으로 '방해가 되지 않는' 위치에 보관합니다. +내부적으로 Nextflow는 pull한 각 파이프라인을 `$NXF_HOME/assets/.repos/` 아래에 git 저장소로 저장하고, 각 리비전의 코드를 `clones//` 하위 디렉토리에 체크아웃합니다. +`.repos`는 숨겨진 디렉토리이므로 `tree -L 2 $NXF_HOME/assets/`를 실행하면 비어 있는 것처럼 보입니다. + #### 1.2.4. 소스 코드에 쉽게 접근하기 위한 심볼릭 링크 만들기 코드를 자세히 살펴보지는 않겠지만, 전체적인 구성이 어떻게 되어 있는지 간략히 확인해보겠습니다. -파이프라인 소스 코드를 더 쉽게 탐색할 수 있도록 assets 디렉토리에 대한 심볼릭 링크를 만드십시오: +파이프라인 소스 코드를 더 쉽게 탐색할 수 있도록 체크아웃된 파이프라인 사본을 가리키는 심볼릭 링크를 만드십시오: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -이렇게 하면 `tree -L 2 pipelines`로 코드를 탐색하거나 파일을 직접 열 수 있는 바로가기가 만들어집니다. +이렇게 하면 `tree -L 2 pipelines/nf-core/demo`로 코드를 탐색하거나 파일을 직접 열 수 있는 바로가기가 만들어집니다. #### 1.2.5. 코드 구성 개요 @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` 보시다시피 많은 내용이 있지만, 대부분은 신경 쓰지 않아도 됩니다. @@ -211,7 +247,7 @@ tree -L 1 pipelines/nf-core/demo 이것은 [nf-core/test-datasets](https://github.com/nf-core/test-datasets) 저장소에서 호스팅되는 작은 테스트 데이터셋을 사용하여 파이프라인을 실행하기 위한 최소한의 설정 모음입니다. 작은 규모로 파이프라인을 빠르게 사용해볼 수 있는 좋은 방법입니다. -!!! note "참고" +!!! tip "팁" Nextflow의 configuration profile 시스템을 사용하면 다양한 컨테이너 엔진이나 실행 환경 간에 쉽게 전환할 수 있습니다. 자세한 내용은 [Hello Nextflow Part 6: Configuration](../hello_nextflow/06_hello_config.md)을 참조하십시오. @@ -220,10 +256,10 @@ tree -L 1 pipelines/nf-core/demo 파이프라인을 실행하기 전에 파이프라인의 test 프로파일이 무엇을 지정하는지 확인하는 것이 좋습니다. `nf-core/demo`의 `test` 프로파일은 설정 파일 `conf/test.config`에 있습니다. -`nextflow pull`로 다운로드한 파이프라인 소스 내에서 로컬로 찾을 수 있습니다: +섹션 1.2.4에서 만든 `pipelines` 심볼릭 링크를 통해 `nextflow pull`로 다운로드한 파이프라인 소스 내에서 로컬로 찾을 수 있습니다: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` 해당 파일의 내용은 다음과 같습니다: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // 입력 데이터 - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` 이것은 샘플시트라고 하며, nf-core 파이프라인에 대한 가장 일반적인 입력 형식입니다. - -!!! note "참고" - - 데이터 형식과 유형에 익숙하지 않더라도 걱정하지 마십시오. 이후 내용에 중요하지 않습니다. +데이터 형식과 유형에 익숙하지 않더라도 걱정하지 마십시오. 이후 내용에 중요하지 않습니다. 따라서 파이프라인을 사용해보는 데 필요한 모든 것이 있음을 확인했습니다. ### 2.2. 파이프라인 실행하기 -컨테이너 시스템으로 Docker를, 출력 디렉토리로 `demo-results`를 사용하기로 결정했다면, 테스트 명령을 실행할 준비가 된 것입니다: +위에서 언급한 것처럼, 예제 테스트 명령을 거의 그대로 사용할 수 있습니다. 사용할 소프트웨어 패키징 시스템과 출력 디렉토리 이름만 지정하면 됩니다. +여기서는 컨테이너 시스템으로 Docker를, 출력 디렉토리로 `demo-results`를 사용하겠습니다. + +테스트 명령을 실행합니다: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results 기본 Nextflow 파이프라인을 실행할 때보다 콘솔 출력이 훨씬 많다는 것을 알 수 있습니다. 파이프라인의 버전, 입력 및 출력, 그리고 몇 가지 설정 요소의 요약이 포함된 헤더가 있습니다. -!!! note "참고" +!!! info "정보" 출력에는 다른 타임스탬프, 실행 이름 및 파일 경로가 표시되지만 전체 구조와 프로세스 실행은 유사해야 합니다. 출력 상단 근처의 다음 줄을 확인하십시오: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` 이 줄은 어떤 리비전의 파이프라인이 사용되었는지 알려줍니다. @@ -379,7 +417,7 @@ Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 4 재현 가능한 실행을 위해서는 `-r` 플래그를 사용하여 특정 릴리스를 지정해야 합니다: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` 이렇게 하면 새로운 커밋이나 릴리스에 관계없이 항상 동일한 파이프라인 코드가 사용됩니다. @@ -388,14 +426,15 @@ nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results 실행 출력으로 이동하여 어떤 프로세스가 실행되었는지 알려주는 줄을 살펴보겠습니다: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -이것은 nf-core 웹사이트의 파이프라인 문서 페이지에 표시된 세 가지 도구에 해당하는 세 개의 프로세스가 실행되었음을 알려줍니다: FASTQC, SEQTK_TRIM 및 MULTIQC. +이것은 nf-core 웹사이트의 파이프라인 문서 페이지에 표시된 네 가지 도구에 해당하는 네 개의 프로세스가 실행되었음을 알려줍니다: `FASTQC`, `SEQTK_TRIM`, `MULTIQC`, `COWPY`. 여기에 표시된 `NFCORE_DEMO:DEMO:MULTIQC`와 같은 전체 프로세스 이름은 Hello Nextflow 입문 자료에서 본 것보다 깁니다. 여기에는 상위 워크플로우의 이름이 포함되어 있으며 파이프라인 코드의 모듈성을 반영합니다. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` 많아 보일 수 있습니다. -`nf-core/demo` 파이프라인의 출력에 대해 자세히 알아보려면 [문서 페이지](https://nf-co.re/demo/1.1.0/docs/output/)를 확인하십시오. +`nf-core/demo` 파이프라인의 출력에 대해 자세히 알아보려면 [문서 페이지](https://nf-co.re/demo/1.2.0/docs/output/)를 확인하십시오. 현 단계에서 중요한 것은 결과가 모듈별로 구성되어 있고, 파이프라인 실행에 대한 다양한 타임스탬프가 있는 보고서가 포함된 `pipeline_info`라는 디렉토리가 추가로 있다는 것입니다. @@ -443,7 +485,7 @@ tree -L 2 demo-results ![실행 타임라인 보고서](./img/execution_timeline.png) -!!! note "참고" +!!! info "정보" 여기서 작업이 병렬로 실행되지 않은 이유는 Github Codespaces의 최소 사양 머신에서 실행하고 있기 때문입니다. 병렬 실행을 보려면 codespace의 CPU 할당과 테스트 설정의 리소스 제한을 늘려보십시오. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,24 +596,98 @@ nextflow run nf-core/demo --help [Hello Config](../hello_nextflow/06_hello_config.md)에서 다룬 것처럼, 명령줄에서 `--param_name`으로 매개변수 값을 설정하거나, YAML 파일에 매개변수 집합을 모아 `-params-file`로 전달할 수 있습니다. 두 방법 모두 nf-core 파이프라인에서 동일하게 작동합니다. -예를 들어, 트리밍 단계를 건너뛰려면: +예를 들어, 트리밍 단계를 건너뛰려면 boolean 매개변수 `skip_trim`을 `true`로 설정해야 합니다. +작업 디렉토리에 해당 값이 이미 설정된 `my_params.yml` 파일이 제공되어 있습니다: + +```yaml title="my_params.yml" +skip_trim: true +``` + +`-params-file`로 전달합니다: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "명령 출력" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` `SEQTK_TRIM` 프로세스가 출력에 더 이상 나타나지 않습니다. -!!! info "정보" +!!! warning "매개변수 입력에 관한 중요한 제한 사항" + + **명령줄에서 boolean 매개변수 설정하기** + + Nextflow 버전 26.04부터 명령줄에서 제공되는 모든 값은 string으로 처리됩니다. + `skip_trim`과 같은 boolean 매개변수의 경우, 플래그 형태(`--skip_trim`)나 `--skip_trim true`로 전달하면 **string** `"true"`로 평가되어 스키마 검증에 실패합니다: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + boolean 매개변수를 실제 `true`/`false` 값으로 설정하려면 위에서 보여준 것처럼 `-params-file`을 사용하거나 설정 파일에서 설정하십시오. + string, integer, 파일 경로 매개변수는 영향을 받지 않으며 명령줄에서 직접 설정할 수 있습니다. + 이 과정에서는 boolean 매개변수에 대해 이 방식을 일관되게 사용합니다. + + **사용자 정의 설정 파일 사용하기** `-c`로 전달하는 사용자 정의 설정 파일에서 파이프라인 매개변수를 설정하는 것이 기술적으로는 가능하지만, Nextflow의 설정 우선순위 규칙에 따라 파이프라인 자체의 `nextflow.config`에 이미 설정된 기본값을 재정의하지 못할 수 있습니다. 명령줄에서 `--param_name`을 사용하거나 `-params-file`을 사용하는 것이 더 안정적입니다. 이 방법들은 항상 우선순위가 높습니다. @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` 파이프라인은 어떤 프로세스도 실행하기 전에 중단되어, 실패하거나 잘못된 실행을 방지합니다. -Boolean 매개변수는 값 없이 플래그로 전달하거나(`--skip_trim`), params 파일에서 `true`/`false`로 설정해야 합니다. +섹션 3.1.2에서 언급한 것처럼, boolean 매개변수는 명령줄에서 전달하는 값이 string으로 처리되므로 params 파일에서 실제 `true`/`false` 값으로 설정해야 합니다. #### 3.1.4. 입력 검증 @@ -637,7 +756,7 @@ Boolean 매개변수는 값 없이 플래그로 전달하거나(`--skip_trim`), `nf-core/demo` 파이프라인은 `sample`, `fastq_1`, `fastq_2` 열이 있는 CSV 파일을 기대합니다. 이는 예상 구조, 열 유형 및 제약 조건을 지정하는 스키마 파일(`assets/schema_input.json`)에 정의되어 있습니다. -??? abstract "assets/schema_input.json" +??? abstract "입력에 대한 스키마 파일" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Boolean 매개변수는 값 없이 플래그로 전달하거나(`--skip_trim`), 스키마는 `sample`과 `fastq_1`이 필수이고 `fastq_2`는 선택 사항임을 지정합니다(페어드 엔드 및 단일 엔드 데이터 모두 지원). 파일 경로는 존재 여부와 확장자 패턴이 검증됩니다. -##### 3.1.4.1. 잘못된 샘플시트 만들기 - -누락된 열과 존재하지 않는 파일 경로가 있는 샘플시트를 만드십시오: +이를 시연하기 위해 작업 디렉토리에 `malformed_samplesheet.csv`라는 잘못된 샘플시트가 제공되어 있습니다: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` 이 샘플시트는 필수 `fastq_1` 열이 없고 `fastq_2`에 존재하지 않는 파일 경로가 있습니다. -두 문제 모두 다음 단계에서 검증 오류를 발생시킵니다. - -##### 3.1.4.2. 잘못된 샘플시트로 데모 파이프라인 실행하기 -`malformed_samplesheet.csv`를 입력으로 사용하여 데모 파이프라인을 실행합니다. +`malformed_samplesheet.csv`를 입력으로 사용하여 데모 파이프라인을 실행합니다: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -725,14 +840,27 @@ nf-core 파이프라인은 `nextflow.config`와 `conf/` 디렉토리에 기본 무언가를 재정의하기 전에 기본값이 어디에 있는지 파악하는 것이 도움이 됩니다. 섹션 2.1에서 파이프라인 소스 코드가 `$NXF_HOME/assets`에 있다는 것을 이미 확인했습니다. -사용 가능한 설정 파일을 나열합니다: +섹션 1.2.4의 `pipelines` 심볼릭 링크를 사용하여 사용 가능한 설정 파일을 나열합니다: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ base.config igenomes.config igenomes_ignored.config modules.config test.conf 대신 자체 설정 파일을 만들어 `-c`로 전달하십시오. 지정한 값이 다른 파일에 설정된 기본값을 재정의합니다. -실제로 이를 수행하는 몇 가지 연습을 진행해보겠습니다. +실제로 이를 수행해보겠습니다. -#### 3.2.1. 프로세스의 리소스 할당 변경하기 +#### 3.2.1. 프로세스 리소스 및 도구 인자 맞춤화하기 -데모 파이프라인은 `base.config`에 정의된 레이블을 사용하여 리소스를 할당합니다. -예를 들어, `FASTQC`는 6개의 CPU와 36GB 메모리를 할당하는 `process_medium` 레이블을 사용합니다. +nf-core 모듈은 두 가지 일반적인 설정 재정의를 지원합니다: **리소스 할당** (CPU, 메모리, 시간)과 `ext.args`를 통한 **도구 인자**. -test 프로파일은 `resourceLimits`를 통해 리소스를 제한하지만, 특정 프로세스의 리소스를 재정의할 수도 있습니다. +많은 명령줄 도구에는 파이프라인 매개변수로 노출될 만큼 일반적으로 사용되지 않는 인자가 있습니다. +`ext.args` 규칙을 사용하면 설정 파일을 통해 기본 도구에 이러한 인자를 전달할 수 있습니다. -`custom.config` 파일을 만드십시오: +작업 디렉토리에 제공된 `custom.config` 파일은 두 가지 재정의를 모두 보여줍니다: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -사용자 정의 설정으로 파이프라인을 실행합니다: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "명령 출력" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -`-c` 플래그는 파이프라인의 내장 설정 위에 사용자 정의 설정을 추가합니다. - -#### 3.2.2. `ext.args`로 도구 인자 값 설정하기 - -많은 명령줄 도구에는 필수가 아닌 인자가 있어, 매우 일반적으로 사용되지 않는 한 파이프라인 매개변수로 설정되지 않습니다. -이러한 도구 인자의 경우, nf-core 모듈은 설정 파일을 통해 기본 도구에 인자를 전달하기 위해 `ext.args`라는 Nextflow 규칙을 사용합니다. - -예를 들어, `ext.args`를 사용하여 `SEQTK_TRIM` 모듈에 트리밍 인자를 추가해보겠습니다. - -##### 3.2.2.1. 사용자 정의 설정 업데이트하기 - -`custom.config`를 업데이트합니다: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -이렇게 하면 `seqtk trimfq`가 품질 트리밍 외에 각 리드의 시작 부분에서 5개의 염기를 추가로 트리밍합니다. +첫 번째 블록은 `FASTQC` 리소스 할당을 재정의합니다. +기본적으로 `FASTQC`는 `base.config`의 `process_medium` 레이블을 사용하여 6개의 CPU와 36GB 메모리를 할당합니다. 여기서는 2개의 CPU와 4GB로 제한합니다. -##### 3.2.2.2. 파이프라인 실행하기 +두 번째 블록은 `ext.args`를 통해 `SEQTK_TRIM`에 추가 인자를 전달합니다. +`-b 5` 플래그는 `seqtk trimfq`가 품질 트리밍 외에 각 리드의 시작 부분에서 5개의 염기를 추가로 트리밍하도록 합니다. -이 설정으로 파이프라인을 다시 실행하여 효과를 확인합니다: +이 설정으로 파이프라인을 실행합니다: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "명령 출력" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -인자가 적용되었는지 확인하려면, 실행 출력에서 `SEQTK_TRIM` work 디렉토리 해시(예: `work/ab/cd1234...`)를 찾아 내부의 `.command.sh` 파일을 확인하십시오: +`-c` 플래그는 파이프라인의 내장 설정 위에 사용자 정의 설정을 추가합니다. + +`ext.args` 재정의가 적용되었는지 확인하려면, 실행 출력에서 `SEQTK_TRIM` work 디렉토리 해시(예: `work/17/428668...`)를 찾아 내부의 `.command.sh` 파일을 확인하십시오: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "명령 출력" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` `seqtk trimfq` 명령에 `-b 5`가 포함되어 있어 `ext.args` 재정의가 적용되었음을 확인할 수 있습니다. -##### 3.2.2.3. 기본값 재정의하기 - -일부 모듈에는 기본적으로 `ext.args`가 이미 설정되어 있습니다. -예를 들어, `FASTQC` 모듈은 기본적으로 `ext.args = '--quiet'`로 설정되어 있습니다(`conf/modules.config`에 정의됨). +`ext.args`에 대해 알아야 할 중요한 사항이 있습니다: 모듈에 이미 기본값이 설정되어 있는 경우, 사용자가 지정한 값이 기존 값에 추가되는 것이 아니라 **완전히 대체**됩니다. +예를 들어, `FASTQC`는 `conf/modules.config`에 기본적으로 `ext.args = '--quiet'`로 설정되어 있습니다: ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -사용자 정의 설정 파일을 통해 `ext.args` 값을 제공하면, 해당 값이 해당 프로세스에 설정된 기본값을 완전히 대체합니다. - -예를 들어, 기본값이 `'--quiet'`이고 `ext.args = '--kmers 8'`로 설정하면 `--quiet` 플래그가 더 이상 적용되지 않습니다. +`FASTQC`에 `ext.args = '--kmers 8'`로 설정하면 `--quiet` 플래그가 더 이상 적용되지 않습니다. 두 가지를 모두 유지하려면 `ext.args = '--quiet --kmers 8'`로 설정하십시오. -따라서 `ext.args`로 인자 값을 제공하려는 도구의 기본 설정을 직접 확인할 책임이 있습니다. +따라서 `ext.args`로 인자 값을 제공하려는 모듈의 기본 설정을 항상 먼저 확인해야 합니다. ### 핵심 정리 @@ -878,4 +976,6 @@ nf-core 파이프라인에서 도움말을 얻는 방법, 매개변수를 설정 ### 다음 단계 -잠시 휴식을 취하십시오! 준비가 되었으면 파트 2로 이동하여 처음부터 nf-core 호환 파이프라인을 직접 만들어보겠습니다. +nf-core 파이프라인 실행만이 목표라면 여기서 마무리해도 됩니다! + +nf-core 표준에 따라 직접 파이프라인을 개발하고 싶다면, 잠시 휴식을 취한 후 파트 2로 이동하십시오. nf-core 템플릿 기반 도구를 사용하여 nf-core 호환 파이프라인을 직접 만드는 방법을 배워보겠습니다. diff --git a/docs/ko/docs/hello_nf-core/02_rewrite_hello.md b/docs/ko/docs/hello_nf-core/02_rewrite_hello.md index 2df5cf6fac..0cc12f00a9 100644 --- a/docs/ko/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/ko/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Hello 파이프라인에 익숙하지 않거나 복습이 필요하시면 [이 - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "참고" - - 터미널에서 `hello-nf-core` 디렉토리에 있는지 확인하세요. - --- ## 1. 파이프라인 코드 구조 살펴보기 @@ -30,6 +26,7 @@ nf-core 프로젝트는 파이프라인의 구조, 코드 구성, 설정, 문서 파이프라인 생성 작업을 시작하기 전에 해당 구조와 구성 방식을 이해해야 합니다. 1부에서 생성한 `pipelines` 심볼릭 링크를 사용하여 `nf-core/demo` 저장소에서 파이프라인 코드가 어떻게 구성되어 있는지 살펴보겠습니다. +터미널에서 `hello-nf-core` 디렉토리에 있는지 확인하세요. 파일 탐색기를 사용하거나 `tree` 명령으로 `nf-core/demo` 디렉토리를 찾아 열 수 있습니다. @@ -82,7 +79,7 @@ tree -L 1 pipelines/nf-core/demo `main.nf`의 이름 없는 workflow는 _진입점(entrypoint)_ 스크립트라고 합니다. 이는 두 종류의 내포된 workflow를 위한 래퍼 역할을 합니다: `workflows/demo.nf`에 위치한 실제 분석 로직을 포함하는 `DEMO` workflow와 `subworkflows/` 아래에 위치한 일련의 관리 workflow입니다. `demo.nf` workflow는 `modules/` 아래에 위치한 **모듈**을 호출하며, 이 모듈들에는 실제 분석 단계를 수행하는 **프로세스**가 포함되어 있습니다. -!!! note "참고" +!!! info "정보" Subworkflow는 관리 기능에만 국한되지 않으며, 프로세스 모듈을 활용할 수 있습니다. @@ -107,7 +104,7 @@ tree -L 1 pipelines/nf-core/demo `demo.nf` workflow는 `modules/` 아래에 위치한 **모듈**을 호출하며, 다음에 살펴보겠습니다. -!!! note "참고" +!!! info "정보" 일부 nf-core 분석 workflow는 하위 수준의 subworkflow를 호출하여 추가적인 내포 수준을 보여줍니다. 이는 주로 함께 자주 사용되는 두 개 이상의 모듈을 쉽게 재사용 가능한 파이프라인 세그먼트로 묶는 데 사용됩니다. @@ -266,13 +263,20 @@ TUI가 닫히면 다음과 같은 콘솔 출력이 표시됩니다. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -파이프라인 생성이 성공했다는 명시적인 확인은 콘솔 출력에 없지만, `core-hello`라는 새 디렉토리가 보일 것입니다. +TUI가 완료되면 도구가 파이프라인을 생성하고 컨테이너 설정을 생성했다고 보고합니다: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +이제 `core-hello`라는 새 디렉토리가 보일 것입니다. 새 디렉토리의 내용을 확인하여 템플릿을 사용함으로써 얼마나 많은 작업을 절약했는지 확인하세요. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "디렉토리 내용" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` 정말 많은 파일입니다! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +`WARN: Unrecognized config option 'validation.*'` 줄은 새로 생성된 템플릿에 고정된 nf-schema 플러그인 버전에서 발생합니다. +이는 무해하며 실행에 영향을 주지 않습니다. + 이는 모든 기본 배선이 제자리에 있음을 보여줍니다. 그렇다면 출력은 어디에 있을까요? 출력이 있기는 한가요? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -435,7 +446,7 @@ tree core-hello-results 이는 일부 nf-core 기능이 이미 갖춰진 분석 workflow의 플레이스홀더 역할을 합니다. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -454,14 +465,16 @@ workflow HELLO { take: ch_samplesheet // channel: --input에서 읽은 샘플시트 + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // 소프트웨어 버전 수집 및 저장 // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -478,19 +491,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -503,15 +513,15 @@ workflow HELLO { [Hello Nextflow](../hello_nextflow/index.md)에서 개발된 것과 같은 기본 Nextflow workflow와 비교하면, 여기에서 새로운 몇 가지 사항(위의 강조 표시된 줄)을 발견할 수 있습니다: - workflow 블록에 이름이 있습니다 -- workflow 입력은 `take:` 키워드를 사용하여 선언되고 채널 구성은 상위 workflow로 이동됩니다 +- workflow 입력은 `take:` 키워드를 사용하여 선언되고(여기서는 샘플시트 채널과 출력 디렉토리), 채널 구성은 상위 workflow로 이동됩니다 - workflow 내용은 `main:` 블록 내부에 배치됩니다 - 출력은 `emit:` 키워드를 사용하여 선언됩니다 이것들은 workflow를 **구성 가능(composable)**하게 만드는 Nextflow의 선택적 기능으로, 다른 workflow 내에서 호출될 수 있음을 의미합니다. -??? note "`Channel.topic` 블록" +??? note "`channel.topic` 블록" - 17번째 줄부터 시작하는 `def topic_versions = Channel.topic("versions")` 블록을 발견하셨을 것입니다. + 28번째 줄부터 시작하는 `def topic_versions = channel.topic("versions")` 블록을 발견하셨을 것입니다. 이는 모든 모듈에서 소프트웨어 버전 정보를 자동으로 수집하는 상용구 관리 코드입니다. nf-core는 2026년에 모든 파이프라인에 이 메커니즘을 도입할 예정이므로, 앞으로 모든 새 파이프라인에서 이를 볼 수 있습니다. 이 과정의 4부에서 작동 방식을 자세히 설명합니다. @@ -575,15 +585,15 @@ nextflow run original-hello/hello.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` 정상적으로 실행된다면 다음 단계로 넘어갈 준비가 된 것입니다. @@ -704,7 +714,7 @@ workflow { params.character = 'turkey' ``` -!!! note "참고" +!!! info "정보" Nextflow 언어 서버 확장이 설치되어 있다면 구문 검사기가 코드에 빨간 물결선을 표시할 것입니다. 이는 `take:` 문을 넣으면 `main:`도 있어야 하기 때문입니다. @@ -851,7 +861,7 @@ workflow { - 가져온 workflow를 호출하는 구문은 모듈을 호출하는 구문과 본질적으로 동일합니다. - 입력을 workflow로 가져오는 것과 관련된 모든 것(입력 매개변수 및 채널 구성)은 이제 이 상위 workflow에 선언됩니다. -!!! note "참고" +!!! info "정보" 진입점 workflow 파일의 이름을 `main.nf`로 지정하는 것은 규칙이지 요구 사항이 아닙니다. @@ -878,19 +888,19 @@ nextflow run ./original-hello ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -이는 HELLO workflow를 구성 가능하게 업그레이드하는 데 성공했음을 의미합니다. +이는 `HELLO` workflow를 구성 가능하게 업그레이드하는 데 성공했음을 의미합니다. ### 핵심 정리 @@ -932,14 +942,16 @@ workflow HELLO { take: ch_samplesheet // channel: --input에서 읽어온 samplesheet + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // 소프트웨어 버전 수집 및 저장 // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -956,19 +968,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -978,8 +987,8 @@ workflow HELLO { */ ``` -강조 표시된 줄은 구성 가능한 workflow 구조를 정의합니다: `workflow HELLO {`, `take:`, `main:`, `emit:`. -17~34번째 줄 사이의 큰 블록은 더 실질적인 내용으로, topic 채널을 사용하여 소프트웨어 버전을 캡처하는 메커니즘을 처리합니다. 이는 nf-core가 2026년에 모든 파이프라인에 도입할 예정인 기능입니다. +이것이 구성 가능한 workflow 구조입니다: `take:`, `main:`, `emit:`을 포함하는 이름 있는 `workflow HELLO {` 블록입니다. +`// Collate and save software versions` 아래의 블록은 더 실질적인 내용으로, topic 채널을 사용하여 소프트웨어 버전을 캡처하는 메커니즘을 처리합니다. 이는 nf-core가 2026년에 모든 파이프라인에 도입할 예정인 기능입니다. 4부에서 설명할 예정이므로, 지금은 그대로 두어도 되는 상용구 코드로 취급하세요. 섹션 2에서 개발한 원래 workflow의 구성 가능한 버전에서 관련 코드를 추가해야 합니다. @@ -991,7 +1000,7 @@ workflow HELLO { 3. workflow 로직을 `main` 블록에 추가 4. `emit` 블록 업데이트 -!!! note "참고" +!!! info "정보" 이번 첫 번째 패스에서는 버전 캡처 블록을 무시하겠습니다. 4부에서 작동 방식을 설명합니다. @@ -1079,9 +1088,10 @@ include { cowpy } from './modules/cowpy.nf' nf-core 프로젝트에는 일반적으로 열 데이터를 포함하는 CSV 파일인 samplesheet 개념과 관련된 많은 사전 구축 기능이 있습니다. 본질적으로 우리의 `greetings.csv` 파일이 그러하므로 현재 `take` 선언을 그대로 유지하고 다음 단계에서 입력 채널의 이름만 업데이트하겠습니다. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // channel: --input에서 읽어온 samplesheet + outdir ``` 입력 처리는 이 workflow의 상위에서 수행됩니다(이 코드 파일에서가 아님). @@ -1111,20 +1121,21 @@ nf-core 프로젝트에는 일반적으로 열 데이터를 포함하는 CSV 파 `main:` 뒤에 오는 코드를 workflow의 새 버전에 복사해야 합니다. workflow를 실행하는 도구의 버전을 캡처하는 것과 관련된 일부 코드가 이미 있습니다. 지금은 그대로 두겠습니다(도구 버전은 나중에 처리하겠습니다). -맨 위에 `ch_versions = channel.empty()` 초기화를 유지한 다음 workflow 로직을 삽입하고 버전 수집 코드를 끝에 유지하겠습니다. +맨 위에 `def ch_versions = channel.empty()` 초기화를 유지한 다음 workflow 로직을 삽입하고 버전 수집 코드를 끝에 유지하겠습니다. 이러한 순서는 실제 파이프라인에서 프로세스가 workflow가 실행될 때 `ch_versions` 채널에 추가될 버전 정보를 방출하기 때문에 의미가 있습니다. === "후" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // channel: --input에서 읽어온 samplesheet + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // 인사말 출력 sayHello(greeting_ch) @@ -1141,7 +1152,7 @@ workflow를 실행하는 도구의 버전을 캡처하는 것과 관련된 일 // // 소프트웨어 버전 수집 및 저장 // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1158,37 +1169,36 @@ workflow를 실행하는 도구의 버전을 캡처하는 것과 관련된 일 "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` === "전" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // channel: --input에서 읽어온 samplesheet + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // 소프트웨어 버전 수집 및 저장 // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1205,36 +1215,31 @@ workflow를 실행하는 도구의 버전을 캡처하는 것과 관련된 일 "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` -`main:` 앞에 빈 줄을 추가하여 코드를 더 읽기 쉽게 만들었습니다. - 좋아 보이지만 `take:` 키워드 아래에 작성된 것과 일치하도록 아래와 같이 `sayHello()` 프로세스에 전달하는 채널의 이름을 `greeting_ch`에서 `ch_samplesheet`로 업데이트해야 합니다. === "후" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // 인사말 출력 (nf-core samplesheet 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) ``` === "전" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // 인사말 출력 sayHello(greeting_ch) ``` @@ -1247,7 +1252,7 @@ workflow를 실행하는 도구의 버전을 캡처하는 것과 관련된 일 === "후" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // channel: [ path(versions.yml) ] @@ -1255,12 +1260,12 @@ workflow를 실행하는 도구의 버전을 캡처하는 것과 관련된 일 === "전" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // channel: [ path(versions.yml) ] ``` -이것으로 HELLO workflow 자체에 대한 수정이 완료됩니다. +이것으로 `HELLO` workflow 자체에 대한 수정이 완료됩니다. 이 시점에서 우리는 구현하기로 설정한 전반적인 코드 구조를 달성했습니다. ### 핵심 정리 @@ -1324,7 +1329,8 @@ workflow CORE_HELLO { // WORKFLOW: 파이프라인 실행 // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1361,7 +1367,6 @@ workflow { // SUBWORKFLOW: 완료 작업 실행 // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1377,7 +1382,7 @@ nf-core 프로젝트는 내포된 subworkflow를 많이 사용하므로 이 부 여기서 중요한 것은 두 개의 workflow가 정의되어 있다는 것입니다: -- `CORE_HELLO`는 `core-hello/workflows/hello.nf`에서 방금 조정을 완료한 HELLO workflow를 실행하기 위한 얇은 래퍼입니다. +- `CORE_HELLO`는 `core-hello/workflows/hello.nf`에서 방금 조정을 완료한 `HELLO` workflow를 실행하기 위한 얇은 래퍼입니다. - `CORE_HELLO`와 `PIPELINE_INITIALISATION`, `PIPELINE_COMPLETION`이라는 두 개의 다른 subworkflow를 호출하는 이름 없는 workflow입니다. 그들이 서로 어떻게 관련되어 있는지 보여주는 다이어그램이 있습니다: @@ -1422,9 +1427,9 @@ nf-core 프로젝트는 내포된 subworkflow를 많이 사용하므로 이 부 versions = ch_versions ``` -이것은 samplesheet를 파싱하고 HELLO workflow에서 소비할 준비가 된 형태로 전달하는 channel factory입니다. +이것은 samplesheet를 파싱하고 `HELLO` workflow에서 소비할 준비가 된 형태로 전달하는 channel factory입니다. -!!! note "참고" +!!! info "정보" 위의 구문은 이전에 사용한 것과 약간 다르지만 기본적으로 다음은: @@ -1533,7 +1538,7 @@ cp greetings.csv core-hello/assets/. === "후" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1595,13 +1600,53 @@ cp greetings.csv core-hello/assets/. 이것으로 필요한 코드 수정이 완료되었습니다. -### 5.4. 테스트 프로필로 파이프라인 실행 +### 5.4. 매개변수 검증 비활성화 + +템플릿의 samplesheet 파싱을 자체적인 간단한 채널 구성으로 교체했지만, 템플릿에는 여전히 fastq 기반 samplesheet를 설명하는 `nextflow_schema.json`과 `assets/schema_input.json`이 포함되어 있습니다. +해당 스키마를 아직 `greetings.csv` 형식에 맞게 조정하지 않았으므로, 지금은 매개변수 검증을 비활성화해야 합니다(나중에 제대로 설정할 것입니다). + +`core-hello/nextflow.config`를 열고 `validate_params`를 `false`로 설정합니다: + +=== "후" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "전" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +명령줄 대신 설정 파일에서 이를 설정하는 이유는 Nextflow 버전 26.04부터 명령줄에서 제공되는 모든 값이 문자열로 처리되기 때문입니다. +따라서 Boolean 매개변수는 실제 `true`/`false` 값을 갖기 위해 설정 파일이나 `-params-file`에서 설정해야 합니다. + +예를 들어, 여기서 `--validate_params false`를 사용하면 **문자열** `"false"`로 평가되어 검증이 계속 활성화된 상태로 유지됩니다. + +!!! tip "`nextflow.config`의 v2 분석기 호환성 줄" + + v2 구문에 대해 말하자면, 설정 파일의 `params` 블록 바로 아래에 다음 두 줄이 있을 수 있습니다: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + 이는 v2 구문 분석기와의 호환성을 위해 필요합니다. + + - v2 구문에서는 `params.*` 변수를 프로세스 모듈의 `publishDir` 지시문 내에서 직접 참조할 수 없으므로, `outputDir`이 해당 지시문이 접근할 수 있는 최상위 설정 변수로 여기에 정의됩니다. + + - `workflow.output.mode`는 v2 workflow 출력 블록의 기본 게시 모드를 설정합니다. + + 두 줄 모두 nf-core 파이프라인 템플릿에 의해 자동으로 생성되며 수정할 필요가 없습니다. + +### 5.5. 테스트 프로필로 파이프라인 실행 많은 작업이었지만 이제 마침내 파이프라인을 실행해 볼 수 있습니다! -아직 검증을 설정하지 않았기 때문에 명령줄에 `--validate_params false`를 추가해야 합니다(이는 나중에 다룰 것입니다). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` 모든 수정을 올바르게 수행했다면 완료될 때까지 실행되어야 합니다. @@ -1609,9 +1654,9 @@ nextflow run core-hello --outdir core-hello-results -profile test,docker --valid ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1623,10 +1668,10 @@ nextflow run core-hello --outdir core-hello-results -profile test,docker --valid Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1637,17 +1682,17 @@ nextflow run core-hello --outdir core-hello-results -profile test,docker --valid !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -보시다시피, 초기화 subworkflow 덕분에 시작 부분에 일반적인 nf-core 요약이 생성되었으며, 각 모듈에 대한 줄은 이제 PIPELINE:WORKFLOW:module 전체 이름을 보여줍니다. +보시다시피, 초기화 subworkflow 덕분에 시작 부분에 일반적인 nf-core 요약이 생성되었으며, 각 모듈에 대한 줄은 이제 `PIPELINE:WORKFLOW:module` 전체 이름을 보여줍니다. -### 5.5. 파이프라인 출력 찾기 +### 5.6. 파이프라인 출력 찾기 이제 질문은: 파이프라인의 출력은 어디에 있을까요? 그리고 답은 꽤 흥미롭습니다: 결과를 찾을 수 있는 두 개의 서로 다른 장소가 있습니다. @@ -1663,17 +1708,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1683,7 +1728,7 @@ tree core-hello-results ![Hello 파이프라인의 실행 타임라인 보고서](./img/execution_timeline_hello.png) -!!! note "참고" +!!! info "정보" Github Codespaces에서 최소한의 머신으로 실행하고 있기 때문에 작업이 다시 병렬로 실행되지 않았습니다. 작업이 병렬로 실행되는 것을 보려면 codespace의 CPU 할당량과 테스트 설정의 리소스 제한을 늘려보세요. diff --git a/docs/ko/docs/hello_nf-core/03_use_module.md b/docs/ko/docs/hello_nf-core/03_use_module.md index bc9252bd4b..c8be4a1204 100644 --- a/docs/ko/docs/hello_nf-core/03_use_module.md +++ b/docs/ko/docs/hello_nf-core/03_use_module.md @@ -25,14 +25,14 @@ nf-core로 작업할 때 얻을 수 있는 큰 이점 중 하나는 [nf-core/mod 다음 명령을 실행하여 성공적으로 실행되는지 테스트할 수 있습니다: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- ## 1. 적합한 nf-core 모듈 찾기 및 설치하기 -먼저, 기존 nf-core 모듈을 찾고 파이프라인에 설치하는 방법을 배워봅시다. +먼저, 기존 nf-core 모듈을 찾고 파이프라인에 설치하는 방법을 살펴봅니다. 여러 인사말 파일을 하나로 연결하기 위해 Unix `cat` 명령을 사용하는 `collectGreetings` 프로세스를 교체하는 것을 목표로 합니다. 파일 연결은 매우 일반적인 작업이므로, 이미 nf-core에 그 목적을 위해 설계된 모듈이 있을 것이라고 추론할 수 있습니다. @@ -50,7 +50,7 @@ nf-core 프로젝트는 [https://nf-co.re/modules](https://nf-co.re/modules)에 보시다시피, 많은 결과가 있으며, 그중 많은 것들이 매우 특정한 유형의 파일을 연결하도록 설계된 모듈입니다. 그중에서 범용인 `find_concatenate`라는 모듈을 볼 수 있을 것입니다. -!!! note "모듈 명명 규칙" +!!! info "모듈 명명 규칙" 밑줄(`_`)은 모듈 이름에서 슬래시(`/`) 문자의 대체로 사용됩니다. @@ -120,9 +120,11 @@ nf-core modules info find/concatenate | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ nf-core modules info find/concatenate 이것은 웹사이트에서 찾을 수 있는 것과 정확히 동일한 정보입니다. +`INFO Reinstalling modules found in 'modules.json' but missing from directory` 메시지는 무시해도 됩니다. 이 메시지는 nf-core/tools 4.0.2에서 실제로 설치 여부와 관계없이 `info`로 조회하는 모든 모듈에 대해 출력되며, `info` 명령은 파일을 생성하지 않으므로 아무런 영향이 없습니다. + ### 1.4. find/concatenate 모듈 설치하기 이제 원하는 모듈을 찾았으므로, 파이프라인의 소스 코드에 추가해야 합니다. @@ -193,15 +197,13 @@ nf-core modules info find/concatenate 좋은 소식은 nf-core 프로젝트에 이 부분을 쉽게 만드는 도구가 포함되어 있다는 것입니다. 특히, `nf-core modules install` 명령을 사용하면 코드를 검색하고 한 단계로 프로젝트에서 사용할 수 있도록 자동화할 수 있습니다. -파이프라인 디렉토리로 이동하여 설치 명령을 실행하세요: +현재 작업 디렉토리가 `core-hello` 파이프라인 프로젝트의 루트인지 확인한 후 설치 명령을 실행하세요: ```bash cd core-hello nf-core modules install find/concatenate ``` -도구가 모듈 설치를 진행합니다. - ??? success "명령 출력" ```console @@ -212,26 +214,20 @@ nf-core modules install find/concatenate | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -명령은 자동으로: - -- 모듈 파일을 `modules/nf-core/find/concatenate/`에 다운로드합니다 -- 설치된 모듈을 추적하기 위해 `modules.json`을 업데이트합니다 -- 워크플로우에서 사용할 올바른 `include` 문을 제공합니다 - -!!! tip "팁" - - 모듈 설치 명령을 실행하기 전에 현재 작업 디렉토리가 파이프라인 프로젝트의 루트인지 항상 확인하세요. +명령은 모듈 파일을 `modules/nf-core/find/concatenate/`에 다운로드하고, 설치된 모듈을 추적하기 위해 `modules.json`을 업데이트합니다. +마지막에 나타나는 `NotADirectoryError`는 무시해도 됩니다. 이 오류는 nf-core/tools 4.0.2가 모든 로컬 모듈이 각자의 디렉토리(`modules/local//main.nf`)에 있을 것으로 예상하는 반면, `core-hello`는 이 단계에서 아직 단일 파일 형태의 로컬 모듈을 사용하기 때문에 발생합니다. +`find/concatenate` 모듈은 올바르게 설치되었으며, `modules.json`도 정상적으로 업데이트됩니다. +파트 4에서 `cowpy`를 디렉토리 구조로 변환하겠습니다. -모듈이 올바르게 설치되었는지 확인합니다: +모듈 파일이 올바르게 설치되었는지 확인합니다: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -또한 nf-core 유틸리티에 로컬에 설치된 모듈을 나열하도록 요청하여 설치를 확인할 수 있습니다: +`modules.json`을 확인하여 설치를 검증할 수도 있습니다. 이 파일에는 이제 nf-core/modules 저장소 아래에 `find/concatenate`가 등록되어 있습니다. + +??? abstract "파일 내용" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +이것은 `find/concatenate` 모듈이 이제 프로젝트의 소스 코드의 일부임을 확인합니다. +그러나 새 모듈을 실제로 사용하려면 파이프라인으로 가져와야 합니다. + +마지막으로, `nf-core modules list local` 명령을 사용하여 파이프라인에서 현재 추적 중인 모듈을 확인할 수도 있습니다. ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "명령 출력" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -이것은 `find/concatenate` 모듈이 이제 프로젝트의 소스 코드의 일부임을 확인합니다. - -그러나 새 모듈을 실제로 사용하려면 파이프라인으로 가져와야 합니다. +결과 테이블에 `find/concatenate`가 저장소, 버전 SHA, 메시지, 날짜와 함께 표시됩니다. ### 1.5. 모듈 임포트 업데이트하기 @@ -298,11 +350,11 @@ include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' nf-core 규칙은 모듈을 가져올 때 모듈 이름에 대문자를 사용하는 것입니다. -[core-hello/workflows/hello.nf](core-hello/workflows/hello.nf)를 열고 다음과 같이 교체하세요: +`core-hello/workflows/hello.nf`를 열고 다음과 같이 교체하세요: === "후" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ nf-core 규칙은 모듈을 가져올 때 모듈 이름에 대문자를 사용 include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "전" @@ -345,7 +397,7 @@ nf-core 모듈의 경로가 로컬 모듈과 어떻게 다른지 주목하세요 이것을 별도의 섹션으로 다룰 것입니다. 아직 다루지 않은 새로운 메커니즘, 즉 메타데이터 맵이 포함되기 때문입니다. -!!! note "참고" +!!! info "정보" 선택적으로 `collectGreetings.nf` 파일을 삭제할 수 있습니다: @@ -373,7 +425,7 @@ nf-core 모듈을 찾고 프로젝트에서 사용할 수 있도록 만드는 이상적으로는 모듈을 설치하기 전에 이 작업을 수행해야 하지만, 늦더라도 안 하는 것보다는 낫습니다. (참고로 더 이상 원하지 않는 모듈을 제거하는 `uninstall` 명령이 있습니다.) -!!! note "참고" +!!! info "정보" FIND_CONCATENATE 프로세스에는 우리가 여기서 보여드리려는 것과 엄격하게 관련이 없는 다양한 압축 유형, 파일 확장자 등에 대한 상당히 영리한 처리가 포함되어 있으므로, 대부분을 무시하고 중요한 부분에만 집중하겠습니다. @@ -512,7 +564,7 @@ ch_input = [[[id: 'batch1', date: '25.10.01'], 'batch1.txt'], 이것이 얼마나 유용할 수 있는지 이해하기 시작했기를 바랍니다. 메타데이터를 기반으로 출력 이름을 지정할 수 있을 뿐만 아니라, 다른 매개변수 값을 적용하는 것과 같은 작업을 수행할 수 있으며, 특정 연산자와 함께 사용하면 파이프라인을 통과하는 데이터를 그룹화, 정렬 또는 필터링할 수도 있습니다. -!!! note "메타데이터에 대해 자세히 알아보기" +!!! info "메타데이터에 대해 자세히 알아보기" 샘플시트에서 메타데이터를 읽고 처리를 사용자 정의하는 데 사용하는 방법을 포함하여 Nextflow 워크플로우에서 메타데이터를 사용하는 방법에 대한 포괄적인 소개는 [워크플로우의 메타데이터](../side_quests/metadata/index.md) 사이드 퀘스트를 참조하세요. @@ -543,7 +595,7 @@ ch_input = [[[id: 'batch1', date: '25.10.01'], 'batch1.txt'], 명확성을 위해, 이것을 분류하고 각 단계를 개별적으로 다루겠습니다. -!!! note "참고" +!!! info "정보" 아래에 표시된 모든 변경 사항은 `core-hello/workflows/hello.nf` 워크플로우 파일의 `main` 블록에 있는 워크플로우 로직에 적용됩니다. @@ -570,8 +622,8 @@ def cat_meta = [id: params.batch] === "후" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // 인사말 방출 + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // 인사말 방출 (샘플시트에 nf-core 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) // 인사말을 대문자로 변환 @@ -586,8 +638,8 @@ def cat_meta = [id: params.batch] === "전" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // 인사말 방출 + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // 인사말 방출 (샘플시트에 nf-core 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) // 인사말을 대문자로 변환 @@ -608,8 +660,8 @@ def cat_meta = [id: params.batch] === "후" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // 인사말 방출 + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // 인사말 방출 (샘플시트에 nf-core 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) // 인사말을 대문자로 변환 @@ -627,8 +679,8 @@ def cat_meta = [id: params.batch] === "전" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // 인사말 방출 + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // 인사말 방출 (샘플시트에 nf-core 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) // 인사말을 대문자로 변환 @@ -654,8 +706,8 @@ def cat_meta = [id: params.batch] === "후" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // 인사말 방출 + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // 인사말 방출 (샘플시트에 nf-core 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) // 인사말을 대문자로 변환 @@ -676,8 +728,8 @@ def cat_meta = [id: params.batch] === "전" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // 인사말 방출 + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // 인사말 방출 (샘플시트에 nf-core 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) // 인사말을 대문자로 변환 @@ -704,8 +756,8 @@ def cat_meta = [id: params.batch] === "후" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // 인사말 방출 + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // 인사말 방출 (샘플시트에 nf-core 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) // 인사말을 대문자로 변환 @@ -729,8 +781,8 @@ def cat_meta = [id: params.batch] === "전" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // 인사말 방출 + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // 인사말 방출 (샘플시트에 nf-core 규칙을 사용하도록 업데이트됨) sayHello(ch_samplesheet) // 인사말을 대문자로 변환 @@ -753,7 +805,7 @@ def cat_meta = [id: params.batch] 그런 다음 마지막 줄에서 `collectGreetings.out.outfile` 대신 `ch_for_cowpy`를 `cowpy`에 전달하기만 하면 됩니다. -!!! note "참고" +!!! info "정보" 과정의 다음 파트에서 `cowpy`를 메타데이터 튜플과 직접 작동하도록 업데이트하므로 이 추출 단계는 더 이상 필요하지 않습니다. @@ -762,7 +814,7 @@ def cat_meta = [id: params.batch] 새로 통합된 `find/concatenate` 모듈로 워크플로우가 작동하는지 테스트합니다: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` 이것은 상당히 빠르게 실행되어야 합니다. @@ -770,40 +822,40 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` `collectGreetings` 대신 `FIND_CONCATENATE`가 프로세스 실행 목록에 나타나는 것을 주목하세요. diff --git a/docs/ko/docs/hello_nf-core/04_make_module.md b/docs/ko/docs/hello_nf-core/04_make_module.md index 716d0abf74..9a97786047 100644 --- a/docs/ko/docs/hello_nf-core/04_make_module.md +++ b/docs/ko/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ nf-core 프로젝트는 Part 2에서 워크플로우에 사용했던 것과 유 다음 명령을 실행하여 성공적으로 실행되는지 테스트할 수 있습니다: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ process cowpy { === "후" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // cowpy로 ASCII 아트 생성 (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "전" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // cowpy로 ASCII 아트 생성 (https://github.com/jeffbuttars/cowpy) process cowpy { ``` 이 경우 대문자화는 완전히 직관적입니다. -프로세스 이름이 여러 단어로 구성된 경우, 예를 들어 원래 camel case로 MyCowpyTool이라는 프로세스가 있었다면, nf-core 규칙은 밑줄을 사용하여 분리하여 MY_COWPY_TOOL이 됩니다. +프로세스 이름이 여러 단어로 구성된 경우, 예를 들어 원래 camel case로 `MyCowpyTool`이라는 프로세스가 있었다면, nf-core 규칙은 밑줄을 사용하여 분리하여 `MY_COWPY_TOOL`이 됩니다. #### 1.1.2. 모듈 import 문 업데이트 @@ -164,7 +164,7 @@ import 문에서 별칭을 사용하여 프로세스 실행을 업데이트하 // // 소프트웨어 버전 수집 및 저장 // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ import 문에서 별칭을 사용하여 프로세스 실행을 업데이트하 // // 소프트웨어 버전 수집 및 저장 // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ import 문에서 별칭을 사용하여 프로세스 실행을 업데이트하 이러한 변경 후 모든 것이 올바르게 작동하는지 테스트하기 위해 워크플로우를 실행합니다. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param === "후" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param === "전" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param 이러한 변경 후 모든 것이 올바르게 작동하는지 테스트하기 위해 워크플로우를 실행합니다. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -532,7 +532,7 @@ Nextflow는 런타임에 해당 인수와 값을 도구 명령줄에 추가합 결과적으로 모듈 인터페이스가 더 간단해졌습니다: 필수 메타데이터와 파일 입력만 예상합니다. -!!! note "참고" +!!! info "정보" `?:` 연산자는 옆으로 누운 Elvis Presley의 얼굴처럼 보이기 때문에 'Elvis 연산자'라고 불리며, `?` 문자가 그의 머리카락의 웨이브를 상징합니다. @@ -622,15 +622,15 @@ withName: 'COWPY' { 더 수수께끼 같은 옵션 중 하나인 `kosh`를 사용하여 이 명령을 실행하십시오: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -657,10 +657,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -676,16 +676,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "명령 출력" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -730,7 +730,7 @@ cat work/38/eb29ea*/cowpy-test.txt - **이식성**: 하드코딩된 도구 옵션 없이 모듈을 재사용할 수 있습니다 - **워크플로우 변경 없음**: 도구 옵션을 추가하거나 변경해도 워크플로우 코드를 업데이트할 필요가 없습니다 -!!! note "참고" +!!! info "정보" `ext.args` 시스템은 메타데이터에 따라 인수 값을 동적으로 전환하는 것을 포함하여 여기서 다루지 않은 강력한 추가 기능이 있습니다. 자세한 내용은 [nf-core 모듈 사양](https://nf-co.re/docs/guidelines/components/modules)을 참조하십시오. @@ -840,15 +840,15 @@ ext.prefix = { "cowpy-${meta.id}" } 워크플로우가 여전히 예상대로 작동하는지 테스트합니다. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -875,10 +875,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -976,15 +976,15 @@ nf-core 파이프라인은 개별 모듈에서 `publishDir`을 설정하는 대 이제 파이프라인을 실행하면 어떤 일이 일어나는지 살펴봅시다. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1011,10 +1011,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1055,7 +1055,7 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param Nextflow가 워크플로우와 모듈 이름을 기반으로 이 디렉토리 계층 구조를 생성했습니다. -!!! note "참고" +!!! info "정보" `pipeline_info/`에 `hello_software_versions.yml`이 있는 것을 확인할 수 있습니다. 현재는 `FIND_CONCATENATE`의 버전 정보만 포함되어 있는데, `COWPY`가 아직 버전을 보고하지 않기 때문입니다. @@ -1096,9 +1096,9 @@ process { 기본 `publishDir` 지시문을 재정의하려면 `conf/modules.config` 파일에 자체 지시문을 추가하면 됩니다. -예를 들어, 아래 예제처럼 `withName:` 선택기를 사용하여 단일 프로세스의 기본값을 재정의할 수 있습니다. 여기서는 'COWPY' 프로세스에 대한 사용자 지정 `publishDir` 지시문을 추가합니다. +예를 들어, 아래 예제처럼 `withName:` 선택기를 사용하여 단일 프로세스의 기본값을 재정의할 수 있습니다. 여기서는 `COWPY` 프로세스에 대한 사용자 지정 `publishDir` 지시문을 추가합니다. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1160,23 +1160,23 @@ script 블록은 변경할 필요가 없습니다 — 버전은 출력 블록에 #### 1.6.2. 파이프라인을 실행하고 버전 보고서 확인 ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1189,11 +1189,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -워크플로우 측 수집 — Part 2의 플레이스홀더 워크플로우에서 보았던 `Channel.topic("versions")` 블록 — 이 topic을 구독하고 이 통합 보고서를 자동으로 작성합니다. +워크플로우 측 수집 — Part 2의 플레이스홀더 워크플로우에서 보았던 `channel.topic("versions")` 블록 — 이 topic을 구독하고 이 통합 보고서를 자동으로 작성합니다. -!!! note "하위 호환성" +!!! info "하위 호환성" 워크플로우의 topic 채널 블록에 있는 `versions_file` 브랜치는 아직 `topic: versions`를 사용하도록 업데이트되지 않고 `emit: versions`와 함께 script 블록에서 `versions.yml` 파일을 작성하는 모듈을 처리하기 위해 존재합니다. 전환 기간 동안 두 스타일이 동시에 지원됩니다. @@ -1283,16 +1286,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // 패턴 1: 메타데이터 튜플 ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1361,20 +1364,20 @@ nf-core 가이드라인에 따르면 모듈의 일부로 컨테이너와 Conda === "전" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Conda 환경 -Conda 환경의 경우, 모듈 코드는 `conda "${moduleDir}/environment.yml"`을 지정하며, 이는 `environment.yml` 파일에서 설정해야 함을 의미합니다. +Conda 환경의 경우, 모듈 코드는 `#!groovy conda "${moduleDir}/environment.yml"`을 지정하며, 이는 `environment.yml` 파일에서 설정해야 함을 의미합니다. 모듈 생성 도구는 Bioconda(생물정보학 도구를 위한 주요 채널)에서 `cowpy` 패키지를 찾을 수 없다고 경고했습니다. 그러나 `cowpy`는 conda-forge에서 사용할 수 있으므로 다음과 같이 `environment.yml`을 완성할 수 있습니다: @@ -1426,7 +1429,7 @@ nf-core에 제출하려면 기본값을 더 엄격하게 따라야 하지만, === "후" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1437,13 +1440,13 @@ nf-core에 제출하려면 기본값을 더 엄격하게 따라야 하지만, === "전" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` 이것은 다음을 지정합니다: @@ -1451,6 +1454,7 @@ nf-core에 제출하려면 기본값을 더 엄격하게 따라야 하지만, - 입력 파일 매개변수 이름(`input` 대신 `input_file`) - 설정 가능한 접두사 패턴을 사용한 출력 파일 이름(와일드카드 `*` 대신 `#!groovy ${prefix}.txt`) - 설명적인 emit 이름(일반적인 `output` 대신 `cowpy_output`) +- 템플릿의 `#!groovy eval("cowpy --version")` 대신 정적 버전 문자열(`#!groovy val("1.1.5")`). 섹션 1.6의 수동 모듈과 일치하며(`cowpy` 도구는 `--version` 플래그를 제공하지 않음) Nextflow 언어 서버를 사용하여 구문을 검증하는 경우, script 블록에 아직 추가하지 않았기 때문에 이 단계에서 `#!groovy ${prefix}` 부분이 오류로 표시될 수 있습니다. 이제 그 부분을 살펴보겠습니다. @@ -1515,7 +1519,7 @@ Nextflow 컨텍스트에서 [stub](https://www.nextflow.io/docs/latest/process.h === "전" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1574,15 +1578,15 @@ Nextflow 컨텍스트에서 [stub](https://www.nextflow.io/docs/latest/process.h 테스트하기 위해 파이프라인을 실행합니다. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "명령 출력" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1609,10 +1613,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/ko/docs/hello_nf-core/05_input_validation.md b/docs/ko/docs/hello_nf-core/05_input_validation.md index 737ef472ec..727fdc9895 100644 --- a/docs/ko/docs/hello_nf-core/05_input_validation.md +++ b/docs/ko/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ Hello nf-core 교육 과정의 다섯 번째 파트에서는 nf-schema 플러그 다음 명령을 실행하여 성공적으로 실행되는지 테스트할 수 있습니다: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema는 더 이상 사용되지 않는 nf-validation 플러그인의 후속 ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ graph LR 파이프라인에 매개변수 검증을 추가하는 것부터 시작합니다. 이는 `--input`, `--outdir`, `--batch`와 같은 명령줄 플래그를 검증합니다. -### 1.1. 입력 파일 검증을 건너뛰도록 검증 구성 +### 1.1. 검증 활성화 및 입력 파일 검증 건너뛰기 nf-core 파이프라인 템플릿은 이미 nf-schema가 설치되고 구성되어 제공됩니다: - nf-schema 플러그인은 `nextflow.config`의 `plugins{}` 블록을 통해 설치됩니다 -- 매개변수 검증은 `params.validate_params = true`를 통해 기본적으로 활성화됩니다 +- 매개변수 검증은 `params.validate_params`로 제어됩니다 - 검증은 파이프라인 초기화 중에 `UTILS_NFSCHEMA_PLUGIN` 서브워크플로우에 의해 수행됩니다 -검증 동작은 `nextflow.config`의 `validation{}` 범위를 통해 제어됩니다. +파트 3과 4에서는 스키마를 구성하기 전에 파이프라인을 실행할 수 있도록 `validate_params = false`로 설정했습니다. +이제 검증을 추가할 준비가 되었으므로, 첫 번째 단계는 이를 활성화하는 것입니다. + +`nextflow.config`를 열고 `validate_params` 매개변수를 찾으십시오(37줄 근처). 값을 `true`로 설정하십시오: + +=== "후" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "전" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +검증 동작 자체는 `nextflow.config`의 `validation{}` 범위를 통해 제어됩니다. 매개변수 검증을 먼저 작업할 것이고(이 섹션) 섹션 2까지 입력 데이터 스키마를 구성하지 않을 것이므로, 일시적으로 nf-schema에게 `input` 매개변수의 파일 내용 검증을 건너뛰도록 지시해야 합니다. -`nextflow.config`를 열고 `validation` 블록을 찾으십시오(247줄 근처). 입력 파일 검증을 건너뛰기 위해 `ignoreParams`를 추가하십시오: +`validation` 블록을 찾으십시오(252줄 근처). 입력 파일 검증을 건너뛰기 위해 `ignoreParams`를 추가하십시오: === "후" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ nf-core 파이프라인 템플릿은 이미 nf-schema가 설치되고 구성되 === "전" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ nf-core 파이프라인 템플릿은 이미 nf-schema가 설치되고 구성되 - **`ignoreParams`**: `input` 매개변수의 파일 내용 검증 건너뛰기 (일시적; 섹션 2에서 다시 활성화할 것임) - **`monochromeLogs`**: `true`로 설정되면 검증 메시지의 색상 출력 비활성화 (`params.monochrome_logs`로 제어됨) -!!! note "input 매개변수를 무시하는 이유는 무엇입니까?" +!!! info "input 매개변수를 무시하는 이유는 무엇입니까?" `nextflow_schema.json`의 `input` 매개변수는 `"schema": "assets/schema_input.json"`을 가지고 있어 nf-schema에게 해당 스키마에 대해 입력 CSV 파일의 *내용*을 검증하도록 지시합니다. 아직 해당 스키마를 구성하지 않았으므로 일시적으로 이 검증을 무시합니다. @@ -263,7 +280,7 @@ nf-core pipelines schema build | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -`batch` 매개변수가 스키마에 추가되었고 "required" 필드가 이제 `["input", "outdir", "batch"]`를 표시하는 것을 확인할 수 있습니다. +`batch` 매개변수가 스키마에 추가되었고 `required` 필드가 이제 `["input", "outdir", "batch"]`를 표시하는 것을 확인할 수 있습니다. ### 1.5. 매개변수 검증 테스트 @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipelin === "후" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipelin === "전" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipelin #### 2.7.1. 유효한 입력으로 테스트 먼저 유효한 입력으로 파이프라인이 성공적으로 실행되는지 확인하십시오. -검증이 작동하므로 더 이상 `--validate_params false`가 필요하지 않습니다! +`validate_params = true`로 설정되고 입력 스키마가 준비된 상태에서, 이제 매개변수 검증과 입력 데이터 검증이 모두 실제로 실행됩니다. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/ko/docs/info/nxf_versions.md b/docs/ko/docs/info/nxf_versions.md index e356d465b1..fdaf33b632 100644 --- a/docs/ko/docs/info/nxf_versions.md +++ b/docs/ko/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: 교육 포털 버전 3.0부터, 과정 인덱스 페이지에 별도로 명시되지 않는 한 모든 교육 과정은 Nextflow 25.10.2 이상 버전과 호환됩니다. (더 이상 사용되지 않거나 아카이브된 자료는 버전 안내가 포함되지 않을 수 있습니다.) -현재 교육 환경에서 기본으로 로드되는 Nextflow 버전은 **Nextflow 25.10.4**입니다. +현재 교육 환경에서 기본으로 로드되는 Nextflow 버전은 **Nextflow 26.04.4**입니다. 현재 과정에서는 워크플로우 수준의 타입이 지정된 입력과 워크플로우 수준의 출력 지시문을 사용하므로, **별도로 명시된 경우가 아닌 한** V2 문법 분석기가 필요합니다. +V2 분석기는 Nextflow 26.04부터 기본값으로 설정되어 있으므로, 해당 버전을 사용하는 경우 수동으로 활성화할 필요가 없습니다. [Github Codespaces](../envsetup/01_setup.md) 또는 [로컬 devcontainer](../envsetup/03_devcontainer.md)를 통해 제공되는 환경을 사용할 계획이라면, 과정 안내에 별도로 명시된 경우가 아닌 한 추가 작업이 필요하지 않습니다. -그러나 직접 구성한 환경([수동 설치](../envsetup/02_local.md))에서 교육을 진행할 계획이라면, v2 문법 분석기가 활성화된 Nextflow 25.10.2 이상 버전을 사용해야 합니다. +그러나 직접 구성한 환경([수동 설치](../envsetup/02_local.md))에서 교육을 진행할 계획이라면, Nextflow 25.10.2 이상 버전을 사용해야 하며, 26.04 이전 버전을 사용하는 경우 v2 문법 분석기를 직접 활성화해야 합니다. ## 이전 버전의 교육 자료 @@ -40,7 +41,7 @@ DSL1은 Nextflow 22.03에서 더 이상 사용되지 않게 되었고, 22.12에 v1 분석기는 기존의 더 유연한 분석기입니다. v2 분석기는 더 엄격하며, 정적 타이핑(타입이 지정된 입력 및 출력)과 워크플로우 수준의 출력 지시문과 같은 새로운 언어 기능을 지원합니다. v2 분석기는 더 나은 오류 메시지를 제공하며, 런타임이 아닌 파싱 시점에 더 많은 오류를 감지합니다. -v2 분석기는 Nextflow 26.04에서 기본값이 될 예정입니다. +v2 분석기는 Nextflow 26.04부터 기본값으로 설정됩니다. 요약하면, DSL2는 작성하는 언어이고, 문법 분석기 버전은 해당 언어를 얼마나 엄격하게 해석하고 어떤 고급 기능을 사용할 수 있는지를 결정합니다. @@ -52,21 +53,22 @@ Nextflow 버전 업데이트 방법에 대한 자세한 내용은 [Nextflow 업 ### v2 문법 분석기 활성화 +Nextflow 26.04부터는 v2 분석기가 기본값으로 설정되므로, 아래 단계는 26.04 이전 버전에서만 필요합니다. + 현재 세션에서 v2 문법 분석기를 **활성화**하려면 터미널에서 다음 명령어를 실행하세요: ```bash export NXF_SYNTAX_PARSER=v2 ``` -이 설정을 영구적으로 적용하려면(Nextflow 26.04에서 v2가 기본값이 될 때까지), 셸 프로파일(`~/.bashrc`, `~/.zshrc` 등)에 export 명령어를 추가하세요: +이 설정을 영구적으로 적용하려면, 셸 프로파일(`~/.bashrc`, `~/.zshrc` 등)에 export 명령어를 추가하세요: ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -`NXF_SYNTAX_PARSER=v2` 환경 변수는 임시 요구 사항입니다. -Nextflow 26.04부터는 v2 분석기가 기본값이 되므로 이 설정이 더 이상 필요하지 않습니다. +26.04 이전 버전의 Nextflow에서는 이 과정에서 사용되는 v2 기능에 접근하기 위해 `NXF_SYNTAX_PARSER=v2` 환경 변수가 필요합니다. ### v2 문법 분석기 비활성화 diff --git a/docs/ko/docs/nextflow_run/01_basics.md b/docs/ko/docs/nextflow_run/01_basics.md index a548049070..2bb7d08f09 100644 --- a/docs/ko/docs/nextflow_run/01_basics.md +++ b/docs/ko/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "명령 출력" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` 콘솔 출력이 이와 비슷하다면 축하합니다. 첫 번째 Nextflow 워크플로우를 실행했습니다! @@ -115,13 +121,14 @@ nextflow run 1-hello.nf --input 'Hello World!' 이것은 과정 시작 부분에서 언급되었지만 놓쳤을 수 있습니다. [Nextflow 버전](../info/nxf_versions.md) 도움말 자료를 확인하세요. - 간단히 말해서, Nextflow `25.10`을 사용하는 경우 v2 언어 분석기를 활성화해야 합니다: + v2 분석기는 Nextflow 26.04부터 기본값으로 설정되어 있으므로, 이전 버전에서만 이 오류가 발생합니다. + 26.04 이전 버전을 사용하는 경우 v2 언어 분석기를 활성화해야 합니다: ```bash export NXF_SYNTAX_PARSER=v2 ``` -여기서 가장 중요한 출력은 위 출력에서 강조된 마지막 줄입니다: +여기서 가장 중요한 출력은 위 출력에서 강조된 줄입니다: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` 이제 출력이 `results` 대신 `hello_results`라는 디렉토리에 게시된 것을 볼 수 있습니다: @@ -206,7 +219,7 @@ hello_results 앞서 실행한 워크플로우의 콘솔 출력으로 돌아가면 다음 줄이 있었습니다: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` 줄이 `[a3/1e1535]`로 시작하는 것을 보셨나요? @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "명령 출력" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` 콘솔 출력은 익숙해 보이지만 이전과 약간 다른 점이 있습니다. @@ -767,7 +786,7 @@ nextflow clean -before backstabbing_swartz -f - [x] 작업의 작업 디렉토리에 대한 축약된 경로 - [ ] 출력 파일의 체크섬 -자세히 알아보기: [2.4. `work/` 디렉토리에서 원본 출력 및 로그 찾기](#23-find-the-original-output-and-logs-in-the-work-directory) +자세히 알아보기: [2.3. `work/` 디렉토리에서 원본 출력 및 로그 찾기](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ nextflow clean -before backstabbing_swartz -f - [ ] 실패한 작업의 오류 메시지를 포함합니다 - [ ] 작업을 위해 스테이징된 입력 파일을 나열합니다 -자세히 알아보기: [2.4. `work/` 디렉토리에서 원본 출력 및 로그 찾기](#23-find-the-original-output-and-logs-in-the-work-directory) +자세히 알아보기: [2.3. `work/` 디렉토리에서 원본 출력 및 로그 찾기](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ nextflow clean -before backstabbing_swartz -f - [ ] Nextflow가 덮어쓰기를 방지하고 실패합니다 - [ ] 자동으로 백업됩니다 -자세히 알아보기: [2.5. 다른 인사말로 워크플로우 다시 실행](#24-re-run-the-workflow-with-different-greetings) +자세히 알아보기: [2.4. 다른 인사말로 워크플로우 다시 실행](#24-re-run-the-workflow-with-different-greetings) 이 콘솔 출력은 무엇을 나타내나요? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] 작업이 실패하여 건너뛰었습니다 diff --git a/docs/ko/docs/nextflow_run/02_pipeline.md b/docs/ko/docs/nextflow_run/02_pipeline.md index ff4a5a1ae1..dfc49a7b0a 100644 --- a/docs/ko/docs/nextflow_run/02_pipeline.md +++ b/docs/ko/docs/nextflow_run/02_pipeline.md @@ -43,12 +43,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` 흥미롭게도 이것은 process에 대해 '3 of 3' 호출이 이루어졌음을 나타내며, 입력으로 제공한 CSV에 세 개의 데이터 행이 있었기 때문에 고무적입니다. @@ -125,11 +134,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "명령 출력" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` 이번에는 출력에 세 가지 process 실행과 관련 작업 하위 디렉토리가 모두 나열됩니다. @@ -364,13 +382,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "명령 출력" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` 약속대로 workflow의 일부로 여러 단계가 실행된 것을 볼 수 있습니다. @@ -675,13 +711,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "명령 출력" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` 사용자 정의 배치 이름으로 명명된 새 최종 출력을 볼 수 있습니다. @@ -930,13 +984,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` 코드가 분할되고 기본 workflow 파일 이름이 변경되었음에도 불구하고 process 실행이 모두 성공적으로 캐시되었음을 알 수 있습니다. @@ -1085,20 +1157,20 @@ ls / 컨테이너 내부에서 `cowpy` 명령을 직접 실행할 수 있습니다. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "명령 출력" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` 이것은 지정한 텍스트가 포함된 말풍선이 있는 기본 소 캐릭터(또는 'cowacter')의 ASCII 아트를 생성합니다. @@ -1107,22 +1179,22 @@ cowpy "Hello Containers" 예를 들어 도구 문서에 따르면 `-c`로 캐릭터를 설정할 수 있습니다. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "명령 출력" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1310,15 +1382,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` 처음 세 단계는 이전에 이미 실행했으므로 캐시되었지만 `cowpy` process는 새로운 것이므로 실제로 실행됩니다. diff --git a/docs/ko/docs/nextflow_run/03_config.md b/docs/ko/docs/nextflow_run/03_config.md index 5cb0d241a0..246b39baf0 100644 --- a/docs/ko/docs/nextflow_run/03_config.md +++ b/docs/ko/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` 이전과 동일한 출력이 생성됩니다. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` 이것은 `tux-run/work/` 및 `tux-run/results/`를 포함하여 `tux-run/` 아래에 새 디렉토리 세트를 생성합니다. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` 최종 출력 파일에는 인사말을 말하는 stegosaurus 캐릭터가 포함되어야 합니다. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` 이전과 동일한 출력이 생성되지만, 이번에는 출력을 `results_config/outdir/` 아래에서 찾을 수 있습니다. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` 이전과 동일한 출력이 생성되지만, 이번에는 출력을 `results_config/pnames/` 아래에서 찾을 수 있으며 process별로 그룹화됩니다. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` 이전과 동일한 출력이 생성되지만, 이번에는 출력을 `results_config/outmode/` 아래에서 찾을 수 있습니다. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "명령 출력" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` 문제없이 작동하고 이전과 동일한 출력을 `results_config/conda` 아래에 생성해야 합니다. @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` 보시다시피 런타임에 설정 간에 매우 편리하게 전환할 수 있습니다. @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` 이것은 가능한 경우 Docker를 사용하고 `results_config/test` 아래에 출력을 생성하며, 이번에는 캐릭터가 코믹 듀오 `dragonandcow`입니다. @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/ko/docs/nf4_science/_template/02_single_sample.md b/docs/ko/docs/nf4_science/_template/02_single_sample.md index e40d8d9812..d91e6f680d 100644 --- a/docs/ko/docs/nf4_science/_template/02_single_sample.md +++ b/docs/ko/docs/nf4_science/_template/02_single_sample.md @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/ko/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/ko/docs/nf4_science/genomics/02_per_sample_variant_calling.md index fab2183bed..0a2d9c849c 100644 --- a/docs/ko/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/ko/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` 작업 디렉토리 또는 결과 디렉토리를 확인하여 인덱스 파일이 올바르게 생성되었는지 확인할 수 있습니다. @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` 이제 콘솔 출력을 보면 두 프로세스가 나열되어 있습니다. @@ -891,13 +911,32 @@ nextflow run genomics.nf -profile test -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` 워크플로우 실행이 성공했다면 다음과 같은 오류가 발생할 때까지 다시 실행하세요: @@ -905,9 +944,9 @@ nextflow run genomics.nf -profile test -resume ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ nextflow run genomics.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` 결과 디렉토리에는 이제 각 샘플에 대한 BAM 및 BAI 파일(튜플에서)과 VCF 출력이 모두 포함됩니다: @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` 이전과 동일한 결과를 생성해야 합니다. 간단한 변이 호출 워크플로우에 원하는 모든 기본 기능이 이제 있습니다. diff --git a/docs/ko/docs/nf4_science/genomics/03_joint_calling.md b/docs/ko/docs/nf4_science/genomics/03_joint_calling.md index 241cec039f..602418de2e 100644 --- a/docs/ko/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/ko/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` Nextflow 출력은 이전과 동일하게 보이지만, `.g.vcf` 파일과 해당 인덱스 파일이 이제 하위 디렉토리로 구성되어 있습니다. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` 처음 두 단계는 이전 실행에서 캐시되었으며, 새로운 `GATK_JOINTGENOTYPING` 단계는 세 샘플 모두의 수집된 입력에 대해 한 번 실행됩니다. diff --git a/docs/ko/docs/nf4_science/imaging/01_basics.md b/docs/ko/docs/nf4_science/imaging/01_basics.md index e9e3a1f561..fbeee9c5e7 100644 --- a/docs/ko/docs/nf4_science/imaging/01_basics.md +++ b/docs/ko/docs/nf4_science/imaging/01_basics.md @@ -20,12 +20,12 @@ nextflow run hello-world.nf --greeting 'Hello World!' 콘솔 출력은 다음과 같이 표시되어야 합니다: ```console title="Output" linenums="1" - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` 축하합니다. 첫 번째 Nextflow 워크플로우를 실행하셨습니다! @@ -33,7 +33,7 @@ executor > local (1) 여기서 가장 중요한 출력은 마지막 줄(6번 줄)입니다: ```console title="Output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` 이는 `sayHello` process가 한 번 성공적으로 실행되었음을 알려줍니다(`1 of 1 ✔`). @@ -84,19 +84,19 @@ Hello World! 앞서 실행한 워크플로우의 콘솔 출력으로 돌아가면 다음과 같은 줄이 있었습니다: ```console title="Excerpt of command output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` -줄이 `[a3/7be2fa]`로 시작하는 것이 보이시나요? +줄이 `[71/8143bd]`로 시작하는 것이 보이시나요? 이것은 해당 process 실행에 대한 task 디렉토리 경로의 축약된 형태이며, `work/` 디렉토리 경로 내에서 `sayHello` process 실행의 출력을 어디에서 찾을 수 있는지 알려줍니다. -다음 명령을 입력하고(`a3/7be2fa`를 터미널에 표시된 것으로 교체) tab 키를 눌러 경로를 자동 완성하거나 별표를 추가하여 전체 경로를 찾을 수 있습니다: +다음 명령을 입력하고(`71/8143bd`를 터미널에 표시된 것으로 교체) tab 키를 눌러 경로를 자동 완성하거나 별표를 추가하여 전체 경로를 찾을 수 있습니다: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -전체 디렉토리 경로가 표시됩니다: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +전체 디렉토리 경로가 표시됩니다: `work/71/8143bd5ed3420e23c5f0dc1a05056d` 그 안에 무엇이 있는지 살펴보겠습니다. @@ -116,8 +116,8 @@ tree work/a3/7be2fa* ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -136,7 +136,7 @@ work
output.txt의 파일 내용 -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,10 +159,9 @@ Hello World!
파일 내용 -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
@@ -357,14 +356,14 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -process 상태 줄(5번 줄)에 추가된 `cached:` 부분을 찾아보십시오. 이는 Nextflow가 이미 이 작업을 수행했음을 인식하고 이전에 성공한 실행의 결과를 단순히 재사용했음을 의미합니다. +process 상태 줄에 추가된 `cached:` 부분을 찾아보십시오. 이는 Nextflow가 이미 이 작업을 수행했음을 인식하고 이전에 성공한 실행의 결과를 단순히 재사용했음을 의미합니다. 작업 하위 디렉토리 해시가 이전 실행과 동일하다는 것도 확인할 수 있습니다. Nextflow는 말 그대로 이전 실행을 가리키며 "저기에서 이미 했습니다"라고 말하고 있습니다. diff --git a/docs/ko/docs/nf4_science/imaging/02_run_molkart.md b/docs/ko/docs/nf4_science/imaging/02_run_molkart.md index ab29c3e0a4..c071ef9741 100644 --- a/docs/ko/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/ko/docs/nf4_science/imaging/02_run_molkart.md @@ -70,26 +70,34 @@ git clone --branch 1.2.0 --depth 1 https://github.com/nf-core/molkart 전체 파이프라인을 실행하기 전에 컨테이너가 nf-core 파이프라인에 왜 필수적인지 알아보겠습니다. -molkart 테스트 설정의 테스트 데이터셋과 매개변수를 사용하여 파이프라인을 실행해 보겠습니다: - -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +매개변수 파일을 사용하여 파이프라인의 매개변수를 전달합니다. +매개변수 파일은 각 매개변수와 그 값을 나열한 YAML 파일로, 정수와 같은 타입이 지정된 값을 그대로 유지하고 명령줄을 간결하게 유지합니다. + +작업 디렉토리에 `params.yaml` 파일이 이미 제공되어 있습니다: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` 이 매개변수들을 살펴보겠습니다: -- `--input`: 샘플 메타데이터가 포함된 샘플시트 경로 -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: 그리드 패턴 채우기를 위한 매개변수 -- `--clahe_pyramid_tile`: 대비 향상을 위한 커널 크기 -- `--segmentation_method`: 세포 분할에 사용할 알고리즘 -- `--outdir`: 결과를 저장할 위치 +- `input`: 샘플 메타데이터가 포함된 샘플시트 경로 +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: 그리드 패턴 채우기를 위한 매개변수 +- `clahe_pyramid_tile`: 대비 향상을 위한 커널 크기 +- `segmentation_method`: 세포 분할에 사용할 알고리즘 +- `outdir`: 결과를 저장할 위치 + +이 매개변수를 사용하여 파이프라인을 실행합니다: + +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "이 명령은 실패할 것입니다 - 의도적입니다!" @@ -172,17 +180,10 @@ process { } ``` -이제 동일한 명령으로 파이프라인을 다시 실행하세요: +이번에는 세 가지 분할 방법을 모두 실행하여 나중에 비교할 수 있도록 파이프라인을 다시 실행합니다: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` 이번에는 Nextflow가: @@ -209,12 +210,13 @@ nextflow run ./molkart \ ??? success "명령 출력" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ nextflow run ./molkart \ |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ nextflow run ./molkart \ https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,10 +300,10 @@ executor 라인 `executor > local (22)`는 다음을 알려줍니다: 각 프로세스 라인은 다음을 보여줍니다: -- **해시** (`[1a/2b3c4d]`): 작업 디렉토리 식별자 (이전과 같음) +- **해시** (`[b4/e57ff1]`): 작업 디렉토리 식별자 (이전과 같음) - **프로세스 이름**: 전체 모듈 경로 및 프로세스 이름 - **입력 식별자**: 괄호 안의 샘플 이름 -- **진행률**: 완료 백분율 및 개수 (예: `1 of 1 ✔`) +- **진행률**: 작업 수 및 완료 상태 (예: `1 of 1 ✔`) ### 핵심 정리 @@ -447,7 +444,7 @@ Hello World 예제와 마찬가지로 모든 실제 작업은 `work/` 디렉토 ### 4.1. 작업 디렉토리 구조 이해하기 작업 디렉토리에는 실행된 각 작업에 대한 하위 디렉토리가 포함됩니다. -12개의 작업이 있는 이 파이프라인의 경우 12개의 작업 하위 디렉토리가 있습니다. +22개의 작업이 있는 이 파이프라인의 경우 22개의 작업 하위 디렉토리가 있습니다. 작업 디렉토리를 나열하세요: @@ -517,30 +514,29 @@ Nextflow의 가장 강력한 기능 중 하나는 실패 지점부터 파이프 동일한 명령을 다시 실행하되 `-resume`을 추가하세요: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -다음과 같은 출력이 표시됩니다: +다음과 같은 출력이 표시됩니다: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -각 프로세스에 대해 `cached: 2` 또는 `cached: 1`이 표시되는 것을 주목하세요 - 아무것도 다시 실행되지 않았습니다! +각 전처리 및 분할 프로세스에 표시된 `cached: N` 주석을 주목하세요 - 해당 작업들은 다시 실행되지 않고 재사용되었습니다. ### 5.3. 재개가 유용한 경우 diff --git a/docs/ko/docs/nf4_science/imaging/03_inputs.md b/docs/ko/docs/nf4_science/imaging/03_inputs.md index 1994198048..0646b9579a 100644 --- a/docs/ko/docs/nf4_science/imaging/03_inputs.md +++ b/docs/ko/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Part 2에서는 명령줄에서 여러 매개변수를 사용하여 molkart를 ### 1.1. 긴 명령줄의 문제점 -Part 2의 명령을 다시 살펴보겠습니다: +Part 2에서는 명령을 간결하게 유지하고 정수형 전처리 매개변수와 같이 직접 입력한 값을 그대로 보존하기 위해 매개변수 파일을 사용했습니다: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -이 방법은 작동하지만, 재현하거나 공유하거나 수정하기 어렵습니다. +많은 매개변수를 명령줄에서 개별적으로 전달하면 재현하거나 공유하거나 수정하기 어렵습니다. 다음 달에 동일한 분석을 다시 실행해야 한다면 어떻게 하시겠습니까? 동료가 정확히 같은 설정을 사용하고 싶어한다면 어떻게 하시겠습니까? +매개변수 파일이 이 문제를 해결합니다. -### 1.2. 해결책: 매개변수 파일 사용 +### 1.2. 매개변수 파일 -`params.yaml`이라는 파일을 생성하십시오: +지금까지 사용해 온 `params.yaml` 파일은 다음과 같습니다: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -이제 명령이 다음과 같이 간단해집니다: +각 매개변수는 `key: value` 쌍으로 작성됩니다. +정수를 따옴표 없이 작성하면(예: `mindagap_tilesize: 90`) 정수형이 유지되며, 파이프라인의 매개변수 유효성 검사에서 이를 요구합니다. + +명령은 다음과 같이 간단해집니다: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -이것으로 끝입니다! 매개변수 파일은 정확한 설정을 문서화하고 재실행이나 공유를 쉽게 만듭니다. +매개변수 파일은 정확한 설정을 문서화하고 재실행이나 공유를 쉽게 만듭니다. ### 1.3. 매개변수 재정의하기 diff --git a/docs/ko/docs/nf4_science/imaging/04_config.md b/docs/ko/docs/nf4_science/imaging/04_config.md index a66c06f42f..7fb6dffc96 100644 --- a/docs/ko/docs/nf4_science/imaging/04_config.md +++ b/docs/ko/docs/nf4_science/imaging/04_config.md @@ -72,7 +72,7 @@ process { ### 2.2. 내장 프로파일 검사하기 -파이프라인 코드베이스와 관련된 `molkart/nextflow.config` 파일에서 이들을 검사해 보겠습니다: +파이프라인 코드베이스와 관련된 `molkart/nextflow.config` 파일에서 이들을 검사합니다: ```bash code molkart/nextflow.config @@ -131,15 +131,16 @@ nextflow run ./molkart \ 매개변수, 입력 및 코드가 동일하면 모든 작업이 캐시에서 검색되고 파이프라인이 거의 즉시 완료됩니다. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -모든 프로세스가 `cached: 2` 또는 `cached: 1`을 표시하는 것을 확인하십시오 - 아무것도 재실행되지 않았습니다! +각 프로세스의 `cached: N` 표시를 확인하십시오 - 캐시된 전처리 및 분할 작업은 재실행되지 않았습니다. ### 2.4. 테스트 프로파일 @@ -185,7 +186,7 @@ process { 이 프로파일에는 이전에 `params.yaml` 파일에서 사용했던 것과 동일한 매개변수가 포함되어 있습니다. 쉼표로 구분하여 여러 프로파일을 활성화할 수 있습니다. -이를 사용하여 params 파일 없이 파이프라인을 테스트해 보겠습니다: +이를 사용하여 params 파일 없이 파이프라인을 테스트합니다: ```bash nextflow run ./molkart -profile docker,test --outdir results -resume @@ -205,7 +206,7 @@ nf-core 파이프라인에는 컨테이너, 테스트 및 특수 환경을 위 ### 다음 단계 -다양한 컴퓨팅 환경을 위한 자체 사용자 정의 프로파일을 만드는 방법을 배웁니다. +다양한 컴퓨팅 환경을 위한 자체 사용자 정의 프로파일을 만드는 방법을 학습합니다. --- diff --git a/docs/ko/docs/nf4_science/rnaseq/02_single-sample.md b/docs/ko/docs/nf4_science/rnaseq/02_single-sample.md index 4abb37e956..d3c03a0a0f 100644 --- a/docs/ko/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/ko/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` 파트 1을 진행하고 이미 컨테이너를 가져왔다면 매우 빠르게 실행될 것입니다. @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` 매우 작은 입력 파일에서 실행하고 있으므로 이것도 매우 빠르게 실행될 것입니다. @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` results 디렉토리에서 정렬 출력을 찾을 수 있습니다. diff --git a/docs/ko/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/ko/docs/nf4_science/rnaseq/03_multi-sample.md index fb1a9c42d0..26dd567137 100644 --- a/docs/ko/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/ko/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "명령 출력" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` 이번에는 CSV 파일의 각 샘플에 대해 각 단계가 6번씩 실행됩니다. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` 캐시된 프로세스 실행 후에 단일 MULTIQC 실행이 추가되었습니다. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "명령 출력" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` 이제 워크플로우의 약간 다른 두 버전이 있습니다. 하나는 single-end 읽기 데이터용이고 다른 하나는 paired-end 데이터용입니다. diff --git a/docs/ko/docs/side_quests/debugging/index.md b/docs/ko/docs/side_quests/debugging/index.md index e76c68e75d..a3fc5c6631 100644 --- a/docs/ko/docs/side_quests/debugging/index.md +++ b/docs/ko/docs/side_quests/debugging/index.md @@ -121,7 +121,7 @@ code . 가장 흔한 구문 오류 중 하나이자, 때로는 디버깅하기 가장 복잡한 오류 중 하나가 **중괄호 누락 또는 불일치**입니다. -실제 예제로 시작해 보겠습니다. +실제 예제로 시작합니다. #### 파이프라인 실행 @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. 잘못된 프로세스 키워드 또는 지시문 사용 @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. 잘못된 변수 이름 사용 @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ workflow { val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // script 앞에 Groovy 코드로 변수 정의 @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Bash 변수의 잘못된 사용 @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Groovy 변수 vs Bash 변수" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` 입력 채널은 workflow 블록 안에 정의하고, 일반적으로 확장 프로그램이 제안하는 다른 권장 사항도 따르세요. @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` 이 예제보다 더 흔한 경우는, 프로세스에 추가 입력을 추가하고 workflow 호출을 그에 맞게 업데이트하는 것을 잊어버리는 것입니다. 다행히 이는 오류 메시지가 불일치를 명확하게 설명하므로 이해하고 수정하기 쉬운 오류 중 하나입니다. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "명령 출력" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` 이 워크플로우는 오류 없이 완료되지만, 단 하나의 샘플만 처리합니다! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` 이제 하나가 아닌 세 개의 샘플이 모두 처리되는 것을 확인할 수 있습니다. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "명령 출력" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. 채널 디버깅 기법 @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. 소프트웨어 누락 @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "명령 출력" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "참고" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker `bad_resources.nf`를 살펴봅니다: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // 오류: 비현실적인 시간 제한 input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -오류 메시지를 꼼꼼히 읽는다면 이런 실패로 오래 고민하지 않을 것입니다. 하지만 실행하는 명령의 리소스 요구 사항을 이해하여 리소스 지시문을 적절히 설정할 수 있도록 하세요. +`local` executor에서는 스케줄러를 사용할 때보다 오류 메시지가 덜 명확합니다. 시간 제한을 명시하는 메시지 대신 `process hasn't exited`와 `WARN: Killing running tasks`가 표시됩니다. 여기서 파악해야 할 연결 고리는, Nextflow가 할당된 리소스를 초과하는 작업을 종료한다는 점입니다. 따라서 스크립트 수준의 오류 없이 프로세스가 종료되면 리소스 지시문을 확인하세요. 이 예제에서는 `time` 지시문이 프로세스가 수행하는 작업에 비해 너무 낮게 설정된 것이 원인입니다. 실행하는 명령의 리소스 요구 사항을 이해하여 리소스 지시문을 적절히 설정할 수 있도록 하세요. ### 3.4. 프로세스 디버깅 기법 @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### 코드 확인 @@ -2249,16 +2237,20 @@ nextflow run workflow.nf -profile debug ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - 이 불명확한 오류는 `params{}` 블록의 11~12번 줄 근처에서 파싱 문제가 있음을 나타냅니다. v2 파서는 구조적 문제를 조기에 감지합니다. + 파서는 25번 줄(`script:`)을 가리키지만, 실제 원인은 바로 위에 있습니다. 23번 줄의 `output:` 선언 뒤에 후행 쉼표가 있어 파서가 또 다른 출력을 기대하게 되고, `script:`에 도달하면 실패합니다. 이것이 해결해야 할 여러 구문 오류 중 첫 번째입니다. 배운 4단계 디버깅 방법을 적용합니다: @@ -2300,7 +2292,7 @@ nextflow run workflow.nf -profile debug ``` ??? solution "해결책" - `buggy_workflow.nf`에는 모든 주요 디버깅 카테고리를 다루는 9~10개의 별개 오류가 포함되어 있습니다(세는 방법에 따라 다름). 각 오류와 수정 방법에 대한 체계적인 분석입니다. + `buggy_workflow.nf`에는 모든 주요 디버깅 카테고리를 다루는 10개의 별개 오류가 포함되어 있습니다. 각 오류와 수정 방법에 대한 체계적인 분석으로, Nextflow 26.04에서 실제로 마주치는 순서대로 정리했습니다. 컴파일러는 워크플로우를 두 번에 걸쳐 처리합니다. 먼저 구문을 파싱한 다음, 모든 변수가 정의되어 있는지 정적으로 검사합니다. 따라서 구문 오류를 먼저 해결하고, 그다음 정의되지 않은 변수 오류를 일괄 처리한 후에야 워크플로우가 실행되어 런타임 오류가 시작됩니다. 먼저 구문 오류부터 시작합니다: @@ -2315,6 +2307,8 @@ nextflow run workflow.nf -profile debug path "${sample_id}_result.txt" ``` + 쉼표를 제거하면 파서가 파일 끝까지 실행되어 `processFiles`를 닫아야 할 중괄호를 찾다가 `Unexpected input: ''`를 보고합니다. + **오류 2: 구문 오류 - 닫는 중괄호 누락** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ nextflow run workflow.nf -profile debug } // 누락된 닫는 중괄호 추가 ``` + 이제 구문이 파싱되므로 정적 타입 검사기가 실행됩니다. 워크플로우가 실행되기 전에 정의되지 않은 변수를 한꺼번에 보고합니다: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + 이 네 줄은 아래의 오류 3, 4, 5에 해당하는 세 가지 별개의 버그에 해당합니다. 마지막 `i`는 타입 검사기가 Nextflow 변수와 구분하지 못하는 Bash 변수로, 런타임 오류가 아닌 컴파일 시점에 나타납니다. 다시 실행하기 전에 세 가지 모두 수정합니다. + **오류 3: 변수 이름 오류** ```groovy linenums="26" echo "Processing: ${sample}" // 오류: sample_id여야 함 @@ -2353,9 +2358,18 @@ nextflow run workflow.nf -profile debug heavy_ch = heavyProcess(input_ch) ``` - 이 시점에서 워크플로우가 실행되지만, `processFiles`에서 `Path value cannot be null`과 같은 오류가 발생합니다. 이는 잘못된 채널 구조로 인한 것입니다. + **오류 5: Bash 변수 이스케이프 오류** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // 오류: $i가 정의되지 않은 Nextflow 변수처럼 보임 + ``` + **수정:** Nextflow가 셸에 처리를 맡기도록 Bash 변수 이스케이프 + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + 이 오류들을 해결하면 워크플로우가 컴파일되어 실행을 시작합니다. 첫 번째 런타임 오류는 `processFiles`에서 발생합니다. 튜플을 기대하는데 단순 값이 전달되기 때문입니다: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **오류 5: 채널 구조 오류 - 잘못된 map 출력** + **오류 6: 채널 구조 오류 - 잘못된 map 출력** ```groovy linenums="83" .map { row -> row.sample_id } // 오류: processFiles는 튜플을 기대 ``` @@ -2364,29 +2378,18 @@ nextflow run workflow.nf -profile debug .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - 하지만 이렇게 하면 위의 `heavyProcess()` 실행이 중단되므로, map을 사용하여 해당 프로세스에 샘플 ID만 전달해야 합니다: + 이렇게 하면 `processFiles`는 수정되지만, `input_ch`가 이제 2개 요소의 튜플을 내보내므로 `heavyProcess`에 전체 튜플이 전달되어 단일 값을 기대하는 곳에서 문제가 발생합니다. 튜플이 스크립트에서 `[sample_005, /path/sample_005.fastq.gz]`로 렌더링되어 Bash 명령이 구문 오류와 함께 종료 상태 2로 실패합니다. - **오류 6: heavyProcess의 잘못된 채널 구조** + **오류 7: heavyProcess의 잘못된 채널 구조** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // 오류: input_ch는 이제 항목당 2개 요소를 가짐 - heavyProcess는 1개(첫 번째)만 필요 + heavy_ch = heavyProcess(input_ch) // 오류: input_ch는 이제 2개 요소 튜플을 내보냄 - heavyProcess는 첫 번째 요소만 필요 ``` - **수정:** 올바른 채널 사용 및 샘플 ID 추출 + **수정:** 샘플 ID만 전달 ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - 이제 더 진행되지만 `No such variable: i` 오류가 발생합니다. Bash 변수를 이스케이프하지 않았기 때문입니다. - - **오류 7: Bash 변수 이스케이프 오류** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // 오류: $i가 이스케이프되지 않음 - ``` - **수정:** Bash 변수 이스케이프 - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - 이제 `Process exceeded running time limit (1ms)` 오류가 발생하므로, 관련 프로세스의 실행 시간 제한을 수정합니다: + 이제 `heavyProcess`가 실행되지만 시간 제한에 걸립니다. `local` executor에서는 명시적인 타임아웃 메시지 대신 `process hasn't exited`(및 `WARN: Killing running tasks` 메시지)가 표시되므로, 종료된 작업을 해당 `time` 지시문과 연결합니다: **오류 8: 리소스 설정 오류** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ nextflow run workflow.nf -profile debug time '100 s' ``` - 다음으로 `Missing output file(s)` 오류를 해결합니다: + 다음으로 `Missing output file(s)` 오류를 해결합니다. 스크립트는 `${sample_id}.txt`를 생성하지만 출력 선언은 `${sample_id}_heavy.txt`를 기대하기 때문입니다: **오류 9: 출력 파일 이름 불일치** ```groovy linenums="49" @@ -2408,9 +2411,9 @@ nextflow run workflow.nf -profile debug done > ${sample_id}_heavy.txt ``` - 처음 두 프로세스는 실행되었지만 세 번째는 실행되지 않았습니다. + 이제 워크플로우가 오류 없이 완료되지만 `files` 출력이 비어 있습니다. `handleFiles`가 실행되지 않은 것입니다. 입력 채널인 `channel.fromPath("*.txt")`가 실행 디렉토리에서 파일을 찾지 못해 오류 없이 프로세스가 건너뛰어집니다. - **오류 10: 출력 파일 이름 불일치** + **오류 10: 잘못된 채널 소스** ```groovy linenums="88" file_ch = channel.fromPath("*.txt") // 오류: 프로세스가 아닌 현재 디렉토리에서 입력을 가져오려 함 handleFiles(file_ch) @@ -2420,7 +2423,7 @@ nextflow run workflow.nf -profile debug file_ch = handleFiles(heavy_ch) ``` - 이제 전체 워크플로우가 실행됩니다. + 이제 전체 워크플로우가 처음부터 끝까지 실행되고 세 가지 출력이 모두 채워집니다. **완전히 수정된 워크플로우:** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ nextflow run workflow.nf -profile debug script: """ # 무거운 계산 시뮬레이션 - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/ko/docs/side_quests/dev_environment/index.md b/docs/ko/docs/side_quests/dev_environment/index.md index d0fb3bd674..3f13e1b772 100644 --- a/docs/ko/docs/side_quests/dev_environment/index.md +++ b/docs/ko/docs/side_quests/dev_environment/index.md @@ -74,7 +74,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "예제 파일에 대하여" @@ -316,7 +316,7 @@ VS Code의 오류 감지와 문제 패널을 사용하여 워크플로우 실행 ![링크 따라가기](../img/follow_link.png) -process 이름에도 동일하게 작동합니다. `basic_workflow.nf`로 돌아가서 workflow 블록의 `FASTQC` process 이름에 이를 적용해 봅니다. 이렇게 하면 process 이름으로 직접 연결됩니다(이 예제에서는 모듈 파일과 동일하지만, 훨씬 더 큰 파일의 중간 부분일 수도 있습니다). +process 이름에도 동일하게 작동합니다. `basic_workflow.nf`로 돌아가서 workflow 블록의 `FASTQC` process 이름에 이를 적용합니다. 이렇게 하면 process 이름으로 직접 연결됩니다(이 예제에서는 모듈 파일과 동일하지만, 훨씬 더 큰 파일의 중간 부분일 수도 있습니다). 이전 위치로 돌아가려면 **Alt+←** (또는 Mac에서 **Ctrl+-**)를 사용합니다. 이는 현재 위치를 잃지 않고 코드를 탐색하는 강력한 방법입니다. diff --git a/docs/ko/docs/side_quests/essential_scripting_patterns/index.md b/docs/ko/docs/side_quests/essential_scripting_patterns/index.md index d3b1a7ea4d..c2d603e476 100644 --- a/docs/ko/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/ko/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, 이 현실적인 데이터셋을 사용하여 실제 바이오인포매틱스 워크플로우에서 접하게 될 실용적인 프로그래밍 기법을 살펴봅니다. - - - - #### 준비 체크리스트 시작할 준비가 되었나요? @@ -112,9 +108,19 @@ CSV 파일을 읽는 간단한 워크플로우부터 시작합니다(`main.nf` ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "명령 출력" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Map 연산자 추가하기 @@ -148,7 +162,7 @@ map 연산이 어떻게 생겼는지 확인합니다. === "후" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ map 연산이 어떻게 생겼는지 확인합니다. === "전" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ nextflow run main.nf === "후" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ nextflow run main.nf === "전" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ nextflow run main.nf === "후" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ nextflow run main.nf === "전" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ nextflow run main.nf === "후" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ nextflow run main.nf === "전" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` 이는 `view()` 연산으로 표시된 전체 메타데이터와 `println`으로 출력한 추출된 부분 집합을 모두 보여줍니다. @@ -390,7 +410,7 @@ nextflow run main.nf === "후" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -409,7 +429,7 @@ nextflow run main.nf === "전" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -485,9 +505,9 @@ nextflow run collect.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -501,7 +521,7 @@ nextflow run collect.nf === "후" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - 여러 채널 방출을 하나로 그룹화 @@ -519,7 +539,7 @@ nextflow run collect.nf === "전" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - 여러 채널 방출을 하나로 그룹화 @@ -543,9 +563,9 @@ nextflow run collect.nf ??? success "명령 출력" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -614,9 +634,9 @@ nextflow run collect.nf ??? success "명령 출력" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -673,7 +693,7 @@ def names = files.collect { it.getName() } === "후" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // 데이터 변환을 위한 스크립팅 def sample_meta = [ @@ -700,7 +720,7 @@ def names = files.collect { it.getName() } === "전" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // 데이터 변환을 위한 스크립팅 def sample_meta = [ @@ -743,13 +763,19 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` 파일명에서 풍부해진 메타데이터를 확인할 수 있습니다. @@ -796,8 +822,9 @@ include { FASTP } from './modules/fastp.nf' === "후" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -824,13 +851,23 @@ include { FASTP } from './modules/fastp.nf' } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "전" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -853,9 +890,18 @@ include { FASTP } from './modules/fastp.nf' ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -868,28 +914,41 @@ nextflow run main.nf ??? failure "명령 출력" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` 프로세스가 두 번째 입력 파일에 `null` 값으로 `fastp`를 실행하려고 하여 실패하는 것을 볼 수 있습니다. 데이터셋에 단일 엔드 읽기가 포함되어 있지만, 프로세스는 페어드 엔드 읽기(한 번에 두 개의 입력 파일)를 기대하도록 하드코딩되어 있기 때문입니다. @@ -953,18 +1012,24 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` 잘 작동합니다! 실행된 실제 명령을 확인합니다(작업 해시에 맞게 조정하세요). ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Nextflow가 단일 엔드 읽기에 올바른 명령을 선택했음을 확인할 수 있습니다. @@ -976,7 +1041,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` 동적 스크립트 로직의 또 다른 일반적인 사용 예는 [Nextflow for Science Genomics 모듈](../../nf4_science/genomics/03_joint_calling.md)에서 볼 수 있습니다. 해당 모듈에서 호출되는 GATK 프로세스는 여러 입력 파일을 받을 수 있지만, 올바른 명령줄을 구성하려면 각 파일 앞에 `-V`를 붙여야 합니다. 프로세스는 스크립팅을 사용하여 입력 파일 컬렉션(`all_gvcfs`)을 올바른 명령 인자로 변환합니다. @@ -1023,11 +1088,12 @@ process GENERATE_REPORT { === "후" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1054,15 +1120,25 @@ process GENERATE_REPORT { ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "전" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1088,17 +1164,44 @@ process GENERATE_REPORT { } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` 워크플로우를 실행하고 `results/reports/`에 생성된 보고서를 확인합니다. 각 샘플에 대한 기본 정보가 포함되어 있어야 합니다. - +```bash +nextflow run main.nf +``` ??? success "명령 출력" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` 처리가 언제 어디서 이루어졌는지에 대한 정보를 추가하려면 어떻게 해야 할까요? 프로세스를 수정하여 **셸** 변수와 명령 치환을 사용하여 현재 사용자, 호스트명, 날짜를 보고서에 포함합니다. @@ -1131,11 +1234,18 @@ process GENERATE_REPORT { ??? failure "명령 출력" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Bash가 처리할 수 있도록 이스케이프해야 합니다. @@ -1195,7 +1305,7 @@ map 연산이 길고 복잡해졌습니다. `def` 키워드를 사용하여 재 === "후" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1222,22 +1332,33 @@ map 연산이 길고 복잡해졌습니다. `def` 키워드를 사용하여 재 } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "전" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1264,6 +1385,15 @@ map 연산이 길고 복잡해졌습니다. `def` 키워드를 사용하여 재 ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1289,13 +1419,22 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` 출력에 두 프로세스가 성공적으로 완료된 것이 표시되어야 합니다. 워크플로우가 훨씬 깔끔해졌으며, 복잡한 메타데이터 처리 로직이 모두 `separateMetadata` 함수에 캡슐화되어 유지보수하기 쉬워졌습니다. @@ -1359,26 +1498,35 @@ nextflow run main.nf -ansi-log false ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` 특정 작업에 대해 실행된 실제 `docker` 명령을 확인하여 CPU 할당을 볼 수 있습니다. ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` 다음과 같은 내용이 표시됩니다. ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` 이 예시에서는 고심도 샘플이었기 때문에 CPU 2개를 요청했습니다(`--cpu-shares 2048`). 샘플 심도에 따라 다른 CPU 할당이 표시될 것입니다. 다른 작업에 대해서도 확인해 보세요. @@ -1432,7 +1580,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` 이는 프로세스가 메모리 한도를 초과하여 종료되었음을 나타냅니다. @@ -1520,7 +1668,7 @@ Nextflow의 [데이터플로우 연산자](https://www.nextflow.io/docs/latest/r === "후" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1538,7 +1686,7 @@ Nextflow의 [데이터플로우 연산자](https://www.nextflow.io/docs/latest/r === "전" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1556,14 +1704,26 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` 여기서는 `.branch{}` 연산자 내부의 작지만 강력한 조건부 표현식을 사용하여 메타데이터에 따라 샘플을 라우팅했습니다. 고커버리지 인간 샘플은 `FASTP`를 통과하고, 다른 모든 샘플은 `TRIMGALORE`를 통과합니다. @@ -1583,7 +1743,7 @@ Nextflow(많은 동적 언어와 마찬가지로)는 boolean 컨텍스트에서 === "후" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1603,7 +1763,7 @@ Nextflow(많은 동적 언어와 마찬가지로)는 boolean 컨텍스트에서 === "전" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1624,21 +1784,31 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -일부 샘플을 제외하는 필터를 선택했기 때문에 더 적은 작업이 실행되었습니다. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +이 경우 세 샘플 모두 필터 조건을 충족하므로 모든 샘플이 파이프라인을 계속 진행합니다. +더 엄격한 임계값을 설정하면 낮은 심도의 샘플이 제외되어 실행되는 작업 수가 줄어듭니다. 필터 표현식 `meta.id && meta.organism && meta.depth >= 25000000`은 진리값과 명시적 비교를 결합합니다. @@ -1708,13 +1878,13 @@ nextflow run main.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` NullPointerException으로 충돌합니다. @@ -1764,7 +1934,27 @@ nextflow run main.nf ??? success "명령 출력" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` 충돌이 없습니다! 워크플로우가 이제 누락된 필드를 우아하게 처리합니다. `row.run_id`가 `null`이면 `?.` 연산자가 `.toUpperCase()` 호출을 방지하고, `run_id`는 예외를 발생시키는 대신 `null`이 됩니다. @@ -1808,7 +1998,7 @@ Elvis 연산자(`?:`)는 왼쪽이 "거짓(falsy)"일 때(앞서 설명한 대 === "후" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1817,7 +2007,7 @@ Elvis 연산자(`?:`)는 왼쪽이 "거짓(falsy)"일 때(앞서 설명한 대 === "전" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1864,13 +2054,13 @@ nextflow run main.nf ## 7. `error()`와 `log.warn`을 사용한 검증 -때로는 입력 매개변수가 유효하지 않은 경우 워크플로우를 즉시 중지해야 합니다. Nextflow에서는 `error()`와 `log.warn` 같은 내장 함수와 `if` 문 및 boolean 로직 같은 표준 프로그래밍 구조를 사용하여 검증 로직을 구현할 수 있습니다. 워크플로우에 검증을 추가합니다. +때로는 입력 매개변수가 유효하지 않은 경우 워크플로우를 즉시 중지해야 합니다. Nextflow에서는 `error()`와 `log.warn` 같은 내장 함수와 `if` 문 및 boolean 로직 같은 표준 프로그래밍 구조를 사용하여 검증 로직을 구현합니다. 워크플로우에 검증을 추가합니다. 워크플로우 블록 앞에 검증 함수를 생성하고, 워크플로우에서 호출하고, CSV 파일 경로에 매개변수를 사용하도록 채널 생성을 변경합니다. 매개변수가 없거나 파일이 존재하지 않으면 `error()`를 호출하여 명확한 메시지와 함께 실행을 중지합니다. === "후" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1888,6 +2078,7 @@ nextflow run main.nf } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1901,6 +2092,7 @@ nextflow run main.nf ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1913,9 +2105,9 @@ nextflow run main.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1932,9 +2124,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1948,7 +2140,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "명령 출력" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` 이번에는 성공적으로 실행됩니다. @@ -1987,14 +2199,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 + + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2025,7 +2247,7 @@ nextflow run main.nf --input ./data/samples.csv === "후" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2041,15 +2263,21 @@ nextflow run main.nf --input ./data/samples.csv println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "전" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2064,29 +2292,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` 조건부 로직을 추가하여 더 유용하게 만듭니다. === "후" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2109,12 +2352,15 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "전" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2130,34 +2376,53 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` 이제 성공/실패 메시지를 포함하는 더 유익한 요약을 얻을 수 있습니다. - +```bash +nextflow run main.nf +``` ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` 파일 작업을 사용하여 요약을 파일에 작성할 수도 있습니다. diff --git a/docs/ko/docs/side_quests/metadata/index.md b/docs/ko/docs/side_quests/metadata/index.md index 2ff42a4f7b..90ffc7f90e 100644 --- a/docs/ko/docs/side_quests/metadata/index.md +++ b/docs/ko/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` 연산자가 CSV 파일의 각 행에 대해 키-값 쌍의 맵을 구성했으며, 열 헤더가 해당 값의 키로 사용된 것을 확인할 수 있습니다. @@ -265,9 +271,9 @@ nextflow run main.nf 출력에서 다음과 같은 결과를 확인할 수 있습니다. ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` 각 행의 `character` 열 값에 접근할 수 있음이 확인되었습니다. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` `COWPY`가 각 파일에 대해 올바른 캐릭터를 사용하여 실행된 것을 확인할 수 있습니다. @@ -653,12 +678,25 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` 이전과 동일한 7개의 `cowpy-*.txt` 파일이 출력되며, 이제 더 간단한 `COWPY` 실행으로 생성됩니다. @@ -743,7 +781,7 @@ tuple val(meta), path(file) === "전" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -769,9 +807,9 @@ nextflow run main.nf ??? success "명령 출력" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -780,6 +818,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` 채널의 각 요소는 이제 두 요소 튜플입니다. 첫 번째는 메타 맵, 두 번째는 파일입니다. @@ -791,7 +835,7 @@ nextflow run main.nf ] ``` -나중에 데이터시트에 `language` 열을 추가하면 프로세스 입력 정의를 변경하지 않고도 `meta.language`로 접근할 수 있습니다. +나중에 데이터시트에 `language` 열을 추가하고 `map` 작업에 포함하면(예: `language: row.language`), 프로세스 입력 정의를 변경하지 않고도 `meta.language`로 접근할 수 있습니다. #### 1.5.3. 메타 맵을 사용하도록 `COWPY` 프로세스 업데이트 @@ -890,12 +934,25 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` results 디렉토리에 ASCII 아트 파일이 생성되었습니다. @@ -961,7 +1018,7 @@ results 디렉토리에 ASCII 아트 파일이 생성되었습니다. 모듈 파일을 열어 코드를 확인합니다. ```groovy title="modules/langid.nf" linenums="1" hl_lines="7 10" -// langid를 사용하여 각 입력 파일의 언어를 예측합니다 +// 각 입력 파일의 언어를 예측하기 위해 langid를 사용합니다 process IDENTIFY_LANGUAGE { container 'community.wave.seqera.io/library/pip_langid:b2269f456a5629ff' @@ -1043,20 +1100,33 @@ nextflow run main.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` 데이터셋의 각 파일에 대한 언어 예측이 생성되었습니다. @@ -1205,19 +1275,32 @@ nextflow run main.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` 확인되었습니다! @@ -1321,19 +1404,32 @@ nextflow run main.nf -resume ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` 메타 맵에 이제 `id`, `character`, `lang`, `lang_group` 네 개의 필드가 포함되었습니다. @@ -1444,13 +1540,26 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` results 디렉토리가 이제 언어 계열별로 구성되었으며, 각 파일은 감지된 언어에 따라 이름이 지정되었습니다. @@ -1508,18 +1617,19 @@ Nextflow가 명령에 `#!groovy ${meta.character}`를 대입할 때 `COWPY` 도 ??? failure "명령 출력" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1539,7 +1649,7 @@ Nextflow가 명령에 `#!groovy ${meta.character}`를 대입할 때 `COWPY` 도 cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1563,28 +1673,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -메타 맵에 `character` 키가 전혀 생성되지 않습니다. -프로세스 스크립트가 `#!groovy ${meta.character}`를 평가할 때 누락된 키는 `null`을 반환하며, Nextflow는 명령에 문자열 `null`을 그대로 대입합니다. +`map` 연산은 `#!groovy character: row.character`를 명시적으로 작성하므로, 메타 맵에 `character` 키는 생성되지만, 파싱된 행에 존재하지 않는 열에 접근하면 `null`이 반환되어 값이 `null`이 됩니다. +프로세스 스크립트가 `#!groovy ${meta.character}`를 평가할 때 Nextflow는 명령에 문자열 `null`을 그대로 대입합니다. ??? failure "명령 출력" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1609,7 +1720,7 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/ko/docs/side_quests/nf_test/index.md b/docs/ko/docs/side_quests/nf_test/index.md index 4c92c8333f..5a1420b041 100644 --- a/docs/ko/docs/side_quests/nf_test/index.md +++ b/docs/ko/docs/side_quests/nf_test/index.md @@ -19,7 +19,7 @@ 작성할 수 있는 테스트의 종류는 다양합니다: -1. **모듈 수준 테스트**: 개별 process에 대한 테스트 +1. **Process 수준 테스트**: 개별 process에 대한 테스트 2. **워크플로우 수준 테스트**: 단일 워크플로우에 대한 테스트 3. **파이프라인 수준 테스트**: 파이프라인 전체에 대한 테스트 4. **성능 테스트**: 파이프라인의 속도와 효율성에 대한 테스트 @@ -27,16 +27,16 @@ 개별 process를 테스트하는 것은 다른 언어의 단위 테스트(unit test)와 유사합니다. 워크플로우나 전체 파이프라인을 테스트하는 것은 다른 언어에서 통합 테스트(integration test)라고 불리는 것과 유사하며, 컴포넌트 간의 상호작용을 테스트합니다. -[**nf-test**](https://www.nf-test.com/)는 모듈, 워크플로우, 파이프라인 수준의 테스트를 작성할 수 있는 도구입니다. 간단히 말해, 파이프라인의 모든 개별 부분이 _독립적으로_ 예상대로 작동하는지 체계적으로 확인할 수 있습니다. +[**nf-test**](https://www.nf-test.com/)는 process, 워크플로우, 파이프라인 수준의 테스트를 작성할 수 있는 도구입니다. 간단히 말해, 파이프라인의 모든 개별 부분이 _독립적으로_ 예상대로 작동하는지 체계적으로 확인할 수 있습니다. ### 학습 목표 -이 사이드 퀘스트에서는 nf-test를 사용하여 파이프라인에 대한 워크플로우 수준 테스트와 파이프라인이 호출하는 세 가지 process에 대한 모듈 수준 테스트를 작성하는 방법을 학습합니다. +이 사이드 퀘스트에서는 nf-test를 사용하여 파이프라인에 대한 워크플로우 수준 테스트와 파이프라인이 호출하는 두 가지 process에 대한 process 수준 테스트를 작성하는 방법을 학습합니다. 이 사이드 퀘스트를 마치면 다음 기술들을 효과적으로 활용할 수 있습니다: - 프로젝트에서 nf-test 초기화하기 -- 모듈 수준 및 워크플로우 수준 테스트 생성하기 +- Process 수준 및 워크플로우 수준 테스트 생성하기 - 일반적인 유형의 assertion 추가하기 - 스냅샷과 콘텐츠 assertion의 적절한 사용 시점 이해하기 - 전체 프로젝트에 대한 테스트 실행하기 @@ -50,6 +50,16 @@ - [Hello Nextflow](../../hello_nextflow/index.md) 튜토리얼 또는 동급의 입문 과정을 완료해야 합니다. - 기본적인 Nextflow 개념과 메커니즘(process, 채널, 연산자, 파일 작업, 메타데이터)에 익숙해야 합니다. +!!! warning "nf-test 버전 요구사항" + + Process 수준 테스트는 **nf-test 0.9.3 이상**이 필요합니다. 이전 버전(0.9.2 포함)은 Nextflow가 버전 26.04부터 기본적으로 사용하는 엄격한 구문 분석기와 호환되지 않는 테스트 하네스 코드를 생성하여, 예상된 테스트 결과 대신 `Script compilation failed` 오류가 발생합니다. + + `nf-test version` 명령으로 버전을 확인하세요. 업그레이드가 필요한 경우: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. 시작하기 @@ -81,7 +91,8 @@ code . ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` 파일에 대한 자세한 설명은 [Hello Nextflow의 준비 운동](../../hello_nextflow/00_orientation.md)을 참조하세요. @@ -111,21 +122,23 @@ code . ??? example "워크플로우 코드" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * 파이프라인 매개변수 - */ + * 파이프라인 매개변수 + */ params.input_file = "greetings.csv" /* - * echo를 사용하여 'Hello World!'를 표준 출력에 출력 - */ + * echo를 사용하여 'Hello World!'를 표준 출력에 출력 + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -134,15 +147,15 @@ code . } /* - * 텍스트 변환 유틸리티를 사용하여 인사말을 대문자로 변환 - */ + * 텍스트 변환 유틸리티를 사용하여 인사말을 대문자로 변환 + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -183,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` 축하합니다! 방금 테스트를 실행했습니다! @@ -435,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` 성공입니다! 파이프라인이 성공적으로 실행되고 테스트가 통과됩니다. 몇 번을 실행해도 항상 같은 결과를 얻을 수 있습니다! @@ -460,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -534,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` 성공입니다! 파이프라인이 성공적으로 실행되고 테스트가 통과됩니다. 이제 파이프라인의 전체 상태뿐만 아니라 세부 사항도 테스트하기 시작했습니다. @@ -619,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` 성공입니다! 파이프라인이 성공적으로 완료되고, 올바른 수의 process가 실행되었으며, 출력 파일이 생성되었기 때문에 테스트가 통과됩니다. 이를 통해 테스트에 설명적인 이름을 제공하는 것이 얼마나 유용한지도 알 수 있습니다. @@ -730,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -800,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -808,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` 성공입니다! `sayHello` process가 성공적으로 실행되고 출력이 생성되었기 때문에 테스트가 통과됩니다. @@ -858,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` 성공입니다! `sayHello` process가 성공적으로 실행되고 출력이 스냅샷과 일치하기 때문에 테스트가 통과됩니다. @@ -951,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. `convertToUpper` process 테스트 @@ -998,10 +1040,10 @@ nextflow_process { 이제 대문자로 변환하려는 텍스트가 포함된 단일 입력 파일을 convertToUpper process에 제공해야 합니다. 여러 가지 방법이 있습니다: - 테스트 전용 파일을 생성할 수 있습니다 -- 기존 data/greetings.csv 파일을 재사용할 수 있습니다 +- 기존 greetings.csv 파일을 재사용할 수 있습니다 - 테스트 내에서 즉석으로 생성할 수 있습니다 -지금은 파이프라인 수준 테스트에서 사용한 예시를 활용하여 기존 data/greetings.csv 파일을 재사용합니다. 이전과 마찬가지로 테스트하는 내용을 더 잘 반영하도록 테스트 이름을 지정할 수 있지만, 이번에는 (다른 process에서 했던 것처럼) 특정 문자열을 확인하는 대신 콘텐츠를 '스냅샷'으로 남겨두겠습니다. +지금은 파이프라인 수준 테스트에서 사용한 예시를 활용하여 기존 greetings.csv 파일을 재사용합니다. 이전과 마찬가지로 테스트하는 내용을 더 잘 반영하도록 테스트 이름을 지정할 수 있지만, 이번에는 (다른 process에서 했던 것처럼) 특정 문자열을 확인하는 대신 콘텐츠를 '스냅샷'으로 남겨두겠습니다. === "후" @@ -1070,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1078,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` `convertToUpper` process에 대한 스냅샷 파일이 `tests/main.converttoupper.nf.test.snap`에 생성되었습니다. 테스트를 다시 실행하면 nf-test가 다시 통과되는 것을 확인할 수 있습니다. @@ -1097,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### 핵심 정리 @@ -1139,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` 확인해 보세요! 단일 명령으로 각 process에 대해 1개, 전체 파이프라인에 대해 2개, 총 4개의 테스트를 실행했습니다. 대규모 코드베이스에서 이것이 얼마나 강력한지 상상해 보세요! @@ -1180,7 +1222,7 @@ SUCCESS: Executed 4 tests in 13.481s - 기본 성공 테스트 - process 수 검증 - 출력 파일 존재 확인 -2. process 수준 테스트 +2. Process 수준 테스트 3. 출력 검증의 두 가지 접근 방식: - 완전한 출력 검증을 위한 스냅샷 사용 - 특정 콘텐츠 확인을 위한 직접 콘텐츠 assertion 사용 @@ -1193,7 +1235,7 @@ SUCCESS: Executed 4 tests in 13.481s - 테스트에 더 포괄적인 assertion 추가하기 - 엣지 케이스 및 오류 조건에 대한 테스트 작성하기 - 테스트를 자동으로 실행하도록 지속적 통합(CI) 설정하기 -- 워크플로우 및 모듈 테스트와 같은 다른 유형의 테스트 학습하기 +- 워크플로우, 성능 및 스트레스 테스트와 같은 다른 유형의 테스트 학습하기 - 더 고급 콘텐츠 검증 기술 탐색하기 **기억하세요:** 테스트는 코드가 어떻게 동작해야 하는지에 대한 살아있는 문서입니다. 더 많은 테스트를 작성하고 assertion이 더 구체적일수록 파이프라인의 신뢰성에 대한 확신을 가질 수 있습니다. diff --git a/docs/ko/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/ko/docs/side_quests/plugin_development/01_plugin_basics.md index 23cbf7d87e..c4abbb6045 100644 --- a/docs/ko/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/ko/docs/side_quests/plugin_development/01_plugin_basics.md @@ -510,7 +510,7 @@ nf-hello와 nf-schema는 모두 function 플러그인으로, `include`로 가져 plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -533,7 +533,7 @@ nextflow run hello.nf 로컬 머신에서 실행되는 소규모 예제에서는 정상적인 동작입니다: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -599,7 +599,7 @@ nf-co2footprint 플러그인은 지리적 위치를 설정할 수 있는 `co2foo plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -613,7 +613,7 @@ nf-co2footprint 플러그인은 지리적 위치를 설정할 수 있는 `co2foo plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -634,11 +634,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: zone 경고가 사라졌습니다. 플러그인이 이제 전역 기본값(480.0 gCO₂eq/kWh) 대신 GB 특정 탄소 집약도(163.92 gCO₂eq/kWh)를 사용합니다. -!!! note "참고" - - `WARN: Unrecognized config option 'co2footprint.location'` 메시지가 표시될 수도 있습니다. - 이는 외관상의 문제로 무시해도 됩니다. 플러그인은 여전히 값을 올바르게 읽습니다. - 파트 6에서는 자신만의 플러그인을 위한 설정 스코프를 만들어 봅니다. 이 플러그인은 전적으로 observer 메커니즘을 통해 작동하며, 워크플로우 생명주기 이벤트에 연결하여 리소스 메트릭을 수집하고 파이프라인이 완료되면 리포트를 생성합니다. diff --git a/docs/ko/docs/side_quests/plugin_development/02_create_project.md b/docs/ko/docs/side_quests/plugin_development/02_create_project.md index 9227c806ec..8a32f74629 100644 --- a/docs/ko/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/ko/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ tree ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ cat build.gradle ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ nextflowPlugin { ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ nextflowPlugin { ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **경고 메시지는 정상입니다.** diff --git a/docs/ko/docs/side_quests/plugin_development/03_custom_functions.md b/docs/ko/docs/side_quests/plugin_development/03_custom_functions.md index 3f5c73beb7..fc30d93b8c 100644 --- a/docs/ko/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/ko/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/ko/docs/side_quests/plugin_development/04_build_and_test.md b/docs/ko/docs/side_quests/plugin_development/04_build_and_test.md index af2454afb6..9d7de59357 100644 --- a/docs/ko/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/ko/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **테스트 결과는 어디에 있나요?** 모든 테스트가 통과하면 Gradle은 상세 출력을 숨깁니다. diff --git a/docs/ko/docs/side_quests/plugin_development/05_observers.md b/docs/ko/docs/side_quests/plugin_development/05_observers.md index d177736f3e..8a5d6c6e97 100644 --- a/docs/ko/docs/side_quests/plugin_development/05_observers.md +++ b/docs/ko/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "출력" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/ko/docs/side_quests/plugin_development/06_configuration.md b/docs/ko/docs/side_quests/plugin_development/06_configuration.md index 58968236b7..47503478b5 100644 --- a/docs/ko/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/ko/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ cd nf-greeting && make assemble ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` Groovy(및 Java)에서는 변수를 사용하기 전에 _선언_ 해야 합니다. diff --git a/docs/ko/docs/side_quests/plugin_development/index.md b/docs/ko/docs/side_quests/plugin_development/index.md index 498da92801..4443968cb2 100644 --- a/docs/ko/docs/side_quests/plugin_development/index.md +++ b/docs/ko/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ Java 또는 Groovy 사전 경험은 필요하지 않습니다. **작업 디렉토리:** `side-quests/plugin_development` +#### 교육 코드스페이스 열기 + +아직 열지 않으셨다면 [환경 설정](../../envsetup/index.md)에 설명된 대로 교육 환경을 열어 주세요. + +[![GitHub Codespaces에서 열기](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## 학습 목표 이 교육을 마치면 다음을 수행할 수 있습니다: diff --git a/docs/ko/docs/side_quests/splitting_and_grouping/index.md b/docs/ko/docs/side_quests/splitting_and_grouping/index.md index 6684c75acc..dad1bd08b7 100644 --- a/docs/ko/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/ko/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ workflow { === "후" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ nextflow run main.nf ### 3.2. 여러 필드로 Join -sampleA에는 2개의 반복이 있지만 sampleB와 sampleC에는 1개만 있습니다. 이 경우 `id` 필드를 사용하여 효과적으로 join할 수 있었지만, 동기화가 맞지 않으면 어떻게 될까요? 서로 다른 반복의 정상 샘플과 종양 샘플이 혼합될 수 있습니다! +patientA에는 2개의 반복이 있지만 patientB와 patientC에는 1개만 있습니다. 이 경우 `id` 필드를 사용하여 효과적으로 join할 수 있었지만, 동기화가 맞지 않으면 어떻게 될까요? 서로 다른 반복의 정상 샘플과 종양 샘플이 혼합될 수 있습니다! 이를 방지하기 위해 여러 필드로 join할 수 있습니다. 이를 달성하는 방법은 여러 가지가 있지만, 샘플 `id`와 `replicate` 번호를 모두 포함하는 새 joining 키를 생성하는 방법에 집중합니다. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + closure가 각 경로를 `file()`로 감싸므로, 파일 항목이 샘플시트의 파일명 그대로가 아닌 절대 경로로 표시됩니다. + 이름 있는 closure를 사용하면 여러 곳에서 동일한 변환을 재사용할 수 있어 오류 위험을 줄이고 코드를 더 읽기 쉽고 유지 관리하기 쉽게 만들 수 있습니다. ### 3.5. 데이터 중복 줄이기 @@ -723,21 +725,21 @@ nextflow run main.nf ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "명령 출력" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ nextflow run main.nf ## 5. `groupTuple`을 사용하여 샘플 집계 -이전 섹션에서는 입력 파일에서 데이터를 분할하고 특정 필드(정상 및 종양 샘플)로 필터링하는 방법을 학습했습니다. 하지만 이는 단일 유형의 결합만 다룹니다. 특정 속성으로 샘플을 그룹화하려면 어떻게 해야 할까요? 예를 들어, 매칭된 정상-종양 쌍을 join하는 대신 유형에 관계없이 "sampleA"의 모든 샘플을 함께 처리하려 할 수 있습니다. 이 패턴은 마지막에 결과를 비교하거나 결합하기 전에 효율성을 위해 관련 샘플을 독립적으로 처리하려는 생물정보학 워크플로우에서 일반적입니다. +이전 섹션에서는 입력 파일에서 데이터를 분할하고 특정 필드(정상 및 종양 샘플)로 필터링하는 방법을 학습했습니다. 하지만 이는 단일 유형의 결합만 다룹니다. 특정 속성으로 샘플을 그룹화하려면 어떻게 해야 할까요? 예를 들어, 매칭된 정상-종양 쌍을 join하는 대신 유형에 관계없이 "patientA"의 모든 샘플을 함께 처리하려 할 수 있습니다. 이 패턴은 마지막에 결과를 비교하거나 결합하기 전에 효율성을 위해 관련 샘플을 독립적으로 처리하려는 생물정보학 워크플로우에서 일반적입니다. Nextflow에는 이를 위한 내장 메서드가 있으며, 주로 살펴볼 것은 `groupTuple`입니다. @@ -1008,7 +1014,7 @@ Nextflow에는 이를 위한 내장 메서드가 있으며, 주로 살펴볼 것 ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ nextflow run main.nf 2. **데이터를 별도 채널로 분할:** `filter`를 사용하여 `type` 필드를 기반으로 데이터를 독립적인 스트림으로 분리 ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **매칭된 샘플 결합:** `join`을 사용하여 `id`와 `repeat` 필드를 기반으로 관련 샘플을 재결합 @@ -1199,31 +1205,31 @@ nextflow run main.nf - 키(튜플의 첫 번째 요소)로 두 채널 join ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - joining 키를 추출하고 이 값으로 join ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - subMap을 사용하여 여러 필드로 join + - `subMap`을 사용하여 여러 필드로 join ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **구간에 분배:** `combine`을 사용하여 병렬 처리를 위해 유전체 구간과 샘플의 카르테시안 곱을 생성 ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **그룹화 키로 집계:** `groupTuple`을 사용하여 각 튜플의 첫 번째 요소로 그룹화하여 `id`와 `interval` 필드를 공유하는 샘플을 수집하고 기술적 반복을 병합 diff --git a/docs/ko/docs/side_quests/workflows_of_workflows/index.md b/docs/ko/docs/side_quests/workflows_of_workflows/index.md index b74499a753..ca34b9de05 100644 --- a/docs/ko/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/ko/docs/side_quests/workflows_of_workflows/index.md @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` 다른 워크플로우와 구성 가능하게 만들기 위해 몇 가지를 변경해야 합니다. ### 1.2. 워크플로우를 구성 가능하게 만들기 -워크플로우를 구성 가능하게 만들려면 네 가지를 변경해야 합니다: -워크플로우에 이름을 부여하고, 입력을 `take:` 블록으로 이동하고, 출력을 `emit:` 블록으로 이동하고, -단독 실행형 `publish:`/`output {}` 블록을 제거합니다(이 블록들은 진입 워크플로우에 속합니다). +워크플로우를 구성 가능하게 만들려면 세 가지를 변경해야 합니다: +워크플로우에 이름을 부여하고, 입력을 `take:` 블록으로 이동하고, 출력을 `emit:` 블록으로 이동합니다 +(단독 실행형 `publish:`/`output {}` 블록은 제거하며, 이 블록들은 진입 워크플로우에 속합니다). 각 변경 사항을 하나씩 살펴봅니다. @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "디렉토리 내용" @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` `GREETING_WORKFLOW`와 구성 가능하게 만들려면 1.2 섹션과 동일한 세 가지 변경 사항을 적용합니다. @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "디렉토리 내용" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "파일 내용" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` 파이프라인이 처음부터 끝까지 정상적으로 작동합니다: 인사말이 대문자로 변환되고 뒤집혔습니다. diff --git a/docs/ko/docs/side_quests/working_with_files/index.md b/docs/ko/docs/side_quests/working_with_files/index.md index e56b4dd5a8..4dce298bd4 100644 --- a/docs/ko/docs/side_quests/working_with_files/index.md +++ b/docs/ko/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 보시다시피, Nextflow는 우리가 작성한 그대로 문자열 경로를 출력했습니다. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 이번에는 입력으로 제공한 상대 경로 대신 전체 절대 경로가 표시됩니다. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 위에서 다양한 파일 속성이 콘솔에 출력된 것을 확인할 수 있습니다. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 프로세스 내에서 파일을 적절히 처리할 수 있음을 보여줍니다. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` 중요한 부분은 다음입니다: @@ -543,12 +568,13 @@ nextflow run main.nf ??? failure "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -576,9 +602,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` 위에서 언급한 것처럼 프로세스가 디버깅 정보를 출력하도록 설정되어 있어 오류에 대한 많은 세부 정보가 표시됩니다. @@ -692,9 +718,9 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -702,9 +728,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 작동합니다! 거의 변경된 것이 없음을 확인할 수 있습니다. @@ -813,16 +845,11 @@ nextflow run main.nf ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` 작동하기는 하지만 번거롭습니다. -!!! tip "`file()` vs `channel.fromPath()` 사용 시기" - - - 단일 Path 객체가 필요한 경우(파일 존재 여부 확인, 속성 읽기, 단일 프로세스 실행에 전달)에는 `file()`을 사용하세요 - - 여러 파일을 담을 수 있는 채널이 필요한 경우, 특히 glob 패턴을 사용하거나 파일이 여러 프로세스를 통해 흐를 때는 `channel.fromPath()`를 사용하세요 - 여기서 [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath)가 등장합니다. 하나 이상의 정적 파일 문자열과 glob 패턴에서 채널을 생성하는 데 필요한 모든 기능을 번들로 제공하는 편리한 채널 팩토리입니다. ### 3.1. 채널 팩토리 추가 @@ -877,11 +904,17 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 보시다시피, 파일 경로가 채널에서 `Path` 유형 객체로 로드되고 있습니다. @@ -889,6 +922,11 @@ nextflow run main.nf `channel.fromPath()`는 파일 목록으로 채워진 새 채널을 생성하는 편리한 방법입니다. +!!! tip "`file()` vs `channel.fromPath()` 사용 시기" + + - 단일 Path 객체가 필요한 경우(파일 존재 여부 확인, 속성 읽기, 단일 프로세스 실행에 전달)에는 `file()`을 사용하세요 + - 여러 파일을 담을 수 있는 채널이 필요한 경우, 특히 glob 패턴을 사용하거나 파일이 여러 프로세스를 통해 흐를 때는 `channel.fromPath()`를 사용하세요 + ### 3.2. 채널의 파일 속성 보기 채널 팩토리를 처음 사용할 때는 코드를 단순화하여 파일 이름만 출력했습니다. @@ -934,12 +972,12 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -947,6 +985,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 이전과 동일한 결과이지만, 이제 파일이 채널에 있으므로 더 많은 파일을 추가할 수 있습니다. @@ -1003,12 +1047,12 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1024,6 +1068,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 보시다시피, 이제 채널에 두 개의 Path 객체가 있습니다. Nextflow가 파일 이름 확장을 올바르게 수행하고 두 파일을 모두 로드하고 처리했음을 보여줍니다. @@ -1108,19 +1158,25 @@ nextflow run main.nf ??? success "명령 출력" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 채널의 각 요소는 이제 `simpleName`과 원래 파일 객체를 포함하는 튜플입니다. @@ -1164,19 +1220,25 @@ nextflow run main.nf ??? success "명령 출력" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 이제 채널의 각 요소에 대한 튜플에는 메타데이터 목록(_예:_ `[patientA, rep1, normal, R1, 001]`)과 원래 파일 객체가 포함됩니다. @@ -1265,19 +1327,25 @@ nextflow run main.nf ??? success "명령 출력" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 이제 메타데이터가 명확하게 레이블링되어(_예:_ `[id:patientA, replicate:1, type:normal, readNum:2]`) 무엇이 무엇인지 훨씬 쉽게 알 수 있습니다. @@ -1337,10 +1405,10 @@ data/patientA_rep1_normal_R{1,2}_001.fastq.gz ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* 지금은 매핑을 주석 처리합니다. 나중에 다시 살펴볼 것입니다! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1355,13 +1423,13 @@ data/patientA_rep1_normal_R{1,2}_001.fastq.gz === "전" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // channel.fromFilePairs로 파일 로드 + // channel.fromPath로 파일 로드 ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1383,12 +1451,11 @@ nextflow run main.nf ??? failure "명령 출력" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1398,9 +1465,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` 이런, 이번에는 실행이 실패했습니다! @@ -1451,11 +1518,17 @@ nextflow run main.nf ??? success "명령 출력" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 이번에는 워크플로우가 성공했습니다! @@ -1476,10 +1549,10 @@ nextflow run main.nf // channel.fromFilePairs로 파일 로드 ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1496,10 +1569,10 @@ nextflow run main.nf ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* 지금은 매핑을 주석 처리합니다. 나중에 다시 살펴볼 것입니다! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1526,11 +1599,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 결과가 나왔습니다: 출력 튜플의 첫 번째 위치에 메타데이터 map(`[id:patientA, replicate:1, type:normal]`)이 있고, 그 뒤에 의도한 대로 페어드 파일의 튜플이 있습니다. @@ -1642,10 +1721,10 @@ process ANALYZE_READS { // channel.fromFilePairs로 파일 로드 ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1664,10 +1743,10 @@ process ANALYZE_READS { // channel.fromFilePairs로 파일 로드 ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1686,11 +1765,17 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` 이제 이름으로 채널을 참조할 수 있음을 확인했습니다. @@ -1714,10 +1799,10 @@ nextflow run main.nf // channel.fromFilePairs로 파일 로드 ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1747,10 +1832,10 @@ nextflow run main.nf // channel.fromFilePairs로 파일 로드 ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1784,12 +1869,19 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` 출력이 `results` 디렉토리에 게시되므로 확인해 봅니다. @@ -1849,12 +1941,26 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` 이제 results 디렉토리에 사용 가능한 모든 데이터에 대한 결과가 포함되어야 합니다. @@ -1885,7 +1991,7 @@ nextflow run main.nf === "후" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1893,7 +1999,7 @@ nextflow run main.nf === "전" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1911,12 +2017,26 @@ nextflow run main.nf ??? success "명령 출력" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` 이제 results 디렉토리를 확인합니다: @@ -2069,20 +2189,21 @@ nextflow run main.nf 5. **channel.fromFilePairs로 단순화:** `channel.fromFilePairs()`를 사용하여 관련 파일을 자동으로 쌍으로 묶고 페어드 파일 ID에서 메타데이터를 추출했습니다. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **프로세스에서 파일 작업 사용:** 적절한 입력 처리를 통해 파일 작업을 Nextflow 프로세스에 통합하고, `output {}` 블록을 사용하여 메타데이터를 기반으로 출력을 구성했습니다. - 프로세스 입력에 meta map 연결 - ```groovy + ````groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( + ```groovy [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -2091,7 +2212,7 @@ nextflow run main.nf } ANALYZE_READS(ch_samples) - ``` + ```` - 메타데이터를 기반으로 출력 구성 diff --git a/docs/pl/docs/hello_nextflow/01_hello_world.md b/docs/pl/docs/hello_nextflow/01_hello_world.md index 3fae02f0b6..33c509e8ea 100644 --- a/docs/pl/docs/hello_nextflow/01_hello_world.md +++ b/docs/pl/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "Wyjście polecenia" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -Wyjście terminala powinno wyglądać znajomo. Zewnętrznie nic się nie zmieniło. +Wyjście terminala kończy się teraz podsumowaniem `Outputs:`, które wymienia opublikowane wyjścia i katalog, do którego zostały zapisane. -Jednak sprawdź eksplorator plików: tym razem Nextflow utworzył nowy katalog o nazwie `results/`. +Sprawdź eksplorator plików: tym razem Nextflow utworzył również nowy katalog o nazwie `results/`. ??? abstract "Zawartość katalogu" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Tym razem wynik jest zapisywany w określonym podkatalogu. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Tym razem, jeśli spojrzysz na wyniki, plik jest właściwą kopią, a nie tylko dowiązaniem symbolicznym. @@ -767,19 +785,19 @@ W bloku procesu wprowadź następującą zmianę kodu: === "Po" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "Przed" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` Symbol `$` i nawiasy klamrowe (`{ }`) mówią Nextflow'owi, że to jest nazwa zmiennej, która musi być zastąpiona faktyczną wartością wejściową (=interpolowana). @@ -811,15 +829,15 @@ W bloku workflow wprowadź następującą zmianę kodu: === "Po" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // wyemituj pozdrowienie - sayHello(params.input) + // wyemituj pozdrowienie + sayHello(params.input) ``` === "Przed" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // wyemituj pozdrowienie - sayHello() + // wyemituj pozdrowienie + sayHello() ``` To mówi Nextflow'owi, aby uruchomił proces `sayHello` na wartości dostarczonej przez parametr `--input`. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Jeśli wprowadzono wszystkie te edycje poprawnie, powinieneś uzyskać kolejne pomyślne wykonanie. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "Jeśli nie zadziałało" @@ -936,7 +966,8 @@ nextflow run hello-world.nf Zostało to wspomniane na początku kursu, ale może Ci to umknęło. Sprawdź materiały pomocnicze [Wersje Nextflow](../info/nxf_versions.md). - Krótko mówiąc, jeśli używasz Nextflow `25.10`, musisz włączyć parser języka v2: + Parser v2 jest domyślny od Nextflow 26.04 wzwyż, więc ten błąd pojawi się tylko na starszych wersjach. + Na wersji starszej niż 26.04 musisz włączyć parser języka v2: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Po raz kolejny powinieneś znaleźć odpowiednie zaktualizowane wyjście w Swoim katalogu wyników. @@ -1004,8 +1041,6 @@ Wiedza o tym, jak uruchamiać workflow'y i pobierać wyjścia, jest świetna, al Tutaj pokażemy Ci, jak używać funkcji [`-resume`](https://nextflow.io/docs/latest/cache-and-resume.html), gdy musisz ponownie uruchomić ten sam workflow, jak przeglądać dziennik poprzednich wykonań za pomocą [`nextflow log`](https://nextflow.io/docs/latest/reference/cli.html#log) i jak usuwać starsze katalogi work za pomocą [`nextflow clean`](https://nextflow.io/docs/latest/reference/cli.html#clean). - - ### 4.1. Uruchom ponownie workflow z `-resume` Czasami zechcesz ponownie uruchomić pipeline, który już wcześniej uruchamiałeś, bez powtarzania kroków zakończonych pomyślnie. @@ -1022,17 +1057,23 @@ Są dwie kluczowe zalety takiego postępowania: Aby jej użyć, po prostu dodaj `-resume` do Swojego polecenia i uruchom go: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "Wyjście polecenia" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Wyjście konsoli powinno wyglądać znajomo, ale jest jedna rzecz, która jest nieco inna w porównaniu do poprzedniego. diff --git a/docs/pl/docs/hello_nextflow/02_hello_channels.md b/docs/pl/docs/hello_nextflow/02_hello_channels.md index 467ee02047..fc97b6ea78 100644 --- a/docs/pl/docs/hello_nextflow/02_hello_channels.md +++ b/docs/pl/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` Jak poprzednio, plik wyjściowy o nazwie `output.txt` znajdziesz w katalogu `results/hello_channels` (jak określono w bloku `output` skryptu workflow'u, pokazanym powyżej). @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Jeśli wprowadziłeś obie edycje poprawnie, powinieneś uzyskać pomyślne wykonanie. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "Wyjście polecenia" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Jak widzisz, linia ta wyświetla zawartość kanału do konsoli. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "Wyjście polecenia" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Z pewnością wygląda na to, że uruchomił się bez problemów. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Tym razem widzimy wszystkie trzy uruchomienia procesów i ich powiązane podkatalogi work wymienione w wyjściu. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Wracając do widoku podsumowania, wyjście jest ponownie podsumowane w jednej linii. @@ -605,8 +652,6 @@ Spójrz na katalog `results`, aby zobaczyć, czy wszystkie wyjściowe pozdrowien └── output.txt ``` -Tak! I każdy ma oczekiwaną zawartość. - ??? abstract "Zawartość pliku" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "Wyjście polecenia" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -940,16 +985,25 @@ nextflow run hello-channels.nf ??? success "Wyjście polecenia" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Tym razem działa I daje nam dodatkowy wgląd w to, jak zawartość kanału wygląda przed i po uruchomieniu operatora `flatten()`. @@ -1023,11 +1077,13 @@ Wprowadź następującą edycję deklaracji parametru: === "Przed" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Pipeline parameters */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` Edycja ta zakłada, że plik jest współlokalizowany z kodem workflow'u. @@ -1094,9 +1150,9 @@ nextflow run hello-channels.nf ??? failure "Wyjście polecenia" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1197,12 +1253,12 @@ nextflow run hello-channels.nf ??? failure "Wyjście polecenia" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1317,12 +1373,12 @@ nextflow run hello-channels.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1330,6 +1386,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` Tym razem powinno się uruchomić bez błędu. diff --git a/docs/pl/docs/hello_nextflow/03_hello_workflow.md b/docs/pl/docs/hello_nextflow/03_hello_workflow.md index 89d5902f6d..6954208827 100644 --- a/docs/pl/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/pl/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` Jak poprzednio, pliki wyjściowe znajdziesz w lokalizacji określonej w bloku `output`. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` W wyjściu konsoli jest teraz dodatkowa linia odpowiadająca nowemu procesowi, który właśnie dodaliśmy. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "Wyjście polecenia" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + Wyjście terminala kończy się teraz również blokiem podsumowania `Outputs:`. Pominęliśmy go tutaj, aby skupić się na liniach statusu procesów. + Uruchamia się pomyślnie, włączając trzeci krok. Jednak spójrz na liczbę wywołań dla `collectGreetings()` w ostatniej linii. @@ -627,8 +651,8 @@ Teraz spójrz na zawartość końcowego pliku wyjściowego. ??? abstract "Zawartość pliku" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` O nie. Krok zbierania został uruchomiony indywidualnie dla każdego powitania, co NIE jest tym, czego chcieliśmy. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ Na koniec możesz spojrzeć na zawartość pliku wyjściowego, aby upewnić się ??? abstract "Zawartość pliku" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` Uruchamia się pomyślnie i produkuje pożądane wyjście: ??? abstract "Zawartość pliku" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` Jeśli zajrzysz do katalogu `results/hello_workflow/`, znajdziesz nowy plik raportu, `trio-report.txt`. @@ -1273,5 +1326,5 @@ Podczas przekazywania wielu wejść do procesu, co musi być prawdą? - [x] Kolejność wejść musi odpowiadać kolejności zdefiniowanej w bloku `input` - [ ] Tylko dwa wejścia mogą być przekazane jednocześnie -Dowiedz się więcej: [3. Przekaż więcej niż jedno wejście do procesu](#3-pass-more-than-one-input-to-a-process) +Dowiedz się więcej: [3. Przekaż dodatkowe parametry do procesu](#3-pass-additional-parameters-to-a-process) diff --git a/docs/pl/docs/hello_nextflow/04_hello_modules.md b/docs/pl/docs/hello_nextflow/04_hello_modules.md index 6081f610d2..9b296a4cb1 100644 --- a/docs/pl/docs/hello_nextflow/04_hello_modules.md +++ b/docs/pl/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` Jak poprzednio, pliki wyjściowe znajdziesz w katalogu określonym w bloku `output` (tutaj `results/hello_modules/`). @@ -172,7 +187,7 @@ Wstawmy ją powyżej bloku `params` i wypełnijmy odpowiednio. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ Wstawmy ją powyżej bloku `params` i wypełnijmy odpowiednio. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ Wstaw deklarację importu powyżej bloku `params` i wypełnij ją odpowiednio. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ Wstaw deklarację importu powyżej bloku `params` i wypełnij ją odpowiednio. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ Wstaw deklarację importu powyżej bloku `params` i wypełnij ją odpowiednio. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ Wstaw deklarację importu powyżej bloku `params` i wypełnij ją odpowiednio. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/pl/docs/hello_nextflow/05_hello_containers.md b/docs/pl/docs/hello_nextflow/05_hello_containers.md index 519b7002dd..ac837b797f 100644 --- a/docs/pl/docs/hello_nextflow/05_hello_containers.md +++ b/docs/pl/docs/hello_nextflow/05_hello_containers.md @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` Jak poprzednio, pliki wyjściowe znajdziesz w katalogu określonym w bloku `output` (`results/hello_containers/`). @@ -259,22 +273,22 @@ Teraz, gdy jesteś wewnątrz kontenera, możesz uruchomić polecenie `cowpy` bez Na przykład dokumentacja narzędzia mówi, że możemy zmienić postać ('cowacter') za pomocą `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Wyjście polecenia" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "Wyjście polecenia (zredagowane dla przejrzystości)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` Tym razem rzeczywiście działa! diff --git a/docs/pl/docs/hello_nextflow/06_hello_config.md b/docs/pl/docs/hello_nextflow/06_hello_config.md index 63683724c4..39ad609333 100644 --- a/docs/pl/docs/hello_nextflow/06_hello_config.md +++ b/docs/pl/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Jak poprzednio, pliki wyjściowe znajdziesz w katalogu określonym w bloku `output` (`results/hello_config/`). @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` To nadal produkuje takie same wyjście jak poprzednio. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` To utworzy nowy zestaw katalogów w `tux-run/`, w tym `tux-run/work/` i `tux-run/results/`. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` Końcowy plik wyjściowy powinien zawierać postać stegosaurus wypowiadającą pozdrowienia. @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` To publikuje wyjścia do `custom-outdir-cli/` zamiast `results/`: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` To publikuje wyjścia do `custom-outdir-config-2/rep2/`, z określoną ścieżką bazową _i_ podkatalogiem nazwy partii _i_ wynikami pogrupowanymi według procesu: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` To publikuje wyjścia do `config-output-mode/`, i nadal są to wszystkie właściwe kopie, a nie dowiązania symboliczne. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "Wyjście polecenia" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` To powinno działać bez problemu i produkować takie same wyjścia jak poprzednio w `custom-outdir-config/conda`. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Jak widać, pozwala nam to bardzo wygodnie przełączać się między konfiguracjami w czasie wykonania. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` To użyje Docker tam, gdzie to możliwe, i wyprodukuje wyjścia w `custom-outdir-config/test`, a tym razem postać to komediowy duet `dragonandcow`. diff --git a/docs/pl/docs/hello_nf-core/00_orientation.md b/docs/pl/docs/hello_nf-core/00_orientation.md index 09dc3f42c3..396376434d 100644 --- a/docs/pl/docs/hello_nf-core/00_orientation.md +++ b/docs/pl/docs/hello_nf-core/00_orientation.md @@ -22,24 +22,19 @@ Jeśli przechodzisz przez ten kurs samodzielnie, zapoznaj się z [podstawami śr ### Wymagania dotyczące wersji -To szkolenie jest przeznaczone dla **Nextflow 25.10.2** lub nowszego **z WYŁĄCZONYM parserem składni v2**. +To szkolenie działa z Nextflow'em 25.10.2 lub nowszym **z parserem składni v2**, który jest domyślny od Nextflow'a 26.04 wzwyż. +W naszym środowisku szkoleniowym nie musisz nic robić: działa ono z Nextflow'em 26.04.4 i parserem v2. Jeśli korzystasz ze środowiska lokalnego lub niestandardowego, zapoznaj się z [uwagami dotyczącymi wersji](../info/nxf_versions.md). -#### Jeśli korzystasz z naszego środowiska szkoleniowego: +Szkolenie wymaga dodatkowo **nf-core tools 4.0.2**. +Jeśli używasz innej wersji narzędzi nf-core, możesz mieć trudności ze śledzeniem kursu. -MUSISZ uruchomić następujące polecenie przed dalszym postępowaniem: - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### Jeśli korzystasz ze środowiska lokalnego lub niestandardowego: - -Upewnij się, że używasz prawidłowych ustawień zgodnie z dokumentacją [tutaj](../info/nxf_versions.md). +Możesz sprawdzić, jaka wersja jest zainstalowana w Twoim środowisku, używając polecenia `nf-core --version`. -Szkolenie wymaga dodatkowo **nf-core tools 3.5.2**. -Jeśli używasz innej wersji narzędzi nf-core, możesz mieć trudności z śledzeniem kursu. +!!! warning "Zgodność z parserem v2" -Możesz sprawdzić, jaka wersja jest zainstalowana w Twoim środowisku, używając polecenia `nf-core --version`. + Wiele pipeline'ów nf-core nie obsługuje jeszcze parsera składni v2. + Jeśli uruchomisz pipeline nf-core inny niż te używane w tym kursie i napotkasz błędy, może być konieczne przełączenie się na parser v1 poprzez ustawienie `export NXF_SYNTAX_PARSER=v1`. + Szczegóły znajdziesz w [uwagach dotyczących wersji](../info/nxf_versions.md). ## Przygotuj się do pracy @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ Używamy takich zwijanych sekcji, aby w zwięzły sposób uwzględnić oczekiwan - **Plik `greetings.csv`** to plik CSV zawierający minimalne dane kolumnowe, których używamy do celów testowych. +- **Plik `custom.config`** to przykładowy plik konfiguracyjny Nextflow'a używany w Części 1 do demonstracji nadpisywania zasobów procesów oraz `ext.args`. + +- **Plik `malformed_samplesheet.csv`** to celowo uszkodzony samplesheet używany w Części 1 do demonstracji walidacji danych wejściowych. + +- **Plik `my_params.yml`** to przykładowy plik parametrów używany w Części 1 do demonstracji przekazywania parametrów boolean do pipeline'u. + - **Katalog `original-hello`** zawiera kopię kodu źródłowego powstałego w wyniku przejścia przez kompletną serię szkoleń Hello Nextflow (z włączonym Dockerem). - **Katalog `solutions`** zawiera ukończone skrypty workflow'ów, które powstają w wyniku każdego kroku kursu. @@ -112,7 +116,7 @@ Myślisz, że jesteś gotowy/gotowa do rozpoczęcia? - [ ] Rozumiem cel tego kursu i jego wymagania wstępne - [ ] Moje środowisko jest uruchomione i działa -- [ ] Upewniłem/upewniłam się, że parser składni jest ustawiony na **v1** +- [ ] Używam nf-core tools 4.0.2 (sprawdź poleceniem `nf-core --version`) - [ ] Ustawiłem/ustawiłam odpowiednio mój katalog roboczy Jeśli możesz zaznaczyć wszystkie pola, możesz zaczynać. diff --git a/docs/pl/docs/hello_nf-core/01_run_demo.md b/docs/pl/docs/hello_nf-core/01_run_demo.md index 9c53b5702d..7653a4296c 100644 --- a/docs/pl/docs/hello_nf-core/01_run_demo.md +++ b/docs/pl/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ Zakładka `Introduction` dostarcza przegląd pipeline'a, w tym wizualną repreze ![mapa metra pipeline'a](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. Przykładowa linia poleceń @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow wykonuje `pull` kodu pipeline'a, co oznacza, że pobiera całe repozytorium na Twój dysk lokalny. @@ -106,40 +107,73 @@ nextflow list Możesz spróbować pobrać kilka innych pipeline'ów, aby zobaczyć, jak są wyświetlane, gdy masz ich więcej niż jeden. -#### 1.2.3. Znajdź swoje pipeline'y w `$NXF_HOME/assets/` +#### 1.2.3. Znajdź miejsce, w którym pipeline został pobrany Zauważysz, że pliki nie znajdują się w Twoim bieżącym katalogu roboczym. -Domyślnie Nextflow zapisuje je w `$NXF_HOME/assets`. +Domyślnie Nextflow zapisuje pobrane pipeline'y w `$NXF_HOME/assets`. + +Aby dowiedzieć się, gdzie konkretny pipeline się znajduje, zapytaj Nextflow'a bezpośrednio: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "Wyjście polecenia" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "Uwaga" +!!! info "Info" Pełna ścieżka może się różnić w Twoim systemie, jeśli nie używasz naszego środowiska szkoleniowego. -Nextflow celowo trzyma pobrany kod źródłowy 'z dala od drogi' w oparciu o zasadę, że te pipeline'y powinny być używane bardziej jak biblioteki niż kod, z którym bezpośrednio współdziałasz. +Nextflow celowo trzyma pobrany kod źródłowy „z dala od drogi", wychodząc z założenia, że te pipeline'y powinny być używane bardziej jak biblioteki niż kod, z którym bezpośrednio współdziałasz. + +Pod spodem Nextflow przechowuje każdy pobrany pipeline jako repozytorium git w `$NXF_HOME/assets/.repos/`, a kod każdej rewizji wypakowuje do podkatalogu `clones//`. +Ponieważ `.repos` jest ukrytym katalogiem, zwykłe `tree -L 2 $NXF_HOME/assets/` będzie wyglądać na puste. #### 1.2.4. Utwórz dowiązanie symboliczne, aby łatwo uzyskać dostęp do kodu źródłowego Nie będziemy szczegółowo analizować kodu, ale rzućmy na niego okiem, aby zorientować się w ogólnej organizacji. -Aby ułatwić przeglądanie kodu źródłowego pipeline'a, utwórz dowiązanie symboliczne do katalogu assets: +Aby ułatwić przeglądanie kodu źródłowego pipeline'a, utwórz dowiązanie symboliczne wskazujące na wypakowną kopię pipeline'a: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -To tworzy skrót, który pozwala eksplorować kod za pomocą `tree -L 2 pipelines` lub otwierać pliki bezpośrednio. +To tworzy skrót, który pozwala eksplorować kod za pomocą `tree -L 2 pipelines/nf-core/demo` lub otwierać pliki bezpośrednio. #### 1.2.5. Przegląd organizacji kodu @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` Jak widać, dzieje się tam dużo, ale większości z tego nie musisz się martwić. @@ -211,7 +247,7 @@ Wygodnie, każdy pipeline nf-core jest dostarczany z profilem testowym. Jest to minimalny zestaw ustawień konfiguracyjnych dla pipeline'a do uruchomienia z użyciem małego zestawu danych testowych hostowanego w repozytorium [nf-core/test-datasets](https://github.com/nf-core/test-datasets). To świetny sposób, aby szybko wypróbować pipeline na małą skalę. -!!! note "Uwaga" +!!! tip "Wskazówka" System profili konfiguracyjnych Nextflow pozwala łatwo przełączać się między różnymi silnikami kontenerów lub środowiskami wykonawczymi. Aby uzyskać więcej szczegółów, zobacz [Hello Nextflow Część 6: Konfiguracja](../hello_nextflow/06_hello_config.md). @@ -220,10 +256,10 @@ To świetny sposób, aby szybko wypróbować pipeline na małą skalę. Dobrą praktyką jest sprawdzenie, co określa profil testowy pipeline'a przed jego uruchomieniem. Profil `test` dla `nf-core/demo` znajduje się w pliku konfiguracyjnym `conf/test.config`. -Możesz go znaleźć lokalnie w kodzie źródłowym pipeline'a pobranym przez `nextflow pull`: +Możesz go znaleźć lokalnie w kodzie źródłowym pipeline'a pobranym przez `nextflow pull`, korzystając z dowiązania symbolicznego `pipelines` utworzonego w sekcji 1.2.4: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` Oto zawartość tego pliku: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Dane wejściowe - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` Nazywa się to samplesheet i jest to najczęstsza forma wejścia do pipeline'ów nf-core. +Nie martw się, jeśli nie jesteś zaznajomiony z formatami i typami danych — nie jest to ważne dla tego, co następuje. -!!! note "Uwaga" - - Nie martw się, jeśli nie jesteś zaznajomiony z formatami i typami danych, nie jest to ważne dla tego, co następuje. - -Więc potwierdza to, że mamy wszystko, czego potrzebujemy, aby wypróbować pipeline. +Mamy teraz wszystko, czego potrzebujemy, aby wypróbować pipeline. ### 2.2. Uruchom pipeline -Zdecydujmy się użyć Docker dla systemu kontenerów i `demo-results` jako katalogu wyjściowego, i jesteśmy gotowi do uruchomienia polecenia testowego: +Jak wspomniano powyżej, możemy użyć przykładowego polecenia testowego niemal bez zmian — wystarczy określić, jakiego systemu pakowania oprogramowania użyć, i podać nazwę katalogu wyjściowego. +Użyjemy Docker jako systemu kontenerów i `demo-results` jako nazwy katalogu. + +Możemy więc uruchomić polecenie testowe: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ Jeśli Twoje wyjście pasuje do tego, gratulacje! Właśnie uruchomiłeś Swój Zauważysz, że jest znacznie więcej wyjścia konsoli niż podczas uruchamiania podstawowego pipeline'a Nextflow. Jest nagłówek, który zawiera podsumowanie wersji pipeline'a, wejść i wyjść oraz kilku elementów konfiguracji. -!!! note "Uwaga" +!!! info "Info" Twoje wyjście pokaże różne znaczniki czasu, nazwy wykonań i ścieżki plików, ale ogólna struktura i wykonanie procesów powinny być podobne. Zwróć uwagę na linię blisko początku wyjścia: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` Mówi ona, która rewizja pipeline'a została użyta. @@ -379,7 +417,7 @@ Ponieważ nie określiliśmy wersji, Nextflow użył najnowszego commitu na gał Aby zapewnić powtarzalność uruchomień, powinieneś przypiąć konkretne wydanie za pomocą flagi `-r`: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` Gwarantuje to, że za każdym razem używany jest ten sam kod pipeline'a, niezależnie od nowych commitów czy wydań. @@ -388,14 +426,15 @@ W tym szkoleniu pomijamy `-r` dla uproszczenia, ale w środowisku produkcyjnym z Przechodząc do wyjścia wykonania, spójrzmy na linie, które mówią nam, jakie procesy zostały uruchomione: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -To mówi nam, że zostały uruchomione trzy procesy, odpowiadające trzem narzędziom pokazanym na stronie dokumentacji pipeline'a na stronie nf-core: FASTQC, SEQTK_TRIM i MULTIQC. +To mówi nam, że zostały uruchomione cztery procesy, odpowiadające czterem narzędziom pokazanym na stronie dokumentacji pipeline'a na stronie nf-core: `FASTQC`, `SEQTK_TRIM`, `MULTIQC` i `COWPY`. Pełne nazwy procesów, jak pokazano tutaj, takie jak `NFCORE_DEMO:DEMO:MULTIQC`, są dłuższe niż to, co mogłeś zobaczyć we wstępnym materiale Hello Nextflow. Zawierają one nazwy ich workflow'ów nadrzędnych i odzwierciedlają modularność kodu pipeline'a. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` To może wydawać się dużo. -Aby dowiedzieć się więcej o wyjściach pipeline'a `nf-core/demo`, sprawdź jego [stronę dokumentacji](https://nf-co.re/demo/1.1.0/docs/output/). +Aby dowiedzieć się więcej o wyjściach pipeline'a `nf-core/demo`, sprawdź jego [stronę dokumentacji](https://nf-co.re/demo/1.2.0/docs/output/). Na tym etapie ważne jest zaobserwowanie, że wyniki są zorganizowane według modułu, a dodatkowo istnieje katalog o nazwie `pipeline_info` zawierający różne raporty z datami dotyczące wykonania pipeline'a. @@ -443,7 +485,7 @@ Na przykład plik `execution_timeline_*` pokazuje, jakie procesy zostały urucho ![raport osi czasu wykonania](./img/execution_timeline.png) -!!! note "Uwaga" +!!! info "Info" Tutaj zadania nie zostały uruchomione równolegle, ponieważ działamy na minimalistycznej maszynie w Github Codespaces. Aby zobaczyć ich równoległe uruchomienie, spróbuj zwiększyć alokację CPU Swojego codespace i limity zasobów w konfiguracji testowej. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,24 +596,98 @@ W zwykłych pipeline'ach Nextflow `--help` działa tylko wtedy, gdy deweloper za Jak omówiono w [Hello Config](../hello_nextflow/06_hello_config.md), możesz ustawiać wartości parametrów w wierszu poleceń za pomocą `--nazwa_parametru` lub zebrać zestaw parametrów w pliku YAML i przekazać go za pomocą `-params-file`. Oba podejścia działają tak samo z pipeline'ami nf-core. -Na przykład, aby pominąć krok przycinania: +Na przykład, aby pominąć krok przycinania, chcemy ustawić parametr boolean `skip_trim` na `true`. +W Twoim katalogu roboczym znajduje się plik parametrów `my_params.yml` z już ustawioną tą wartością: + +```yaml title="my_params.yml" +skip_trim: true +``` + +Przekaż go za pomocą `-params-file`: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "Wyjście polecenia" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` Proces `SEQTK_TRIM` nie pojawia się już w wyjściu. -!!! info "Info" +!!! warning "Ważne ograniczenia dotyczące parametrów wejściowych" + + **Ustawianie parametrów boolean w wierszu poleceń** + + Począwszy od wersji Nextflow 26.04, wszystkie wartości podawane w wierszu poleceń są traktowane jako string. + W przypadku parametru boolean takiego jak `skip_trim`, przekazanie go jako samodzielnej flagi (`--skip_trim`) lub jako `--skip_trim true` jest interpretowane jako **string** `"true"`, co nie przechodzi walidacji schematu: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + Aby ustawić parametr boolean na prawdziwą wartość `true`/`false`, użyj `-params-file` jak pokazano powyżej lub ustaw go w pliku konfiguracyjnym. + Parametry typu string, integer i ścieżki plików nie są tym dotknięte i nadal można je ustawiać bezpośrednio w wierszu poleceń. + W tym kursie ten wzorzec jest stosowany konsekwentnie dla parametrów boolean. + + **Używanie niestandardowych plików konfiguracyjnych** Choć technicznie możliwe jest ustawianie parametrów pipeline'a w niestandardowym pliku konfiguracyjnym przekazywanym za pomocą `-c`, może to nie nadpisywać wartości domyślnych już ustawionych w pliku `nextflow.config` pipeline'a, w zależności od reguł pierwszeństwa konfiguracji Nextflow. Użycie `--nazwa_parametru` w wierszu poleceń lub `-params-file` jest bardziej niezawodne, ponieważ te zawsze mają pierwszeństwo. @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` Pipeline nadal działa, ale ostrzeżenie natychmiast informuje Cię, że `--foobar` nie jest rozpoznanym parametrem. -Wyłapuje to literówki, takie jak `--outDir` zamiast `--outdir`, zanim zmarnujesz czas obliczeniowy zastanawiając się, dlaczego wyjście trafiło w złe miejsce. +Ma to zwrócić Twoją uwagę na literówki, które nie powodują błędu, jak użycie `--outDir` zamiast `--outdir` — co może pomóc uniknąć marnowania czasu i zasobów obliczeniowych. ##### 3.1.3.2. Nieprawidłowe wartości parametrów @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` Pipeline zatrzymuje się przed uruchomieniem jakichkolwiek procesów, oszczędzając Cię przed nieudanym lub nieprawidłowym wykonaniem. -Parametry boolean powinny być przekazywane jako flagi (`--skip_trim`) bez wartości lub ustawiane na `true`/`false` w pliku parametrów. +Jak wspomniano w sekcji 3.1.2, parametry boolean powinny być ustawiane na prawdziwą wartość `true`/`false` w pliku parametrów, a nie przekazywane w wierszu poleceń, ponieważ wartości z wiersza poleceń są traktowane jako string. #### 3.1.4. Walidacja wejścia @@ -637,7 +756,7 @@ Omawiamy to również bardziej szczegółowo w [Części 5: Walidacja wejścia]( Pipeline `nf-core/demo` oczekuje pliku CSV z kolumnami `sample`, `fastq_1` i `fastq_2`. Jest to zdefiniowane w pliku schematu (`assets/schema_input.json`), który określa oczekiwaną strukturę, typy kolumn i ograniczenia. -??? abstract "assets/schema_input.json" +??? abstract "Plik schematu dla wejść" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Jest to zdefiniowane w pliku schematu (`assets/schema_input.json`), który okre Schemat określa, że `sample` i `fastq_1` są wymagane, podczas gdy `fastq_2` jest opcjonalne (obsługując zarówno dane paired-end, jak i single-end). Ścieżki plików są walidowane pod kątem istnienia i wzorca rozszerzenia. -##### 3.1.4.1. Utwórz nieprawidłowy samplesheet - -Utwórz samplesheet z brakującą kolumną i nieistniejącą ścieżką pliku: +Aby to zademonstrować, w Twoim katalogu roboczym znajduje się nieprawidłowy samplesheet o nazwie `malformed_samplesheet.csv`: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` Ten samplesheet nie ma wymaganej kolumny `fastq_1` i zawiera nieistniejącą ścieżkę pliku w `fastq_2`. -Oba problemy spowodują błędy walidacji w następnym kroku. - -##### 3.1.4.2. Uruchom pipeline demo z nieprawidłowym samplesheet'em -Uruchom pipeline demo używając `malformed_samplesheet.csv` jako wejścia. +Uruchom pipeline demo używając `malformed_samplesheet.csv` jako wejścia: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -725,14 +840,27 @@ Pipeline'y nf-core zawierają domyślną konfigurację w `nextflow.config` i kat Przed nadpisaniem czegokolwiek warto wiedzieć, gdzie znajdują się wartości domyślne. Widziałeś już w sekcji 2.1, że kod źródłowy pipeline'a znajduje się w `$NXF_HOME/assets`. -Wylistuj pliki konfiguracyjne, aby zobaczyć, co jest dostępne: +Korzystając z dowiązania symbolicznego `pipelines` z sekcji 1.2.4, wylistuj pliki konfiguracyjne, aby zobaczyć, co jest dostępne: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ Jeśli chcesz zmodyfikować którekolwiek z ustawień określonych w tych plikac Zamiast tego utwórz własny plik konfiguracyjny i przekaż go za pomocą `-c`. Wartości, które określisz, nadpiszą wartości domyślne ustawione w tych innych plikach. -Przejdźmy przez kilka ćwiczeń, aby zrobić to w praktyce. +Wypróbujmy to w praktyce. -#### 3.2.1. Zmień alokację zasobów dla procesu +#### 3.2.1. Dostosuj zasoby procesów i argumenty narzędzi -Pipeline demo przypisuje zasoby za pomocą etykiet zdefiniowanych w `base.config`. -Na przykład `FASTQC` używa etykiety `process_medium`, która przydziela 6 procesorów i 36 GB pamięci. +Moduły nf-core obsługują dwa popularne typy nadpisań konfiguracji: **alokację zasobów** (procesory, pamięć, czas) oraz **argumenty narzędzi** przez `ext.args`. -Profil testowy ogranicza zasoby za pomocą `resourceLimits`, ale możesz również nadpisać zasoby dla konkretnych procesów. +Wiele narzędzi wiersza poleceń ma argumenty, które nie są wystarczająco często używane, aby być udostępniane jako parametry pipeline'a. +Konwencja `ext.args` pozwala przekazywać te argumenty do bazowego narzędzia przez plik konfiguracyjny. -Utwórz plik o nazwie `custom.config`: +Plik `custom.config` dostarczony w Twoim katalogu roboczym demonstruje oba typy nadpisań: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -Uruchom pipeline z Twoją niestandardową konfiguracją: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "Wyjście polecenia" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -Flaga `-c` dodaje Twoją konfigurację na wierzch wbudowanej konfiguracji pipeline'a. - -#### 3.2.2. Ustaw wartości argumentów narzędzi za pomocą `ext.args` - -Wiele narzędzi wiersza poleceń ma argumenty, które nie są wymagane i dlatego nie są konfigurowane jako parametry pipeline'a, chyba że są bardzo często używane. -Dla tych argumentów narzędzi moduły nf-core używają konwencji Nextflow o nazwie `ext.args`, aby przekazywać argumenty do bazowego narzędzia przez plik konfiguracyjny. - -Na przykład dodajmy argument przycinania do modułu `SEQTK_TRIM` za pomocą `ext.args`. - -##### 3.2.2.1. Zaktualizuj niestandardową konfigurację - -Zaktualizuj swój plik `custom.config`: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -To mówi `seqtk trimfq`, aby przyciął 5 zasad od początku każdego odczytu, oprócz przycinania jakościowego. +Pierwszy blok nadpisuje alokację zasobów dla `FASTQC`. +Domyślnie `FASTQC` używa etykiety `process_medium` z `base.config`, która przydziela 6 procesorów i 36 GB pamięci; tutaj ograniczamy go do 2 procesorów i 4 GB. -##### 3.2.2.2. Uruchom pipeline +Drugi blok przekazuje dodatkowy argument do `SEQTK_TRIM` przez `ext.args`. +Flaga `-b 5` mówi `seqtk trimfq`, aby przyciął 5 zasad od początku każdego odczytu, oprócz przycinania jakościowego. -Uruchom pipeline ponownie z tą konfiguracją, aby zobaczyć efekt: +Uruchom pipeline z tą konfiguracją: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "Wyjście polecenia" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Aby zweryfikować, że argument został zastosowany, znajdź hash katalogu roboczego `SEQTK_TRIM` z wyjścia uruchomienia (np. `work/ab/cd1234...`) i sprawdź plik `.command.sh` w jego wnętrzu: +Flaga `-c` dodaje Twoją konfigurację na wierzch wbudowanej konfiguracji pipeline'a. + +Aby zweryfikować, że nadpisanie `ext.args` zadziałało, znajdź hash katalogu roboczego `SEQTK_TRIM` z wyjścia uruchomienia (np. `work/17/428668...`) i sprawdź plik `.command.sh` w jego wnętrzu: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "Wyjście polecenia" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` -Powinieneś zobaczyć `-b 5` w poleceniu `seqtk trimfq`, co potwierdza, że Twoje nadpisanie `ext.args` zadziałało. +Powinieneś zobaczyć `-b 5` w poleceniu `seqtk trimfq`. -##### 3.2.2.3. Nadpisywanie wartości domyślnych - -Niektóre moduły mają już domyślnie ustawione `ext.args`. -Na przykład moduł `FASTQC` jest domyślnie skonfigurowany z `ext.args = '--quiet'` (zdefiniowanym w `conf/modules.config`). +Ważna rzecz dotycząca `ext.args`: jeśli moduł ma już ustawioną domyślną wartość, Twoja wartość **całkowicie ją zastąpi**, a nie dołączy do niej. +Na przykład `FASTQC` ma domyślnie ustawione `ext.args = '--quiet'` w `conf/modules.config`: ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -Jeśli podasz wartość dla `ext.args` przez niestandardowy plik konfiguracyjny, ta wartość całkowicie zastąpi wartość domyślną ustawioną dla tego procesu. - -Tak więc na przykład, jeśli wartość domyślna to `'--quiet'` i ustawisz `ext.args = '--kmers 8'`, flaga `--quiet` nie będzie już stosowana. +Jeśli ustawisz `ext.args = '--kmers 8'` dla `FASTQC`, flaga `--quiet` nie będzie już stosowana. Aby zachować obie, ustaw `ext.args = '--quiet --kmers 8'`. -Oznacza to, że jesteś odpowiedzialny za sprawdzenie, jaka jest domyślna konfiguracja narzędzi, do których chcesz dostarczyć wartości argumentów za pomocą `ext.args`. +Przed nadpisaniem `ext.args` zawsze powinieneś sprawdzić domyślną konfigurację danego modułu. ### Podsumowanie @@ -878,4 +976,6 @@ Wiesz, jak uzyskać pomoc od pipeline'a nf-core, ustawiać parametry i rozumieć ### Co dalej? -Zrób sobie przerwę! Gdy będziesz gotowy, przejdź do Części 2, gdzie stworzysz własny pipeline kompatybilny z nf-core od podstaw. +Jeśli chcesz tylko uruchamiać pipeline'y nf-core, to już wszystko! + +Jeśli chcesz nauczyć się tworzyć własne pipeline'y zgodne ze standardami nf-core, zrób sobie przerwę, a gdy będziesz gotowy, przejdź do Części 2. Nauczysz się tam tworzyć własny pipeline kompatybilny z nf-core przy użyciu narzędzi opartych na szablonach nf-core. diff --git a/docs/pl/docs/hello_nf-core/02_rewrite_hello.md b/docs/pl/docs/hello_nf-core/02_rewrite_hello.md index 8202710e7c..7d9b8c048c 100644 --- a/docs/pl/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/pl/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Jeśli nie znasz pipeline'u Hello lub potrzebujesz przypomnienia, zobacz [tę st - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "Uwaga" - - Upewnij się, że znajdujesz się w katalogu `hello-nf-core` w Swoim terminalu. - --- ## 1. Zbadanie struktury kodu pipeline'u @@ -30,6 +26,7 @@ Projekt nf-core narzuca ścisłe wytyczne dotyczące struktury pipeline'ów oraz Zanim przystąpimy do tworzenia pipeline'u, musimy zrozumieć tę strukturę i organizację. Przyjrzyjmy się więc, jak kod pipeline'u jest zorganizowany w repozytorium `nf-core/demo`, używając dowiązania symbolicznego `pipelines` utworzonego w Części 1. +Upewnij się, że znajdujesz się w katalogu `hello-nf-core` w Swoim terminalu. Dla przypomnienia: możesz użyć polecenia `tree` lub eksploratora plików, aby znaleźć i otworzyć katalog `nf-core/demo`. @@ -82,7 +79,7 @@ Oto jak wyglądają relacje między odpowiednimi komponentami kodu: Nienazwany workflow w `main.nf` nazywany jest skryptem _punktu wejścia_. Pełni rolę otoczki dla dwóch rodzajów zagnieżdżonych workflow'ów: workflow'u `DEMO` zawierającego właściwą logikę analizy, znajdującego się w `workflows/demo.nf`, oraz zestawu workflow'ów porządkowych zlokalizowanych w `subworkflows/`. Workflow `demo.nf` wywołuje **moduły** znajdujące się w `modules/`; zawierają one **procesy**, które wykonują właściwe kroki analizy. -!!! note "Uwaga" +!!! info "Info" Subworkflow'y nie są ograniczone do funkcji porządkowych i mogą korzystać z modułów procesów. @@ -107,7 +104,7 @@ Omówimy istotne różnice w następnej części tego kursu, gdy zajmiemy się k Workflow `demo.nf` wywołuje **moduły** znajdujące się w `modules/`, które omówimy poniżej. -!!! note "Uwaga" +!!! info "Info" Niektóre workflow'y analizy nf-core wykazują dodatkowe poziomy zagnieżdżenia poprzez wywoływanie subworkflow'ów niższego poziomu. Służy to głównie do łączenia dwóch lub więcej modułów, które są często używane razem, w łatwo wielokrotnego użytku segmenty pipeline'u. @@ -266,13 +263,20 @@ Po zamknięciu TUI powinieneś zobaczyć następujące wyjście konsoli. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -W wyjściu konsoli nie ma wyraźnego potwierdzenia, że utworzenie pipeline'u się powiodło, ale powinieneś zobaczyć nowy katalog o nazwie `core-hello`. +Po zakończeniu działania TUI narzędzie informuje, że utworzyło pipeline i wygenerowało jego konfigurację kontenerów: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +Powinieneś teraz zobaczyć nowy katalog o nazwie `core-hello`. Wyświetl zawartość nowego katalogu, aby zobaczyć, ile pracy zaoszczędziłeś używając szablonu. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "Zawartość katalogu" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` To dużo plików! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +Linie `WARN: Unrecognized config option 'validation.*'` pochodzą z wersji wtyczki nf-schema przypiętej w świeżo utworzonym szablonie. +Są nieszkodliwe i nie wpływają na przebieg uruchomienia. + To pokazuje, że całe podstawowe okablowanie jest na miejscu. Gdzie więc są wyniki? Czy w ogóle jakieś są? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -434,7 +445,7 @@ Przyjrzyjmy się bliżej. Pełni on rolę zastępnika dla naszego workflow'u analizy, z niektórymi funkcjami nf-core już na miejscu. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -453,14 +464,16 @@ workflow HELLO { take: ch_samplesheet // kanał: samplesheet wczytany z --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Zbierz i zapisz wersje oprogramowania // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -477,19 +490,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // kanał: [ path(versions.yml) ] - } /* @@ -502,15 +512,15 @@ workflow HELLO { W porównaniu do podstawowego workflow'u Nextflow'a, takiego jak ten opracowany w [Hello Nextflow](../hello_nextflow/index.md), zauważysz kilka nowych rzeczy (podświetlone linie powyżej): - Blok **workflow** ma nazwę -- Wejścia workflow'u są deklarowane za pomocą słowa kluczowego `take:`, a konstrukcja kanału jest przenoszona do workflow'u nadrzędnego +- Wejścia workflow'u są deklarowane za pomocą słowa kluczowego `take:` (tutaj kanał samplesheet i katalog wyjściowy), a konstrukcja kanału jest przenoszona do workflow'u nadrzędnego - Zawartość workflow'u jest umieszczona w bloku `main:` - Wyjścia są deklarowane za pomocą słowa kluczowego `emit:` Są to opcjonalne funkcje Nextflow'a, które sprawiają, że workflow jest **kompozycyjny**, co oznacza, że może być wywoływany z innego workflow'u. -??? note "Blok `Channel.topic`" +??? note "Blok `channel.topic`" - Być może zauważyłeś blok `def topic_versions = Channel.topic("versions")` zaczynający się od linii 17. + Być może zauważyłeś blok `def topic_versions = channel.topic("versions")` zaczynający się od linii 28. Jest to standardowy kod porządkowy, który automatycznie zbiera informacje o wersjach oprogramowania ze wszystkich modułów. nf-core wdraża ten mechanizm we wszystkich pipeline'ach w 2026 roku, więc znajdziesz go we wszystkich nowych pipeline'ach. Część 4 tego kursu szczegółowo wyjaśnia, jak działa. @@ -574,15 +584,15 @@ nextflow run original-hello/hello.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` Jeśli to działa, możesz zacząć wprowadzać zmiany. @@ -703,7 +713,7 @@ Skoro już przy tym jesteśmy, możemy również zakomentować linię `params.gr params.character = 'turkey' ``` -!!! note "Uwaga" +!!! info "Info" Jeśli masz zainstalowane rozszerzenie serwera języka Nextflow, sprawdzanie składni podświetli Twój kod czerwonymi falkami. Dzieje się tak, ponieważ jeśli umieścisz instrukcję `take:`, musisz również mieć `main:`. @@ -850,7 +860,7 @@ Są tutaj dwie ważne obserwacje: - Sposób wywoływania zaimportowanego workflow'u jest zasadniczo taki sam jak w przypadku modułów. - Wszystko, co jest związane z wprowadzaniem wejść (parametr wejściowy i konstrukcja kanału) jest teraz zadeklarowane w nadrzędnym skrypcie. -!!! note "Uwaga" +!!! info "Info" Nazwanie pliku workflow'u punktu wejścia `main.nf` jest konwencją, a nie wymogiem. @@ -877,19 +887,19 @@ Jeśli wykonałeś wszystkie zmiany poprawnie, powinno to uruchomić się do ko ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -To oznacza, że pomyślnie zaktualizowaliśmy nasz workflow HELLO, aby był kompozycyjny. +To oznacza, że pomyślnie zaktualizowaliśmy nasz workflow `HELLO`, aby był kompozycyjny. ### Podsumowanie @@ -931,14 +941,16 @@ workflow HELLO { take: ch_samplesheet // kanał: samplesheet wczytany z --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Zbierz i zapisz wersje oprogramowania // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -955,19 +967,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // kanał: [ path(versions.yml) ] - } /* @@ -977,8 +986,8 @@ workflow HELLO { */ ``` -Podświetlone linie definiują strukturę kompozycyjnego workflow'u: `workflow HELLO {`, `take:`, `main:` i `emit:`. -Duży blok między liniami 17–34 jest bardziej rozbudowany: obsługuje przechwytywanie wersji oprogramowania przy użyciu topic channels — mechanizmu, który nf-core wdraża we wszystkich pipeline'ach w 2026 roku. +To jest struktura kompozycyjnego workflow'u: nazwany blok `workflow HELLO {` z sekcjami `take:`, `main:` i `emit:`. +Blok pod `// Collate and save software versions` jest bardziej rozbudowany: obsługuje przechwytywanie wersji oprogramowania przy użyciu topic channels — mechanizmu, który nf-core wdraża we wszystkich pipeline'ach w 2026 roku. Wyjaśnimy go w Części 4; na razie traktuj go jako standardowy kod, który możesz pozostawić bez zmian. Musimy dodać odpowiednią logikę z kompozycyjnej wersji oryginalnego workflow'u, który opracowaliśmy w sekcji 2. @@ -990,7 +999,7 @@ Zamierzamy zająć się tym w następujących etapach: 3. Dodanie logiki workflow'u do bloku `main` 4. Aktualizacja bloku `emit` -!!! note "Uwaga" +!!! info "Info" Na razie zignorujemy blok przechwytywania wersji. Część 4 wyjaśnia, jak działa. @@ -1078,9 +1087,10 @@ Jeszcze dwie interesujące obserwacje: Projekt nf-core ma wiele wbudowanych funkcji związanych z koncepcją samplesheet, który jest zazwyczaj plikiem CSV zawierającym dane kolumnowe. Ponieważ to jest zasadniczo tym, czym jest nasz plik `greetings.csv`, zachowamy obecną deklarację `take` bez zmian i po prostu zaktualizujemy nazwę kanału wejściowego w następnym kroku. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // kanał: samplesheet wczytany z --input + outdir ``` Obsługa wejścia będzie wykonywana przed tym workflow'iem (nie w tym pliku kodu). @@ -1110,20 +1120,21 @@ Przypominamy, że to jest odpowiedni kod w oryginalnym workflow'ie, który nie z Musimy skopiować kod, który następuje po `main:` do nowej wersji workflow'u. Jest tam już fragment związany z przechwytywaniem wersji uruchamianych narzędzi. Na razie zostawimy to w spokoju (zajmiemy się tym później). -Zachowamy inicjalizację `ch_versions = channel.empty()` na górze, następnie wstawimy naszą logikę, zachowując zestawianie wersji na końcu. +Zachowamy inicjalizację `def ch_versions = channel.empty()` na górze, następnie wstawimy naszą logikę, zachowując zestawianie wersji na końcu. Ta kolejność ma sens, ponieważ w prawdziwym projekcie procesy emitowałyby informacje o wersjach, które byłyby dodawane do kanału `ch_versions` podczas uruchamiania. === "Po" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // kanał: samplesheet wczytany z --input + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // wyemituj powitanie sayHello(greeting_ch) @@ -1140,7 +1151,7 @@ Ta kolejność ma sens, ponieważ w prawdziwym projekcie procesy emitowałyby in // // Zbierz i zapisz wersje oprogramowania // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1157,37 +1168,36 @@ Ta kolejność ma sens, ponieważ w prawdziwym projekcie procesy emitowałyby in "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // kanał: [ path(versions.yml) ] - } ``` === "Przed" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // kanał: samplesheet wczytany z --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Zbierz i zapisz wersje oprogramowania // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1204,36 +1214,31 @@ Ta kolejność ma sens, ponieważ w prawdziwym projekcie procesy emitowałyby in "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // kanał: [ path(versions.yml) ] - } ``` -Zauważysz, że dodaliśmy również pustą linię przed `main:`, aby kod był bardziej czytelny. - To wygląda świetnie, ale nadal musimy zaktualizować nazwę kanału, który przekazujemy do procesu `sayHello()` z `greeting_ch` na `ch_samplesheet`, jak pokazano poniżej, aby pasowała do tego, co jest napisane pod słowem kluczowym `take:`. === "Po" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // wyemituj powitanie (zaktualizowane do używania konwencji nf-core dla samplesheet) sayHello(ch_samplesheet) ``` === "Przed" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // wyemituj powitanie sayHello(greeting_ch) ``` @@ -1246,7 +1251,7 @@ Na koniec musimy zaktualizować blok `emit`, aby uwzględnić deklarację końco === "Po" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // kanał: [ path(versions.yml) ] @@ -1254,12 +1259,12 @@ Na koniec musimy zaktualizować blok `emit`, aby uwzględnić deklarację końco === "Przed" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // kanał: [ path(versions.yml) ] ``` -To kończy modyfikacje, które musimy wprowadzić do samego workflow'u HELLO. +To kończy modyfikacje, które musimy wprowadzić do samego workflow'u `HELLO`. W tym momencie osiągnęliśmy ogólną strukturę kodu, którą zamierzaliśmy wdrożyć. ### Podsumowanie @@ -1323,7 +1328,8 @@ workflow CORE_HELLO { // WORKFLOW: Uruchom pipeline // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1360,7 +1366,6 @@ workflow { // SUBWORKFLOW: Uruchom zadania końcowe // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1376,7 +1381,7 @@ Projekt nf-core intensywnie wykorzystuje zagnieżdżone subworkflow'y, więc ta To, co tutaj ma znaczenie, to fakt, że zdefiniowane są dwa workflow'y: -- `CORE_HELLO` to cienka otoczka do uruchamiania workflow'u HELLO, który właśnie zakończyliśmy adaptować w `core-hello/workflows/hello.nf`. +- `CORE_HELLO` to cienka otoczka do uruchamiania workflow'u `HELLO`, który właśnie zakończyliśmy adaptować w `core-hello/workflows/hello.nf`. - Nienazwany workflow, który wywołuje `CORE_HELLO` oraz dwa inne subworkflow'y: `PIPELINE_INITIALISATION` i `PIPELINE_COMPLETION`. Oto diagram pokazujący, jak się do siebie odnoszą: @@ -1421,9 +1426,9 @@ Jeśli otworzymy ten plik i przewiniemy w dół, natrafimy na ten fragment kodu: versions = ch_versions ``` -To jest fabryka kanałów, która parsuje samplesheet i przekazuje go dalej w formie gotowej do użycia przez workflow HELLO. +To jest fabryka kanałów, która parsuje samplesheet i przekazuje go dalej w formie gotowej do użycia przez workflow `HELLO`. -!!! note "Uwaga" +!!! info "Info" Składnia powyżej różni się nieco od tego, czego używaliśmy wcześniej, ale zasadniczo: @@ -1532,7 +1537,7 @@ Teraz możemy zaktualizować plik `test.config` w następujący sposób: === "Po" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1594,13 +1599,53 @@ Skoro już przy tym jesteśmy, zaostrzmy domyślne limity zasobów, aby upewnić To kończy modyfikacje kodu, które musimy wykonać. -### 5.4. Uruchomienie pipeline'u z profilem testowym +### 5.4. Wyłączenie walidacji parametrów + +Zastąpiliśmy szablonowe parsowanie samplesheet własną prostą konstrukcją kanału, ale szablon nadal zawiera pliki `nextflow_schema.json` i `assets/schema_input.json` opisujące samplesheet oparty na plikach FASTQ. +Ponieważ nie dostosowaliśmy jeszcze tych schematów do formatu naszego pliku `greetings.csv`, musimy na razie wyłączyć walidację parametrów (skonfigurujemy ją poprawnie później). + +Otwórz plik `core-hello/nextflow.config` i ustaw `validate_params` na `false`: + +=== "Po" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "Przed" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +Ustawiamy to w pliku konfiguracyjnym, a nie w wierszu poleceń, ponieważ począwszy od Nextflow w wersji 26.04 wszystkie wartości podawane w wierszu poleceń są traktowane jako ciągi znaków. +W związku z tym parametry logiczne muszą być ustawiane w pliku konfiguracyjnym lub w pliku `-params-file`, aby przyjąć rzeczywistą wartość `true`/`false`. + +Na przykład użycie `--validate_params false` w tym miejscu zostałoby zinterpretowane jako **ciąg znaków** `"false"`, co pozostawiłoby walidację włączoną. + +!!! tip "Linie zgodności parsera v2 w `nextflow.config`" + + Skoro mowa o składni v2, możesz zauważyć te dwie linie tuż poniżej bloku `params` w pliku konfiguracyjnym: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + Są one wymagane dla zgodności z parserem składni v2. + + - W składni v2 zmienne `params.*` nie mogą być bezpośrednio przywoływane wewnątrz dyrektyw `publishDir` w modułach procesów, dlatego `outputDir` jest tutaj zdefiniowany jako zmienna konfiguracyjna najwyższego poziomu, do której te dyrektywy mogą się odwoływać. + + - `workflow.output.mode` ustawia domyślny tryb publikowania dla bloku wyjściowego workflow'u w składni v2. + + Obie zmienne są generowane automatycznie przez szablon pipeline'u nf-core i nie wymagają modyfikacji. + +### 5.5. Uruchomienie pipeline'u z profilem testowym To było dużo, ale w końcu możemy spróbować uruchomić pipeline! -Zauważ, że musimy dodać `--validate_params false` do wiersza poleceń, ponieważ nie skonfigurowaliśmy jeszcze walidacji (to przyjdzie później). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` Jeśli wykonałeś wszystkie modyfikacje poprawnie, powinno to uruchomić się do końca. @@ -1608,9 +1653,9 @@ Jeśli wykonałeś wszystkie modyfikacje poprawnie, powinno to uruchomić się d ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1622,10 +1667,10 @@ Jeśli wykonałeś wszystkie modyfikacje poprawnie, powinno to uruchomić się d Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1636,17 +1681,17 @@ Jeśli wykonałeś wszystkie modyfikacje poprawnie, powinno to uruchomić się d !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -Jak widać, wygenerowało to typowe podsumowanie nf-core na początku dzięki subworkflow'owi inicjalizacji, a linie dla każdego modułu teraz pokazują pełne nazwy PIPELINE:WORKFLOW:moduł. +Jak widać, wygenerowało to typowe podsumowanie nf-core na początku dzięki subworkflow'owi inicjalizacji, a linie dla każdego modułu teraz pokazują pełne nazwy `PIPELINE:WORKFLOW:moduł`. -### 5.5. Znalezienie wyników pipeline'u +### 5.6. Znalezienie wyników pipeline'u Pytanie brzmi teraz: gdzie są wyniki pipeline'u? A odpowiedź jest dość interesująca: są teraz dwa różne miejsca, w których należy szukać wyników. @@ -1662,17 +1707,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1682,7 +1727,7 @@ Tym razem widać wszystkie zadania, które zostały uruchomione zgodnie z oczeki ![raport osi czasu wykonania dla pipeline'u Hello](./img/execution_timeline_hello.png) -!!! note "Uwaga" +!!! info "Info" Ponownie zadania nie były uruchamiane równolegle, ponieważ działamy na minimalistycznej maszynie w Github Codespaces. Aby zobaczyć, jak te uruchamiają się równolegle, spróbuj zwiększyć alokację CPU Swojego codespace oraz limity zasobów w konfiguracji testowej. diff --git a/docs/pl/docs/hello_nf-core/03_use_module.md b/docs/pl/docs/hello_nf-core/03_use_module.md index 01fe0e9d6c..4a5d7844f2 100644 --- a/docs/pl/docs/hello_nf-core/03_use_module.md +++ b/docs/pl/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ Aby pokazać, jak to działa, zastąpimy niestandardowy moduł `collectGreetings Możesz sprawdzić, czy działa poprawnie, uruchamiając następujące polecenie: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ Przejdź do strony modułów w Swojej przeglądarce internetowej i użyj paska w Jak widać, jest sporo wyników, wiele z nich to moduły zaprojektowane do łączenia bardzo specyficznych typów plików. Wśród nich powinieneś zobaczyć jeden o nazwie `find_concatenate`, który jest ogólnego przeznaczenia. -!!! note "Konwencja nazewnictwa modułów" +!!! info "Konwencja nazewnictwa modułów" Podkreślenie (`_`) jest używane jako zastępnik znaku ukośnika (`/`) w nazwach modułów. @@ -120,9 +120,11 @@ To wyświetla dokumentację modułu, w tym jego wejścia, wyjścia i podstawowe | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ To wyświetla dokumentację modułu, w tym jego wejścia, wyjścia i podstawowe To są dokładnie te same informacje, które możesz znaleźć na stronie internetowej. +Możesz zignorować komunikat `INFO Reinstalling modules found in 'modules.json' but missing from directory`; jest on emitowany przez nf-core/tools 4.0.2 dla każdego modułu odpytywanego poleceniem `info`, niezależnie od tego, czy jest faktycznie zainstalowany, i nie ma żadnego efektu, ponieważ polecenie `info` nie zapisuje żadnych plików. + ### 1.4. Instalacja modułu find/concatenate Teraz, gdy znaleźliśmy moduł, którego chcemy, musimy dodać go do kodu źródłowego naszego pipeline'u. @@ -193,15 +197,13 @@ Teraz, gdy znaleźliśmy moduł, którego chcemy, musimy dodać go do kodu źró Dobra wiadomość jest taka, że projekt nf-core zawiera narzędzia, które ułatwiają tę część. Konkretnie, polecenie `nf-core modules install` umożliwia zautomatyzowanie pobierania kodu i udostępnienia go projektowi w jednym kroku. -Przejdź do katalogu Swojego pipeline'u i uruchom polecenie instalacji: +Upewnij się, że Twój bieżący katalog roboczy to katalog główny projektu pipeline `core-hello`, a następnie uruchom polecenie instalacji: ```bash cd core-hello nf-core modules install find/concatenate ``` -Narzędzie przystąpi do instalacji modułu. - ??? success "Wyjście polecenia" ```console @@ -212,26 +214,20 @@ Narzędzie przystąpi do instalacji modułu. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -Polecenie automatycznie: - -- Pobiera pliki modułu do `modules/nf-core/find/concatenate/` -- Aktualizuje `modules.json`, aby śledzić zainstalowany moduł -- Dostarcza Ci prawidłową instrukcję `include` do użycia w Swoim workflow'ie - -!!! tip "Wskazówka" - - Zawsze upewnij się, że Twój bieżący katalog roboczy to katalog główny projektu pipeline przed uruchomieniem polecenia instalacji modułu. +Polecenie pobiera pliki modułu do `modules/nf-core/find/concatenate/` i aktualizuje `modules.json`, aby śledzić zainstalowany moduł. +Możesz zignorować błąd `NotADirectoryError` na końcu; pojawia się on, ponieważ nf-core/tools 4.0.2 oczekuje, że każdy moduł lokalny będzie znajdował się we własnym katalogu (`modules/local//main.nf`), podczas gdy `core-hello` na tym etapie nadal używa modułów lokalnych w postaci pojedynczych plików. +Moduł `find/concatenate` jest jednak zainstalowany poprawnie, a `modules.json` jest aktualizowany zgodnie z oczekiwaniami. +Przekonwertujemy `cowpy` do układu katalogowego w Części 4. -Sprawdźmy, czy moduł został poprawnie zainstalowany: +Sprawdźmy, czy pliki modułu są na miejscu: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -Możesz również zweryfikować instalację, prosząc narzędzie nf-core o wyświetlenie lokalnie zainstalowanych modułów: +Możesz również potwierdzić instalację, sprawdzając plik `modules.json`, który teraz zawiera wpis `find/concatenate` w repozytorium nf-core/modules. + +??? abstract "Zawartość pliku" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +To potwierdza, że moduł `find/concatenate` jest teraz częścią kodu źródłowego Twojego projektu. +Jednak aby faktycznie użyć nowego modułu, musimy go zaimportować do naszego pipeline'u. + +Na koniec możesz również użyć polecenia `nf-core modules list local`, aby sprawdzić, jakie moduły są aktualnie śledzone w Twoim pipeline'ie. ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "Wyjście polecenia" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -To potwierdza, że moduł `find/concatenate` jest teraz częścią kodu źródłowego Twojego projektu. - -Jednak aby faktycznie użyć nowego modułu, musimy go zaimportować do naszego pipeline'u. +W wynikowej tabeli widać `find/concatenate` wraz z repozytorium, wersją SHA, komunikatem i datą. ### 1.5. Aktualizacja importów modułów @@ -302,7 +354,7 @@ Otwórz [core-hello/workflows/hello.nf](core-hello/workflows/hello.nf) i dokonaj === "Po" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ Otwórz [core-hello/workflows/hello.nf](core-hello/workflows/hello.nf) i dokonaj include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "Przed" @@ -345,7 +397,7 @@ W tym momencie możesz być kuszony, aby zacząć edytować kod, ale warto pośw Zajmiemy się tym jako osobną sekcją, ponieważ obejmuje to nowy mechanizm, którego jeszcze nie omówiliśmy: mapy metadanych. -!!! note "Uwaga" +!!! info "Info" Opcjonalnie możesz usunąć plik `collectGreetings.nf`: @@ -373,7 +425,7 @@ Pozwoli nam to określić, czy możemy po prostu traktować nowy moduł jako zam Najlepiej byłoby zrobić to _przed_ zainstalowaniem modułu, ale hej, lepiej późno niż wcale. (Na marginesie, istnieje polecenie `uninstall`, aby pozbyć się modułów, których nie chcesz już używać.) -!!! note "Uwaga" +!!! info "Info" Proces FIND_CONCATENATE zawiera dość sprytne obsługiwanie różnych typów kompresji, rozszerzeń plików itp., które nie są ściśle istotne dla tego, co próbujemy Ci tutaj pokazać, więc zignorujemy większość z tego i skupimy się tylko na częściach, które są ważne. @@ -512,7 +564,7 @@ Jak wspomniano wcześniej, konfiguracja wejściowa `tuple val(meta), path(files_ Miejmy nadzieję, że zaczynasz widzieć, jak przydatne może to być. Nie tylko pozwala to nazwać wyjścia na podstawie metadanych, ale możesz również robić takie rzeczy, jak używać ich do stosowania różnych wartości parametrów, a w połączeniu z określonymi operatorami możesz nawet grupować, sortować lub filtrować dane, gdy przepływają przez pipeline. -!!! note "Dowiedz się więcej o metadanych" +!!! info "Dowiedz się więcej o metadanych" Aby uzyskać kompleksowe wprowadzenie do pracy z metadanymi w workflow'ach Nextflow, w tym jak odczytywać metadane z arkuszy próbek i używać ich do dostosowywania przetwarzania, zobacz side quest [Metadane w workflow'ach](../side_quests/metadata/index.md). @@ -543,7 +595,7 @@ Teraz, gdy wiesz wszystko o metamapach (lub wystarczająco dużo dla celów tego Dla jasności podzielimy to i omówimy każdy krok osobno. -!!! note "Uwaga" +!!! info "Info" Wszystkie zmiany pokazane poniżej są dokonywane w logice workflow'u w bloku `main` w pliku workflow'u `core-hello/workflows/hello.nf`. @@ -570,8 +622,8 @@ Dodajmy te linie po wywołaniu `convertToUpper`, usuwając wywołanie `collectGr === "Po" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // wyemituj powitanie + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // wyemituj powitanie (zaktualizowane do użycia konwencji nf-core dla arkuszy próbek) sayHello(ch_samplesheet) // przekształć powitanie na wielkie litery @@ -586,8 +638,8 @@ Dodajmy te linie po wywołaniu `convertToUpper`, usuwając wywołanie `collectGr === "Przed" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // wyemituj powitanie + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // wyemituj powitanie (zaktualizowane do użycia konwencji nf-core dla arkuszy próbek) sayHello(ch_samplesheet) // przekształć powitanie na wielkie litery @@ -608,8 +660,8 @@ Następnie przekształć kanał plików w kanał krotek zawierających metadane === "Po" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // wyemituj powitanie + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // wyemituj powitanie (zaktualizowane do użycia konwencji nf-core dla arkuszy próbek) sayHello(ch_samplesheet) // przekształć powitanie na wielkie litery @@ -627,8 +679,8 @@ Następnie przekształć kanał plików w kanał krotek zawierających metadane === "Przed" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // wyemituj powitanie + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // wyemituj powitanie (zaktualizowane do użycia konwencji nf-core dla arkuszy próbek) sayHello(ch_samplesheet) // przekształć powitanie na wielkie litery @@ -654,8 +706,8 @@ Teraz wywołaj `FIND_CONCATENATE` na nowo utworzonym kanale: === "Po" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // wyemituj powitanie + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // wyemituj powitanie (zaktualizowane do użycia konwencji nf-core dla arkuszy próbek) sayHello(ch_samplesheet) // przekształć powitanie na wielkie litery @@ -676,8 +728,8 @@ Teraz wywołaj `FIND_CONCATENATE` na nowo utworzonym kanale: === "Przed" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // wyemituj powitanie + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // wyemituj powitanie (zaktualizowane do użycia konwencji nf-core dla arkuszy próbek) sayHello(ch_samplesheet) // przekształć powitanie na wielkie litery @@ -704,8 +756,8 @@ Ponieważ `cowpy` nie akceptuje jeszcze krotek metadanych (naprawimy to w nastę === "Po" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // wyemituj powitanie + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // wyemituj powitanie (zaktualizowane do użycia konwencji nf-core dla arkuszy próbek) sayHello(ch_samplesheet) // przekształć powitanie na wielkie litery @@ -729,8 +781,8 @@ Ponieważ `cowpy` nie akceptuje jeszcze krotek metadanych (naprawimy to w nastę === "Przed" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // wyemituj powitanie + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // wyemituj powitanie (zaktualizowane do użycia konwencji nf-core dla arkuszy próbek) sayHello(ch_samplesheet) // przekształć powitanie na wielkie litery @@ -753,7 +805,7 @@ Operacja `#!groovy .map { meta, file -> file }` wyodrębnia plik z krotki `[meta Następnie wystarczy przekazać `ch_for_cowpy` do `cowpy` zamiast `collectGreetings.out.outfile` w tej ostatniej linii. -!!! note "Uwaga" +!!! info "Info" W następnej części kursu zaktualizujemy `cowpy`, aby pracował bezpośrednio z krotkami metadanych, więc ten krok ekstrakcji nie będzie już potrzebny. @@ -762,7 +814,7 @@ Następnie wystarczy przekazać `ch_for_cowpy` do `cowpy` zamiast `collectGreeti Przetestujmy, czy workflow działa z nowo zintegrowanym modułem `find/concatenate`: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` To powinno działać dość szybko. @@ -770,40 +822,40 @@ To powinno działać dość szybko. ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` Zauważ, że `FIND_CONCATENATE` pojawia się teraz na liście wykonywanych procesów zamiast `collectGreetings`. diff --git a/docs/pl/docs/hello_nf-core/04_make_module.md b/docs/pl/docs/hello_nf-core/04_make_module.md index 717d3254ab..12910f4837 100644 --- a/docs/pl/docs/hello_nf-core/04_make_module.md +++ b/docs/pl/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ Następnie pokażemy, jak korzystać z tworzenia modułów opartych na szablonac Możesz przetestować, czy działa poprawnie, uruchamiając następujące polecenie: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ Otwórz plik modułu `cowpy.nf` (w `core-hello/modules/local/`) i zmodyfikuj naz === "Po" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Wygeneruj grafikę ASCII za pomocą cowpy (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "Przed" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Wygeneruj grafikę ASCII za pomocą cowpy (https://github.com/jeffbuttars/cowpy) process cowpy { ``` W tym przypadku zmiana na wielkie litery jest całkowicie prosta. -Gdyby nazwa procesu składała się z kilku słów, na przykład gdybyśmy mieli proces o nazwie MyCowpyTool pierwotnie w camel case, konwencją nf-core byłoby użycie podkreślników do ich rozdzielenia, dając MY_COWPY_TOOL. +Gdyby nazwa procesu składała się z kilku słów, na przykład gdybyśmy mieli proces o nazwie `MyCowpyTool` pierwotnie w camel case, konwencją nf-core byłoby użycie podkreślników do ich rozdzielenia, dając `MY_COWPY_TOOL`. #### 1.1.2. Aktualizacja instrukcji importu modułu @@ -164,7 +164,7 @@ Teraz zaktualizujmy dwa odwołania do procesu w bloku workflow'u pliku `hello.nf // // Zbierz i zapisz wersje oprogramowania // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ Teraz zaktualizujmy dwa odwołania do procesu w bloku workflow'u pliku `hello.nf // // Zbierz i zapisz wersje oprogramowania // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ Upewnij się, że wprowadzisz **obie** zmiany, w przeciwnym razie otrzymasz bł Uruchommy workflow, aby sprawdzić, czy wszystko działa poprawnie po tych zmianach. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ Wróć do pliku modułu `cowpy.nf` i zmodyfikuj go, aby akceptował krotki metad === "Po" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ Wróć do pliku modułu `cowpy.nf` i zmodyfikuj go, aby akceptował krotki metad === "Przed" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ Technicznie nie jest to wymagane, ale dobrą praktyką jest odwoływanie się do Uruchommy workflow, aby sprawdzić, czy wszystko działa poprawnie po tych zmianach. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Jak widać, wprowadziliśmy trzy zmiany. W rezultacie interfejs modułu jest teraz prostszy: oczekuje tylko podstawowych metadanych i wejść plikowych. -!!! note "Uwaga" +!!! info "Info" Operator `?:` jest często nazywany 'operatorem Elvisa', ponieważ wygląda jak twarz Elvisa Presleya z profilu, gdzie znak `?` symbolizuje falę we włosach. @@ -623,15 +623,15 @@ Sprawdźmy, czy workflow nadal działa zgodnie z oczekiwaniami, określając inn Uruchom to polecenie używając `kosh`, jednej z bardziej... enigmatycznych opcji: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "Wyjście polecenia" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ Podsumowując korzyści tego podejścia: - **Przenośność**: Moduły mogą być ponownie użyte bez zakodowanych opcji narzędzia - **Brak zmian w workflow'ie**: Dodawanie lub zmiana opcji narzędzia nie wymaga aktualizacji kodu workflow'u -!!! note "Uwaga" +!!! info "Info" System `ext.args` ma potężne dodatkowe możliwości, których nie omówiono tutaj, w tym dynamiczne przełączanie wartości argumentów na podstawie metadanych. Zobacz [specyfikacje modułów nf-core](https://nf-co.re/docs/guidelines/components/modules) po więcej szczegółów. @@ -841,15 +841,15 @@ Jeśli się zastanawiasz, zamknięcie `ext.prefix` ma dostęp do właściwego fr Sprawdźmy, czy workflow nadal działa zgodnie z oczekiwaniami. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ To wszystko! Zobaczmy, co się stanie, jeśli teraz uruchomimy pipeline. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ Teraz `core-hello-results` zawiera również wyjścia modułu `COWPY`. Widać, że Nextflow utworzył tę hierarchię katalogów na podstawie nazw workflow'u i modułu. -!!! note "Uwaga" +!!! info "Info" Możesz zauważyć plik `hello_software_versions.yml` w `pipeline_info/`. Zawiera on obecnie tylko informacje o wersji z `FIND_CONCATENATE`, ponieważ `COWPY` jeszcze nie raportuje swojej wersji. @@ -1098,9 +1098,9 @@ To powiedziawszy, możesz zdecydować, że chcesz zorganizować Swoje wejścia i Aby przesłonić domyślną dyrektywę `publishDir`, możesz po prostu dodać własne dyrektywy do pliku `conf/modules.config`. -Na przykład możesz przesłonić wartość domyślną dla pojedynczego procesu za pomocą selektora `withName:`, jak w tym przykładzie, gdzie dodajemy niestandardową dyrektywę `publishDir` dla procesu 'COWPY'. +Na przykład możesz przesłonić wartość domyślną dla pojedynczego procesu za pomocą selektora `withName:`, jak w tym przykładzie, gdzie dodajemy niestandardową dyrektywę `publishDir` dla procesu `COWPY`. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ Nie są potrzebne żadne zmiany w bloku script — wersja jest deklarowana staty #### 1.6.2. Uruchomienie pipeline'a i sprawdzenie raportu wersji ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -Kolekcja po stronie workflow'u — blok `Channel.topic("versions")`, który widziałeś w zastępczym workflow'ie w Części 2 — subskrybuje temat i automatycznie zapisuje ten zbiorczy raport. +Kolekcja po stronie workflow'u — blok `channel.topic("versions")`, który widziałeś w zastępczym workflow'ie w Części 2 — subskrybuje temat i automatycznie zapisuje ten zbiorczy raport. -!!! note "Zgodność wsteczna" +!!! info "Zgodność wsteczna" Gałąź `versions_file` w bloku kanału tematycznego workflow'u istnieje po to, aby obsługiwać moduły, które nie zostały jeszcze zaktualizowane do używania `topic: versions` i nadal zapisują plik `versions.yml` w bloku script za pomocą `emit: versions`. Oba style są obsługiwane jednocześnie podczas przejścia. @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Wzorzec 1: Krotki metadanych ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ Domyślny kod oferuje przełączanie między Dockerem a Singularity, ale uprośc === "Przed" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Środowisko Conda -Dla środowiska Conda kod modułu określa `conda "${moduleDir}/environment.yml"`, co oznacza, że powinno być skonfigurowane w pliku `environment.yml`. +Dla środowiska Conda kod modułu określa `#!groovy conda "${moduleDir}/environment.yml"`, co oznacza, że powinno być skonfigurowane w pliku `environment.yml`. Narzędzie do tworzenia modułów ostrzegło nas, że nie może znaleźć pakietu `cowpy` w Bioconda (głównym kanale dla narzędzi bioinformatycznych). Jednak `cowpy` jest dostępny w conda-forge, więc możesz uzupełnić `environment.yml` w ten sposób: @@ -1428,7 +1431,7 @@ Zaktualizuj bloki wejść i wyjść: === "Po" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Zaktualizuj bloki wejść i wyjść: === "Przed" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` To określa: @@ -1453,6 +1456,7 @@ To określa: - Nazwę parametru pliku wejściowego (`input_file` zamiast ogólnego `input`) - Nazwę pliku wyjściowego używając konfigurowalnego wzorca prefiksu (`#!groovy ${prefix}.txt` zamiast wieloznacznika `*`) - Opisową nazwę emit (`cowpy_output` zamiast ogólnego `output`) +- Statyczny ciąg wersji (`#!groovy val("1.1.5")`) w miejsce szablonowego `#!groovy eval("cowpy --version")`, zgodnie z ręcznym modułem z sekcji 1.6 (narzędzie `cowpy` nie udostępnia flagi `--version`) Jeśli używasz serwera językowego Nextflow do walidacji składni, część `#!groovy ${prefix}` zostanie oznaczona jako błąd na tym etapie, ponieważ jeszcze nie dodaliśmy jej do bloku script. Przejdźmy do tego teraz. @@ -1515,7 +1519,7 @@ Nie martw się zbytnio, jeśli wydaje się to tajemnicze; dołączamy to dla kom === "Przed" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1574,15 +1578,15 @@ Wszystko, co musimy zrobić, aby wypróbować tę nową wersję modułu `COWPY`, Uruchommy pipeline, aby go przetestować. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Wyjście polecenia" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1609,10 +1613,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/pl/docs/hello_nf-core/05_input_validation.md b/docs/pl/docs/hello_nf-core/05_input_validation.md index c2d30a72bf..c03f086994 100644 --- a/docs/pl/docs/hello_nf-core/05_input_validation.md +++ b/docs/pl/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ W tej piątej części kursu szkoleniowego Hello nf-core pokażemy Ci, jak używ Możesz przetestować, czy działa poprawnie, uruchamiając następujące polecenie: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema jest następcą przestarzałej wtyczki nf-validation i używa standard ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ Teraz zastosujmy te zasady w praktyce, zaczynając od walidacji parametrów. Zacznijmy od dodania walidacji parametrów do naszego pipeline'u. To waliduje flagi linii poleceń, takie jak `--input`, `--outdir` i `--batch`. -### 1.1. Skonfiguruj walidację, aby pominąć walidację pliku wejściowego +### 1.1. Włącz walidację i pomiń walidację pliku wejściowego Szablon pipeline'u nf-core jest dostarczany z już zainstalowanym i skonfigurowanym nf-schema: - Wtyczka nf-schema jest instalowana przez blok `plugins{}` w `nextflow.config` -- Walidacja parametrów jest domyślnie włączona przez `params.validate_params = true` +- Walidacja parametrów jest kontrolowana przez `params.validate_params` - Walidacja jest wykonywana przez subworkflow `UTILS_NFSCHEMA_PLUGIN` podczas inicjalizacji pipeline'u -Zachowanie walidacji jest kontrolowane przez zakres `validation{}` w `nextflow.config`. +W Częściach 3 i 4 ustawiliśmy `validate_params = false`, aby pipeline mógł działać przed skonfigurowaniem jakichkolwiek schematów. +Teraz, gdy jesteśmy gotowi dodać walidację, pierwszym krokiem jest jej włączenie. -Ponieważ najpierw będziemy pracować nad walidacją parametrów (ta sekcja) i nie skonfigurujemy schematu danych wejściowych do sekcji 2, musimy tymczasowo powiedzieć nf-schema, aby pominął walidację zawartości pliku parametru `input`. +Otwórz `nextflow.config` i znajdź parametr `validate_params` (około linii 37), a następnie ustaw go na `true`: -Otwórz `nextflow.config` i znajdź blok `validation` (około linii 247). Dodaj `ignoreParams`, aby pominąć walidację pliku wejściowego: +=== "Po" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "Przed" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +Samo zachowanie walidacji jest kontrolowane przez zakres `validation{}` w `nextflow.config`. + +Ponieważ najpierw będziemy pracować nad walidacją parametrów (ta sekcja) i nie skonfigurujemy schematu danych wejściowych do sekcji 2, musimy również tymczasowo powiedzieć nf-schema, aby pominął walidację zawartości pliku parametru `input`. + +Znajdź blok `validation` (około linii 252) i dodaj `ignoreParams`, aby pominąć walidację pliku wejściowego: === "Po" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ Otwórz `nextflow.config` i znajdź blok `validation` (około linii 247). Dodaj === "Przed" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ Ta konfiguracja mówi nf-schema, aby: - **`ignoreParams`**: Pominął walidację zawartości pliku parametru `input` (tymczasowo; ponownie włączymy to w sekcji 2) - **`monochromeLogs`**: Wyłączył kolorowe wyjście w komunikatach walidacji, gdy ustawione na `true` (kontrolowane przez `params.monochrome_logs`) -!!! note "Dlaczego ignorować parametr input?" +!!! info "Dlaczego ignorować parametr input?" Parametr `input` w `nextflow_schema.json` ma `"schema": "assets/schema_input.json"`, co mówi nf-schema, aby zwalidował *zawartość* pliku CSV wejściowego względem tego schematu. Ponieważ jeszcze nie skonfigurowaliśmy tego schematu, tymczasowo ignorujemy tę walidację. @@ -263,7 +280,7 @@ Powinieneś zobaczyć coś takiego: | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -Powinieneś zobaczyć, że parametr `batch` został dodany do schematu z polem "required" teraz pokazującym `["input", "outdir", "batch"]`. +Powinieneś zobaczyć, że parametr `batch` został dodany do schematu z polem `required` teraz pokazującym `["input", "outdir", "batch"]`. ### 1.5. Przetestuj walidację parametrów @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ Otwórz `nextflow.config` i usuń linię `ignoreParams` z bloku `validation`: === "Po" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ Otwórz `nextflow.config` i usuń linię `ignoreParams` z bloku `validation`: === "Przed" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ Zweryfikujmy, że nasza walidacja działa, testując zarówno poprawne, jak i ni #### 2.7.1. Przetestuj z poprawnym wejściem Najpierw potwierdź, że pipeline uruchamia się pomyślnie z poprawnym wejściem. -Zauważ, że nie potrzebujemy już `--validate_params false`, ponieważ walidacja działa! +Przy `validate_params = true` i skonfigurowanym schemacie wejściowym, zarówno walidacja parametrów, jak i danych wejściowych działają teraz na serio. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/pl/docs/info/nxf_versions.md b/docs/pl/docs/info/nxf_versions.md index 2a78648c86..a651ed45b3 100644 --- a/docs/pl/docs/info/nxf_versions.md +++ b/docs/pl/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: Od wersji 3.0 portalu szkoleniowego wszystkie nasze kursy są kompatybilne z Nextflow w wersji 25.10.2 lub nowszej, chyba że na stronie indeksu kursu określono inaczej. (Nie dotyczy to przestarzałych ani zarchiwizowanych materiałów, które mogą nie zawierać informacji o wersji). -Wersja Nextflow aktualnie ładowana domyślnie w naszym środowisku szkoleniowym to **Nextflow 25.10.4**. +Wersja Nextflow aktualnie ładowana domyślnie w naszym środowisku szkoleniowym to **Nextflow 26.04.4**. Ponieważ kursy wykorzystują teraz typowane wejścia na poziomie workflow'a, a także dyrektywy wyjściowe na poziomie workflow'a, wymagają użycia parsera składni V2, **chyba że w instrukcjach kursu wyraźnie zaznaczono inaczej**. +Parser V2 jest domyślny od Nextflow 26.04 wzwyż, więc w przypadku wersji, którą ładujemy, nie trzeba go włączać ręcznie. Jeśli planujesz korzystać ze środowiska, które udostępniamy przez [Github Codespaces](../envsetup/01_setup.md) lub [lokalne devcontainery](../envsetup/03_devcontainer.md), nie musisz nic robić, chyba że w instrukcjach kursu wyraźnie zaznaczono inaczej. -Jeśli jednak planujesz przejść przez szkolenia we własnym środowisku ([Instalacja ręczna](../envsetup/02_local.md)), musisz upewnić się, że używasz Nextflow w wersji 25.10.2 lub nowszej z włączonym parserem składni v2. +Jeśli jednak planujesz przejść przez szkolenia we własnym środowisku ([Instalacja ręczna](../envsetup/02_local.md)), musisz upewnić się, że używasz Nextflow w wersji 25.10.2 lub nowszej, a jeśli korzystasz z wersji wcześniejszej niż 26.04 — że masz włączony parser składni v2. ## Starsze wersje materiałów szkoleniowych @@ -40,7 +41,7 @@ Cały nowoczesny kod Nextflow używa DSL2. Parser v1 to oryginalny, bardziej permisywny parser. Parser v2 jest bardziej restrykcyjny i umożliwia nowe funkcje językowe, takie jak typowanie statyczne (typowane wejścia i wyjścia) oraz dyrektywy wyjściowe na poziomie workflow'a. Parser v2 zapewnia również lepsze komunikaty o błędach i wychwytuje więcej błędów na etapie parsowania, a nie w czasie wykonywania. -Parser v2 stanie się domyślny w Nextflow 26.04. +Parser v2 jest domyślny począwszy od Nextflow 26.04. Podsumowując: DSL2 to język, w którym piszesz; wersja parsera składni określa, jak restrykcyjnie ten język jest interpretowany i jakie zaawansowane funkcje są dostępne. @@ -52,21 +53,22 @@ Więcej informacji o tym, jak zaktualizować swoją wersję Nextflow, znajdziesz ### Włączanie parsera składni v2 +Począwszy od Nextflow 26.04 parser v2 jest domyślny, więc poniższe kroki są potrzebne tylko w wersjach wcześniejszych niż 26.04. + Aby **włączyć** parser składni v2 dla bieżącej sesji, uruchom następujące polecenie w terminalu: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Aby uczynić to trwałym (do czasu, gdy v2 stanie się domyślny w Nextflow 26.04), dodaj polecenie export do profilu powłoki (`~/.bashrc`, `~/.zshrc` itp.): +Aby uczynić to trwałym, dodaj polecenie export do profilu powłoki (`~/.bashrc`, `~/.zshrc` itp.): ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -Zauważ, że zmienna środowiskowa `NXF_SYNTAX_PARSER=v2` jest tymczasowym wymogiem. -Od Nextflow 26.04 parser v2 stanie się domyślny i to ustawienie nie będzie już potrzebne. +Zauważ, że w wersjach Nextflow wcześniejszych niż 26.04 zmienna środowiskowa `NXF_SYNTAX_PARSER=v2` jest wymagana, aby uzyskać dostęp do funkcji v2 używanych w tych kursach. ### Wyłączanie parsera składni v2 diff --git a/docs/pl/docs/nextflow_run/01_basics.md b/docs/pl/docs/nextflow_run/01_basics.md index 1d73910973..8ec2653f2f 100644 --- a/docs/pl/docs/nextflow_run/01_basics.md +++ b/docs/pl/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "Wyjście polecenia" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Jeśli wyjście konsoli wygląda mniej więcej tak, to gratulacje, właśnie uruchomiłeś Swój pierwszy workflow Nextflow! @@ -115,13 +121,14 @@ Jeśli wyjście konsoli wygląda mniej więcej tak, to gratulacje, właśnie uru Zostało to wspomniane na początku kursu, ale może Ci to umknęło. Sprawdź materiał pomocniczy [Wersje Nextflow](../info/nxf_versions.md). - Krótko mówiąc, jeśli używasz Nextflow `25.10`, musisz włączyć parser języka v2: + Parser v2 jest domyślny od Nextflow 26.04 wzwyż, więc ten błąd pojawi się tylko na starszych wersjach. + Jeśli używasz wersji wcześniejszej niż 26.04, musisz włączyć parser języka v2: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Najważniejsze wyjście tutaj to ostatnia linia, która jest podświetlona w powyższym wyjściu: +Najważniejsze tutaj to podświetlona linia: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -152,7 +159,7 @@ Hello World! ### 2.3. Zapisz wyniki do innego katalogu -Domyślnie Nextflow zapisze wyjścia pipeline'u do katalogu o nazwie `results` w Twojej bieżącej ścieżce. +Domyślnie Nextflow zapisuje wyjścia pipeline'u do katalogu o nazwie `results` w Twojej bieżącej ścieżce. Aby zmienić miejsce, w którym Twoje pliki są publikowane, użyj flagi CLI `-output-dir` (lub `-o` w skrócie). !!! danger "Niebezpieczeństwo" @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` Powinieneś zobaczyć, że Twoje wyjścia są teraz publikowane do katalogu o nazwie `hello_results` zamiast `results`: @@ -206,7 +219,7 @@ To może brzmieć myląco, więc zobaczmy, jak to wygląda w praktyce. Wracając do wyjścia konsoli dla workflow'u, który uruchomiliśmy wcześniej, mieliśmy tę linię: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` Widzisz, jak linia zaczyna się od `[a3/1e1535]`? @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "Wyjście polecenia" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Wyjście konsoli powinno wyglądać znajomo, ale jest jedna rzecz, która jest trochę inna niż wcześniej. @@ -767,7 +786,7 @@ W linii wyjścia konsoli `[a3/7be2fa] SAYHELLO | 1 of 1 ✔`, co reprezentuje `[ - [x] Skróconą ścieżkę do katalogu roboczego zadania - [ ] Sumę kontrolną pliku wyjściowego -Dowiedz się więcej: [2.4. Znajdź oryginalne wyjście i logi w katalogu `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +Dowiedz się więcej: [2.3. Znajdź oryginalne wyjście i logi w katalogu `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ Jaki jest cel pliku `.command.sh` w katalogu zadania? - [ ] Zawiera komunikaty o błędach z nieudanych zadań - [ ] Wymienia pliki wejściowe przygotowane dla zadania -Dowiedz się więcej: [2.4. Znajdź oryginalne wyjście i logi w katalogu `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +Dowiedz się więcej: [2.3. Znajdź oryginalne wyjście i logi w katalogu `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ Co dzieje się z opublikowanymi wynikami, gdy ponownie uruchamiasz workflow bez - [ ] Nextflow zapobiega nadpisywaniu i kończy się niepowodzeniem - [ ] Są automatycznie archiwizowane -Dowiedz się więcej: [2.5. Uruchom ponownie workflow z różnymi powitaniami](#24-re-run-the-workflow-with-different-greetings) +Dowiedz się więcej: [2.4. Uruchom ponownie workflow z różnymi powitaniami](#24-re-run-the-workflow-with-different-greetings) Co wskazuje to wyjście konsoli? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] Zadanie nie powiodło się i zostało pominięte diff --git a/docs/pl/docs/nextflow_run/02_pipeline.md b/docs/pl/docs/nextflow_run/02_pipeline.md index f165337693..ef3808d31a 100644 --- a/docs/pl/docs/nextflow_run/02_pipeline.md +++ b/docs/pl/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Ekscytująco, wydaje się to wskazywać, że wykonano '3 of 3' wywołań procesu, co jest zachęcające, ponieważ w dostarczonym pliku CSV były trzy wiersze danych. @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "Wyjście polecenia" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Tym razem widzimy wszystkie trzy uruchomienia procesu i ich powiązane podkatalogi robocze wymienione w wyjściu. @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "Wyjście polecenia" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` Widzisz, że zgodnie z obietnicą, wiele kroków zostało uruchomionych jako część workflow'u; pierwsze dwa (`sayHello` i `convertToUpper`) były prawdopodobnie uruchomione na każdym indywidualnym powitaniu, a trzeci (`collectGreetings`) został uruchomiony tylko raz, na wyjściach wszystkich trzech wywołań `convertToUpper`. @@ -670,13 +706,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "Wyjście polecenia" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` Powinieneś zobaczyć nowe końcowe wyjścia nazwane Twoją własną nazwą batch. @@ -921,13 +975,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` Zauważysz, że wykonania procesu wszystkie pomyślnie użyły pamięci podręcznej, co oznacza, że Nextflow rozpoznał, że już wykonał żądaną pracę, mimo że kod został podzielony, a główny plik workflow'u został przemianowany. @@ -1075,20 +1147,20 @@ Widzisz, że system plików wewnątrz kontenera jest inny niż system plików na Z wnętrza kontenera możesz uruchomić polecenie `cowpy` bezpośrednio. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "Wyjście polecenia" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` To produkuje grafikę ASCII domyślnej postaci krowy (lub 'cowacter') z dymkiem mowy zawierającym określony przez nas tekst. @@ -1097,22 +1169,22 @@ Teraz, gdy przetestowałeś podstawowe użycie, możesz spróbować podać mu ja Na przykład dokumentacja narzędzia mówi, że możemy ustawić postać za pomocą `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Wyjście polecenia" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1298,15 +1370,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` Pierwsze trzy kroki użyły pamięci podręcznej, ponieważ już je wcześniej uruchomiliśmy, ale proces `cowpy` jest nowy, więc faktycznie zostaje uruchomiony. diff --git a/docs/pl/docs/nextflow_run/03_config.md b/docs/pl/docs/nextflow_run/03_config.md index e5141de35e..e17b6ec0c1 100644 --- a/docs/pl/docs/nextflow_run/03_config.md +++ b/docs/pl/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` To nadal produkuje to samo wyjście co poprzednio. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` To utworzy nowy zestaw katalogów w `tux-run/`, w tym `tux-run/work/` i `tux-run/results/`. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` Końcowy plik wyjściowy powinien zawierać postać stegosaurus mówiącą powitania. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` To nadal produkuje to samo wyjście co poprzednio, z wyjątkiem tego, że tym razem znajdujemy nasze wyjścia w `results_config/outdir/`. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` To nadal produkuje to samo wyjście co poprzednio, z wyjątkiem tego, że tym razem znajdujemy nasze wyjścia w `results_config/pnames/` i są one pogrupowane według procesu. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` To nadal produkuje to samo wyjście co poprzednio, z wyjątkiem tego, że tym razem znajdujemy nasze wyjścia w `results_config/outmode/`. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "Wyjście polecenia" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` To powinno działać bez problemu i produkować te same wyjścia co poprzednio w `results_config/conda`. @@ -1217,15 +1357,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` Jak widzisz, to pozwala nam bardzo wygodnie przełączać się między konfiguracjami w czasie wykonania. @@ -1305,15 +1465,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` To użyje Docker, gdzie to możliwe, i wyprodukuje wyjścia w `results_config/test`, a tym razem postacią jest komiczny duet `dragonandcow`. @@ -1490,14 +1670,14 @@ nextflow run nextflow-io/hello ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1522,12 +1702,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/pl/docs/nf4_science/_template/02_single_sample.md b/docs/pl/docs/nf4_science/_template/02_single_sample.md index 3629e5b148..30d679145a 100644 --- a/docs/pl/docs/nf4_science/_template/02_single_sample.md +++ b/docs/pl/docs/nf4_science/_template/02_single_sample.md @@ -72,7 +72,7 @@ W głównym pliku workflow'a `{DOMAIN_DIR}.nf`, w sekcji `Pipeline parameters`, * Pipeline parameters */ params { - // Primary input + // Główne wejście {PRIMARY_PARAM_NAME}: Path } ``` @@ -84,7 +84,7 @@ W głównym pliku workflow'a `{DOMAIN_DIR}.nf`, w sekcji `Pipeline parameters`, * Pipeline parameters */ - // Primary input + // Główne wejście ``` To konfiguruje parametr CLI, ale nie chcemy wpisywać ścieżki pliku za każdym razem, gdy uruchamiamy workflow podczas tworzenia. @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/pl/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/pl/docs/nf4_science/genomics/02_per_sample_variant_calling.md index 7dc9c03ccb..ef1429d063 100644 --- a/docs/pl/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/pl/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` Możesz sprawdzić, czy plik indeksu został wygenerowany poprawnie, zaglądając do katalogu roboczego lub do katalogu wyników. @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` Teraz, jeśli spojrzymy na wyjście konsoli, widzimy wymienione dwa procesy. @@ -891,13 +911,32 @@ Zabawna rzecz: to _może zadziałać_ LUB _może się nie udać_. Na przykład, ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Jeśli Twoje uruchomienie workflow'a się powiodło, uruchom je ponownie, aż otrzymasz błąd taki jak ten: @@ -905,9 +944,9 @@ Jeśli Twoje uruchomienie workflow'a się powiodło, uruchom je ponownie, aż ot ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ Tym razem (i za każdym razem) wszystko powinno działać poprawnie: ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Katalog wyników zawiera teraz zarówno pliki BAM, jak i BAI dla każdej próbki (z krotki), wraz z wyjściami VCF: @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Powinno to dać taki sam wynik jak poprzednio. Nasz prosty workflow wywoływania wariantów ma teraz wszystkie podstawowe funkcje, których chcieliśmy. diff --git a/docs/pl/docs/nf4_science/genomics/03_joint_calling.md b/docs/pl/docs/nf4_science/genomics/03_joint_calling.md index 5ce1b97ff1..d65391a405 100644 --- a/docs/pl/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/pl/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` Wyjście Nextflow'a wygląda tak samo jak wcześniej, ale pliki `.g.vcf` i ich pliki indeksów są teraz zorganizowane w podkatalogach. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` Pierwsze dwa kroki są zbuforowane z poprzedniego uruchomienia, a nowy krok `GATK_JOINTGENOTYPING` uruchamia się raz na zebranych wejściach ze wszystkich trzech próbek. diff --git a/docs/pl/docs/nf4_science/imaging/01_basics.md b/docs/pl/docs/nf4_science/imaging/01_basics.md index eba6c6abef..a95860b6ba 100644 --- a/docs/pl/docs/nf4_science/imaging/01_basics.md +++ b/docs/pl/docs/nf4_science/imaging/01_basics.md @@ -19,21 +19,21 @@ nextflow run hello-world.nf --greeting 'Hello World!' Wyjście w konsoli powinno wyglądać mniej więcej tak: -```console title="Wyjście" linenums="1" - N E X T F L O W ~ version 25.04.3 +```console title="Output" linenums="1" + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Gratulacje, właśnie uruchomiłeś Swój pierwszy workflow Nextflow! Najważniejszym wyjściem jest tutaj ostatnia linia (linia 6): -```console title="Wyjście" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` To mówi nam, że proces `sayHello` został pomyślnie wykonany raz (`1 of 1 ✔`). @@ -83,20 +83,20 @@ To może brzmieć zagmatwanie, więc zobaczmy, jak to wygląda w praktyce. Wracając do wyjścia konsoli dla workflow'u, który uruchomiliśmy wcześniej, mieliśmy tę linię: -```console title="Fragment wyjścia polecenia" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Excerpt of command output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` -Widzisz, jak linia zaczyna się od `[a3/7be2fa]`? +Widzisz, jak linia zaczyna się od `[71/8143bd]`? To skrócona forma ścieżki katalogu zadania dla tego jednego wywołania procesu i mówi Ci, gdzie znaleźć wyjście wywołania procesu `sayHello` w ścieżce katalogu `work/`. -Możesz znaleźć pełną ścieżkę, wpisując następujące polecenie (zastępując `a3/7be2fa` tym, co widzisz w Swoim własnym terminalu) i naciskając klawisz tab, aby automatycznie uzupełnić ścieżkę, lub dodając gwiazdkę: +Możesz znaleźć pełną ścieżkę, wpisując następujące polecenie (zastępując `71/8143bd` tym, co widzisz w Swoim własnym terminalu) i naciskając klawisz tab, aby automatycznie uzupełnić ścieżkę, lub dodając gwiazdkę: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -Powinno to zwrócić pełną ścieżkę katalogu: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +Powinno to zwrócić pełną ścieżkę katalogu: `work/71/8143bd5ed3420e23c5f0dc1a05056d` Zobaczmy, co tam jest. @@ -116,8 +116,8 @@ Dokładne nazwy podkatalogów będą różne w Twoim systemie. ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -136,7 +136,7 @@ Jeśli go otworzysz, znajdziesz ponownie powitanie `Hello World!`.
Zawartość pliku output.txt -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,10 +159,9 @@ Plik `.command.sh` jest szczególnie przydatny, ponieważ pokazuje główne pole
Zawartość pliku -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
@@ -357,17 +356,17 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Zwróć uwagę na fragment `cached:`, który został dodany w linii statusu procesu (linia 5), co oznacza, że Nextflow rozpoznał, iż już wykonał tę pracę i po prostu ponownie wykorzystał wynik z poprzedniego pomyślnego uruchomienia. +Zwróć uwagę na fragment `cached:`, który został dodany w linii statusu procesu, co oznacza, że Nextflow rozpoznał, iż już wykonał tę pracę i po prostu ponownie wykorzystał wynik z poprzedniego pomyślnego uruchomienia. Możesz również zobaczyć, że hash podkatalogu roboczego jest taki sam jak w poprzednim uruchomieniu. -Nextflow dosłownie wskazuje Ci na poprzednie wykonanie, mówiąc "Już to zrobiłem tam." +Nextflow dosłownie wskazuje Ci na poprzednie wykonanie, mówiąc „Już to zrobiłem tam." !!! Tip "Wskazówka" diff --git a/docs/pl/docs/nf4_science/imaging/02_run_molkart.md b/docs/pl/docs/nf4_science/imaging/02_run_molkart.md index 300dd2e318..c569fe159a 100644 --- a/docs/pl/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/pl/docs/nf4_science/imaging/02_run_molkart.md @@ -70,26 +70,34 @@ To tworzy katalog `molkart/` zawierający kompletny kod źródłowy pipeline'u. Zanim uruchomimy pełny pipeline, nauczmy się dlaczego kontenery są niezbędne dla pipeline'ów nf-core. -Spróbujmy uruchomić pipeline używając zestawu danych testowych i parametrów z konfiguracji testowej molkart: - -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +Parametry pipeline'u podamy za pomocą pliku parametrów. +Plik parametrów to plik YAML zawierający listę parametrów i ich wartości, który zachowuje typy wartości (takie jak liczby całkowite) i skraca polecenie uruchomienia. + +W katalogu roboczym znajduje się już gotowy plik `params.yaml`: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` -Rozbijmy te parametry: +Znaczenie tych parametrów: + +- `input`: Ścieżka do arkusza próbek zawierającego metadane próbek +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: Parametry dla wypełniania wzoru siatki +- `clahe_pyramid_tile`: Rozmiar kernela dla wzmocnienia kontrastu +- `segmentation_method`: Który algorytm(y) użyć do segmentacji komórek +- `outdir`: Gdzie zapisać wyniki + +Spróbujmy uruchomić pipeline z tymi parametrami: -- `--input`: Ścieżka do arkusza próbek zawierającego metadane próbek -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: Parametry dla wypełniania wzoru siatki -- `--clahe_pyramid_tile`: Rozmiar kernela dla wzmocnienia kontrastu -- `--segmentation_method`: Który algorytm(y) użyć do segmentacji komórek -- `--outdir`: Gdzie zapisać wyniki +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "To polecenie zakończy się niepowodzeniem - to zamierzone!" @@ -172,17 +180,10 @@ process { } ``` -Teraz uruchom pipeline ponownie tym samym poleceniem: +Teraz uruchom pipeline ponownie, tym razem z wszystkimi trzema metodami segmentacji, abyśmy mogli je później porównać: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` Tym razem Nextflow: @@ -209,12 +210,13 @@ Podczas działania pipeline'u zobaczysz wyjście podobne do tego: ??? success "Wyjście polecenia" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ Podczas działania pipeline'u zobaczysz wyjście podobne do tego: |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ Podczas działania pipeline'u zobaczysz wyjście podobne do tego: https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,10 +300,10 @@ Linia executor `executor > local (22)` informuje Cię: Każda linia procesu pokazuje: -- **Hash** (`[1a/2b3c4d]`): Identyfikator katalogu roboczego (jak wcześniej) +- **Hash** (`[b4/e57ff1]`): Identyfikator katalogu roboczego (jak wcześniej) - **Nazwa procesu**: Pełna ścieżka modułu i nazwa procesu - **Identyfikator wejścia**: Nazwa próbki w nawiasach -- **Postęp**: Procent zakończenia i liczba (np. `1 of 1 ✔`) +- **Postęp**: Liczba zadań i status ukończenia (np. `1 of 1 ✔`) ### Podsumowanie @@ -372,7 +369,7 @@ Raport zawiera: - Metryki jakości segmentacji - Liczbę wykrytych komórek i punktów -!!! Tip +!!! Tip "Wskazówka" Raporty MultiQC są zwykle dołączane do wszystkich pipeline'ów nf-core. Zawsze zapewniają ogólny przegląd wykonania pipeline'u i jakości danych. @@ -426,7 +423,7 @@ Pokazuje on: - Użycie CPU i pamięci - Które zadania były w pamięci podręcznej, a które wykonane -!!! Tip +!!! Tip "Wskazówka" Te raporty są niezwykle przydatne do optymalizacji alokacji zasobów i rozwiązywania problemów z wydajnością. @@ -447,7 +444,7 @@ Tak jak w naszym przykładzie Hello World, cała rzeczywista praca odbywa się w ### 4.1. Zrozumienie struktury katalogu roboczego Katalog roboczy zawiera podkatalog dla każdego zadania, które zostało wykonane. -Dla tego pipeline'u z 12 zadaniami będzie 12 podkatalogów roboczych. +Dla tego pipeline'u z 22 zadaniami będzie 22 podkatalogów roboczych. Wyświetl listę katalogu roboczego: @@ -477,7 +474,7 @@ Kluczowa różnica od Hello World: - Pliki wyjściowe mogą być dość duże (maski segmentacji, przetworzone obrazy) - Wiele plików wejściowych i wyjściowych na zadanie -!!! Tip +!!! Tip "Wskazówka" Jeśli proces się nie powiedzie, możesz przejść do jego katalogu roboczego, sprawdzić `.command.err` w poszukiwaniu komunikatów o błędach, a nawet ponownie uruchomić `.command.sh` ręcznie, aby debugować problem. @@ -517,30 +514,29 @@ Jest to niezbędne dla długo działających pipeline'ów, gdzie niepowodzenia m Uruchom to samo polecenie ponownie, ale dodaj `-resume`: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -Powinieneś zobaczyć wyjście takie jak: +Powinieneś zobaczyć wyjście takie jak: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -Zauważ `cached: 2` lub `cached: 1` dla każdego procesu - nic nie zostało ponownie wykonane! +Zauważ adnotację `cached: N` przy każdym procesie przetwarzania wstępnego i segmentacji - te zadania zostały ponownie użyte zamiast wykonane od nowa. ### 5.3. Kiedy resume jest przydatne @@ -551,15 +547,15 @@ Resume jest szczególnie wartościowe, gdy: - Twoje połączenie sieciowe zostanie przerwane podczas pobierania danych - Chcesz dodać dodatkowe wyniki bez powtarzania obliczeń -!!! Warning +!!! Warning "Ostrzeżenie" - Resume działa tylko wtedy, gdy nie zmieniłeś danych wejściowych, kodu pipeline'u lub parametrów. + Resume działa tylko wtedy, gdy nie zmieniłeś danych wejściowych, kodu pipeline'u ani parametrów. Jeśli zmienisz którekolwiek z nich, Nextflow poprawnie ponownie uruchomi dotknięte zadania. ### Podsumowanie -Wiesz jak używać `-resume`, aby efektywnie ponownie uruchamiać pipeline'y bez powtarzania udanych zadań. +Wiesz już, jak używać `-resume`, aby efektywnie ponownie uruchamiać pipeline'y bez powtarzania udanych zadań. ### Co dalej? -Teraz, gdy możesz uruchomić nf-core/molkart z danymi testowymi, jesteś gotowy nauczyć się jak skonfigurować go dla Twoich własnych zestawów danych. +Teraz, gdy możesz uruchomić nf-core/molkart z danymi testowymi, jesteś gotowy nauczyć się, jak skonfigurować go dla własnych zestawów danych. diff --git a/docs/pl/docs/nf4_science/imaging/03_inputs.md b/docs/pl/docs/nf4_science/imaging/03_inputs.md index 04cc471479..ea13ff20ce 100644 --- a/docs/pl/docs/nf4_science/imaging/03_inputs.md +++ b/docs/pl/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Teraz poznamy dwa lepsze podejścia do zarządzania wejściami: **pliki parametr ### 1.1. Problem z długimi wierszami poleceń -Przypomnijmy sobie nasze polecenie z Części 2: +W Części 2 używaliśmy już pliku parametrów, aby skrócić polecenie i zachować wpisane wartości (takie jak całkowitoliczbowe parametry przetwarzania wstępnego) w niezmienionej postaci: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -To działa, ale trudno to odtworzyć, udostępnić lub zmodyfikować. +Podawanie wielu parametrów osobno w wierszu poleceń jest trudne do odtworzenia, udostępnienia lub modyfikacji. Co jeśli musisz ponownie uruchomić tę samą analizę za miesiąc? Co jeśli współpracownik chce użyć dokładnie Twoich ustawień? +Plik parametrów rozwiązuje ten problem. -### 1.2. Rozwiązanie: Użyj pliku parametrów +### 1.2. Plik parametrów -Utwórz plik o nazwie `params.yaml`: +Oto plik `params.yaml`, którego używaliśmy: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -Teraz Twoje polecenie staje się: +Każdy parametr jest zapisany jako para `klucz: wartość`. +Zapisywanie liczb całkowitych bez cudzysłowów (na przykład `mindagap_tilesize: 90`) zachowuje ich typ całkowitoliczbowy, którego wymaga walidacja parametrów pipeline'u. + +Twoje polecenie staje się wtedy: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -To wszystko! Plik parametrów dokumentuje dokładną konfigurację i ułatwia ponowne uruchomienie lub udostępnienie. +Plik parametrów dokumentuje dokładną konfigurację i ułatwia ponowne uruchomienie lub udostępnienie. ### 1.3. Nadpisywanie parametrów @@ -125,7 +122,7 @@ sample,nuclear_image,spot_table,membrane_image mem_only,data/nuclear.tiff,data/spots.txt,data/membrane.tiff ``` -!!! warning "Ostrzeżenie" +!!! Warning "Ostrzeżenie" Zauważ, że ścieżki w arkuszu próbek są względne względem miejsca, **z którego uruchamiasz** Nextflow'a, a nie względem miejsca, w którym znajduje się arkusz próbek. diff --git a/docs/pl/docs/nf4_science/imaging/04_config.md b/docs/pl/docs/nf4_science/imaging/04_config.md index eb2f5ccad5..151d64816c 100644 --- a/docs/pl/docs/nf4_science/imaging/04_config.md +++ b/docs/pl/docs/nf4_science/imaging/04_config.md @@ -131,15 +131,16 @@ Ponieważ używamy `-resume`, Nextflow sprawdzi, czy coś się zmieniło od osta Jeśli parametry, wejścia i kod są takie same, wszystkie zadania będą pobrane z cache'u i pipeline zakończy się niemal natychmiast. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -Zauważ, że wszystkie procesy pokazują `cached: 2` lub `cached: 1` - nic nie zostało ponownie wykonane! +Zauważ adnotację `cached: N` przy każdym procesie - zadania przetwarzania wstępnego i segmentacji pobrane z cache'u nie zostały ponownie wykonane. ### 2.4. Profile testowe diff --git a/docs/pl/docs/nf4_science/rnaseq/02_single-sample.md b/docs/pl/docs/nf4_science/rnaseq/02_single-sample.md index 8f275e7e10..cdd8bb3b47 100644 --- a/docs/pl/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/pl/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` Powinno to działać bardzo szybko, jeśli pracowałeś przez Część 1 i już pobrałeś kontener. @@ -684,7 +694,7 @@ Dodaj wyjścia przycinania do sekcji `publish:`: } ``` -Następnie musimy powiedzieć Nextflow, gdzie umieścić te wyjścia. +Następnie musimy powiedzieć Nextflow'owi, gdzie umieścić te wyjścia. #### 2.2.2. Skonfigurowanie nowych celów wyjściowych @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` To również powinno działać bardzo szybko, ponieważ uruchamiamy na tak małym pliku wejściowym. @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` Możesz znaleźć wyjścia dopasowania w katalogu results. diff --git a/docs/pl/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/pl/docs/nf4_science/rnaseq/03_multi-sample.md index ac998ca894..8e211d4d8f 100644 --- a/docs/pl/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/pl/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` Tym razem każdy krok jest uruchamiany 6 razy, raz dla każdej próbki w pliku CSV. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` Pojedyncze wywołanie MULTIQC zostało dodane po zbuforowanych wywołaniach procesów. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` Teraz mamy dwie nieco rozbieżne wersje naszego workflow'u, jedną dla danych single-end i jedną dla danych paired-end. diff --git a/docs/pl/docs/side_quests/debugging/index.md b/docs/pl/docs/side_quests/debugging/index.md index 3f2370e71a..98c53396b5 100644 --- a/docs/pl/docs/side_quests/debugging/index.md +++ b/docs/pl/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. Używanie nieprawidłowych słów kluczowych lub dyrektyw procesu @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. Używanie nieprawidłowych nazw zmiennych @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ Jeśli otrzymasz błąd „No such variable", możesz go naprawić, definiując val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // Zdefiniuj zmienne w kodzie Groovy przed skryptem @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Nieprawidłowe użycie zmiennych Bash @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Zmienne Groovy a zmienne Bash" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` Definiuj kanały wejściowe wewnątrz bloku workflow i ogólnie stosuj się do innych zaleceń rozszerzenia. @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` Częściej niż w tym przykładzie możesz dodać dodatkowe wejścia do procesu i zapomnieć odpowiednio zaktualizować wywołanie workflow'u, co może prowadzić do tego rodzaju błędu. Na szczęście jest to jeden z łatwiejszych do zrozumienia i naprawienia błędów, ponieważ komunikat o błędzie jest dość jasny co do niezgodności. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "Wyjście polecenia" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` Workflow kończy się bez błędu, ale przetwarza tylko jedną próbkę! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` Teraz powinieneś/powinnaś zobaczyć, że wszystkie trzy próbki są przetwarzane, a nie tylko jedna. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "Wyjście polecenia" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. Techniki debugowania kanałów @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. Brakujące oprogramowanie @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "Wyjście polecenia" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "Uwaga" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker Przyjrzyjmy się `bad_resources.nf`: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // BŁĄD: Nierealistyczny limit czasu input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -Jeśli będziesz uważnie czytać komunikaty o błędach, takie awarie nie powinny Cię długo zastanawiać. Upewnij się jednak, że rozumiesz wymagania zasobowe uruchamianych poleceń, aby móc odpowiednio skonfigurować dyrektywy zasobów. +Na executorze `local` błąd jest mniej czytelny niż na harmonogramie: zamiast komunikatu wskazującego limit czasu otrzymujesz `process hasn't exited` i `WARN: Killing running tasks`. Kluczowe jest tu skojarzenie, że Nextflow zabija zadanie, gdy przekroczy przydzielone zasoby — jeśli więc proces zostaje zakończony bez błędu na poziomie skryptu, sprawdź jego dyrektywy zasobów. W tym przypadku winowajcą jest dyrektywa `time`, ustawiona na zbyt niską wartość w stosunku do wykonywanej pracy. Upewnij się, że rozumiesz wymagania zasobowe uruchamianych poleceń, aby móc odpowiednio skonfigurować dyrektywy zasobów. ### 3.4. Techniki debugowania procesów @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### Sprawdź kod @@ -2249,16 +2237,20 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - Ten tajemniczy błąd wskazuje na problem parsowania wokół wierszy 11–12 w bloku `params{}`. Parser v2 wykrywa problemy strukturalne wcześnie. + Parser wskazuje na wiersz 25 (`script:`), ale prawdziwym winowajcą jest wiersz powyżej: końcowy przecinek po deklaracji `output:` w wierszu 23 sprawia, że parser oczekuje kolejnego wyjścia i zawodzi, gdy napotyka `script:`. To pierwszy z kilku błędów składni do naprawienia. Zastosuj czterofazową metodę debugowania, której się nauczyłeś/nauczyłaś: @@ -2300,7 +2292,7 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b ``` ??? solution "Rozwiązanie" - `buggy_workflow.nf` zawiera 9 lub 10 odrębnych błędów (w zależności od sposobu liczenia) obejmujących wszystkie główne kategorie debugowania. Oto systematyczne omówienie każdego błędu i sposobu jego naprawienia. + `buggy_workflow.nf` zawiera 10 odrębnych błędów obejmujących wszystkie główne kategorie debugowania. Poniżej znajdziesz systematyczne omówienie każdego błędu i sposobu jego naprawienia, w kolejności, w jakiej napotkasz je w Nextflow 26.04. Kompilator przetwarza workflow w dwóch przejściach: najpierw parsuje składnię, a następnie statycznie sprawdza, czy wszystkie zmienne są zdefiniowane. Najpierw więc usuwasz błędy składni, potem grupę błędów niezdefiniowanych zmiennych — i dopiero wtedy workflow w ogóle się uruchamia, a zaczynają pojawiać się błędy wykonania. Zacznijmy od błędów składni: @@ -2315,6 +2307,8 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b path "${sample_id}_result.txt" ``` + Po usunięciu przecinka parser przechodzi do końca pliku, szukając nawiasu zamykającego `processFiles`, i zgłasza `Unexpected input: ''`. + **Błąd 2: Błąd składni — brakujący nawias zamykający** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b } // Dodaj brakujący nawias zamykający ``` + Teraz składnia jest poprawna, więc uruchamia się statyczny sprawdzacz typów. Zgłasza wszystkie niezdefiniowane zmienne naraz, zanim workflow w ogóle się uruchomi: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + Te cztery wiersze odpowiadają trzem odrębnym błędom: Błędom 3, 4 i 5 poniżej. Ostatni z nich, `i`, to zmienna Bash, której sprawdzacz typów nie odróżnia od zmiennej Nextflow — dlatego pojawia się tu na etapie kompilacji, a nie jako błąd wykonania. Napraw wszystkie trzy przed ponownym uruchomieniem. + **Błąd 3: Błąd nazwy zmiennej** ```groovy linenums="26" echo "Processing: ${sample}" // BŁĄD: powinno być sample_id @@ -2348,14 +2353,23 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // BŁĄD: sample_ids niezdefiniowane ``` - **Poprawka:** Użyj poprawnego kanału i wyodrębnij identyfikatory próbek + **Poprawka:** Użyj poprawnego kanału ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - W tym momencie workflow uruchomi się, ale nadal będziemy otrzymywać błędy (np. `Path value cannot be null` w `processFiles`), spowodowane złą strukturą kanału. + **Błąd 5: Błąd poprzedzania zmiennej Bash** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // BŁĄD: $i wygląda jak niezdefiniowana zmienna Nextflow + ``` + **Poprawka:** Poprzedź zmienną Bash ukośnikiem, aby Nextflow przekazał ją do powłoki + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + Po naprawieniu tych błędów workflow kompiluje się i zaczyna działać. Pierwszy błąd wykonania pochodzi z `processFiles`, który oczekuje krotki, ale otrzymuje pojedynczą wartość: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **Błąd 5: Błąd struktury kanału — nieprawidłowe wyjście map** + **Błąd 6: Błąd struktury kanału — nieprawidłowe wyjście map** ```groovy linenums="83" .map { row -> row.sample_id } // BŁĄD: processFiles oczekuje krotki ``` @@ -2364,29 +2378,18 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - Ale to zepsuje nasze wywołanie `heavyProcess()` powyżej, więc będziemy musieli użyć map, aby przekazać tylko identyfikatory próbek do tego procesu: + To naprawia `processFiles`, ale `input_ch` emituje teraz krotkę dwuelementową, a `heavyProcess` nadal otrzymuje całą krotkę zamiast pojedynczej wartości. Krotka jest renderowana w skrypcie jako `[sample_005, /path/sample_005.fastq.gz]`, co psuje polecenie Bash błędem składni i kodem wyjścia 2. - **Błąd 6: Zła struktura kanału dla heavyProcess** + **Błąd 7: Zła struktura kanału dla heavyProcess** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // BŁĄD: input_ch ma teraz 2 elementy na emisję — heavyProcess potrzebuje tylko 1 (pierwszego) + heavy_ch = heavyProcess(input_ch) // BŁĄD: input_ch emituje teraz krotkę 2-elementową; heavyProcess potrzebuje tylko pierwszego elementu ``` - **Poprawka:** Użyj poprawnego kanału i wyodrębnij identyfikatory próbek + **Poprawka:** Przekaż tylko identyfikatory próbek ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - Teraz docieramy dalej, ale otrzymujemy błąd `No such variable: i`, ponieważ nie poprzedziliśmy zmiennej Bash ukośnikiem. - - **Błąd 7: Błąd poprzedzania zmiennej Bash** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // BŁĄD: $i nie jest poprzedzone ukośnikiem - ``` - **Poprawka:** Poprzedź zmienną Bash ukośnikiem - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - Teraz otrzymujemy `Process exceeded running time limit (1ms)`, więc naprawiamy limit czasu dla odpowiedniego procesu: + Teraz `heavyProcess` uruchamia się, ale przekracza limit czasu. Na executorze `local` komunikat brzmi `process hasn't exited` (wraz z ostrzeżeniem `WARN: Killing running tasks`), a nie jawny komunikat o przekroczeniu czasu — powiąż więc zatrzymane zadanie z jego dyrektywą `time`: **Błąd 8: Błąd konfiguracji zasobów** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b time '100 s' ``` - Następnie mamy błąd `Missing output file(s)` do rozwiązania: + Następnie mamy błąd `Missing output file(s)` do rozwiązania, ponieważ skrypt zapisuje `${sample_id}.txt`, ale deklaracja wyjścia oczekuje `${sample_id}_heavy.txt`: **Błąd 9: Niezgodność nazwy pliku wyjściowego** ```groovy linenums="49" @@ -2408,9 +2411,9 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b done > ${sample_id}_heavy.txt ``` - Pierwsze dwa procesy uruchomiły się, ale nie trzeci. + Workflow kończy się teraz bez błędu, ale wyjście `files` jest puste: `handleFiles` nigdy się nie uruchomił. Jego kanał wejściowy, `channel.fromPath("*.txt")`, nie pasuje do żadnych plików w katalogu uruchomienia, więc proces jest po prostu pomijany bez wyraźnego błędu. - **Błąd 10: Niezgodność nazwy pliku wyjściowego** + **Błąd 10: Błędne źródło kanału** ```groovy linenums="88" file_ch = channel.fromPath("*.txt") // Błąd: próba pobrania wejścia z bieżącego katalogu zamiast z procesu handleFiles(file_ch) @@ -2420,7 +2423,7 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b file_ch = handleFiles(heavy_ch) ``` - Po tym cały workflow powinien działać. + Po tym cały workflow działa od początku do końca i wszystkie trzy wyjścia są wypełnione. **Kompletny poprawiony workflow:** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ Czas zastosować systematyczne podejście do debugowania w praktyce. Workflow `b script: """ # Symuluj ciężkie obliczenia - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/pl/docs/side_quests/dev_environment/index.md b/docs/pl/docs/side_quests/dev_environment/index.md index 1d8fa38147..459041e23a 100644 --- a/docs/pl/docs/side_quests/dev_environment/index.md +++ b/docs/pl/docs/side_quests/dev_environment/index.md @@ -86,7 +86,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "O plikach przykładowych" diff --git a/docs/pl/docs/side_quests/essential_scripting_patterns/index.md b/docs/pl/docs/side_quests/essential_scripting_patterns/index.md index 46c13a7a6e..5252415e2a 100644 --- a/docs/pl/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/pl/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, Użyjemy tego realistycznego zestawu danych do eksploracji praktycznych technik programistycznych, które napotkasz w prawdziwych workflow'ach bioinformatycznych. - - - - #### Lista kontrolna gotowości Myślisz, że jesteś gotowy? @@ -112,9 +108,19 @@ Zacznij od prostego workflow, który tylko odczytuje plik CSV (zrobiliśmy to ju ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Dodawanie operatora map @@ -148,7 +162,7 @@ Oto jak wygląda ta operacja map: === "Po" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ Oto jak wygląda ta operacja map: === "Przed" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ Teraz napiszemy logikę **skryptowania** wewnątrz naszego domknięcia, aby tran === "Po" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ Teraz napiszemy logikę **skryptowania** wewnątrz naszego domknięcia, aby tran === "Przed" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ Wprowadź następującą zmianę: === "Po" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ Wprowadź następującą zmianę: === "Przed" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ Dodajmy wiersz tworzący uproszczoną wersję naszych metadanych zawierającą t === "Po" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ Dodajmy wiersz tworzący uproszczoną wersję naszych metadanych zawierającą t === "Przed" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Widać tu zarówno pełne metadane wyświetlane przez operację `view()`, jak i wyodrębniony podzbiór wydrukowany przez `println`. @@ -390,7 +410,7 @@ Wyprowadźmy strukturę kanału składającą się z krotki 2 elementów: wzboga === "Po" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -409,7 +429,7 @@ Wyprowadźmy strukturę kanału składającą się z krotki 2 elementów: wzboga === "Przed" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -485,9 +505,9 @@ nextflow run collect.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -501,7 +521,7 @@ Teraz zobaczmy metodę `collect` na liście w akcji. Zmodyfikuj `collect.nf`, ab === "Po" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - grupuje wiele emisji kanału w jedną @@ -519,7 +539,7 @@ Teraz zobaczmy metodę `collect` na liście w akcji. Zmodyfikuj `collect.nf`, ab === "Przed" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - grupuje wiele emisji kanału w jedną @@ -543,9 +563,9 @@ nextflow run collect.nf ??? success "Wyjście polecenia" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -614,9 +634,9 @@ nextflow run collect.nf ??? success "Wyjście polecenia" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -673,7 +693,7 @@ Wprowadź następującą zmianę do istniejącego workflow `main.nf`: === "Po" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // Skryptowanie do transformacji danych def sample_meta = [ @@ -700,7 +720,7 @@ Wprowadź następującą zmianę do istniejącego workflow `main.nf`: === "Przed" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // Skryptowanie do transformacji danych def sample_meta = [ @@ -743,13 +763,19 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Widać metadane wzbogacone o informacje z nazw plików. @@ -796,8 +822,9 @@ Następnie zmodyfikuj blok `workflow`, aby połączyć kanał `ch_samples` z pro === "Po" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -824,13 +851,23 @@ Następnie zmodyfikuj blok `workflow`, aby połączyć kanał `ch_samples` z pro } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "Przed" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -853,9 +890,18 @@ Następnie zmodyfikuj blok `workflow`, aby połączyć kanał `ch_samples` z pro ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -868,28 +914,41 @@ nextflow run main.nf ??? failure "Wyjście polecenia" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` Widać, że proces próbuje uruchomić `fastp` z wartością `null` dla drugiego pliku wejściowego, co powoduje błąd. Dzieje się tak, ponieważ nasz zestaw danych zawiera odczyty single-end, ale proces jest zakodowany na stałe do obsługi odczytów paired-end (dwa pliki wejściowe jednocześnie). @@ -953,18 +1012,24 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Wygląda dobrze! Jeśli sprawdzimy faktyczne wykonane polecenia (dostosuj do swojego hasha zadania): ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Widzimy, że Nextflow poprawnie wybrał właściwe polecenie dla odczytów single-end: @@ -976,7 +1041,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Inny przykład dynamicznej logiki skryptów można znaleźć w [module Genomics kursu Nextflow for Science](../../nf4_science/genomics/03_joint_calling.md). W tym module wywoływany proces GATK może przyjmować wiele plików wejściowych, ale każdy musi być poprzedzony `-V`, aby utworzyć poprawną linię poleceń. Proces używa skryptowania do transformacji kolekcji plików wejściowych (`all_gvcfs`) w poprawne argumenty polecenia: @@ -1023,11 +1088,12 @@ Dołącz proces do `main.nf` i dodaj go do workflow: === "Po" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1054,15 +1120,25 @@ Dołącz proces do `main.nf` i dodaj go do workflow: ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Przed" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1088,17 +1164,44 @@ Dołącz proces do `main.nf` i dodaj go do workflow: } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` Teraz uruchom workflow i sprawdź wygenerowane raporty w `results/reports/`. Powinny zawierać podstawowe informacje o każdej próbce. - +```bash +nextflow run main.nf +``` ??? success "Wyjście polecenia" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` Ale co, jeśli chcemy dodać informacje o tym, kiedy i gdzie odbyło się przetwarzanie? Zmodyfikujmy proces, aby używał zmiennych **powłoki** i podstawień poleceń, aby uwzględnić w raporcie bieżącego użytkownika, nazwę hosta i datę: @@ -1131,11 +1234,18 @@ Jeśli to uruchomisz, zauważysz błąd — Nextflow próbuje zinterpretować `# ??? failure "Wyjście polecenia" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Musimy to escapować, aby Bash mógł to obsłużyć. @@ -1195,7 +1305,7 @@ Aby zilustrować, jak to wygląda w naszym istniejącym workflow, wprowadź poni === "Po" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1222,22 +1332,33 @@ Aby zilustrować, jak to wygląda w naszym istniejącym workflow, wprowadź poni } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Przed" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1264,6 +1385,15 @@ Aby zilustrować, jak to wygląda w naszym istniejącym workflow, wprowadź poni ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1289,13 +1419,22 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Wynik powinien pokazywać oba procesy zakończone pomyślnie. Workflow jest teraz znacznie czystszy i łatwiejszy w utrzymaniu, a cała złożona logika przetwarzania metadanych jest hermetyzowana w funkcji `separateMetadata`. @@ -1359,26 +1498,35 @@ nextflow run main.nf -ansi-log false ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` Możesz sprawdzić dokładne polecenie `docker`, które zostało uruchomione, aby zobaczyć alokację procesorów dla dowolnego zadania: ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` Powinieneś zobaczyć coś takiego: ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` W tym przykładzie wybraliśmy zadanie, które zażądało 2 procesorów (`--cpu-shares 2048`), ponieważ była to próbka o wysokiej głębokości, ale powinieneś zobaczyć różne alokacje procesorów w zależności od głębokości próbki. Wypróbuj to również dla innych zadań. @@ -1432,7 +1580,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` Wskazuje to, że proces został zabity za przekroczenie limitów pamięci. @@ -1520,7 +1668,7 @@ Dołącz nowy moduł z `modules/trimgalore.nf`: === "Po" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1538,7 +1686,7 @@ Dołącz nowy moduł z `modules/trimgalore.nf`: === "Przed" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1556,14 +1704,26 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` Użyliśmy tu małych, ale potężnych wyrażeń warunkowych wewnątrz operatora `.branch{}` do trasowania próbek na podstawie ich metadanych. Próbki ludzkie o wysokim pokryciu przechodzą przez `FASTP`, podczas gdy wszystkie pozostałe przechodzą przez `TRIMGALORE`. @@ -1583,7 +1743,7 @@ Dodaj następujące przed operacją branch: === "Po" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1603,7 +1763,7 @@ Dodaj następujące przed operacją branch: === "Przed" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1624,21 +1784,31 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -Ponieważ wybraliśmy filtr wykluczający niektóre próbki, wykonano mniej zadań. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +W tym przypadku wszystkie trzy próbki spełniają warunek filtra, więc każda z nich kontynuuje przepływ przez pipeline. +Bardziej rygorystyczny próg wykluczyłby próbki o niskiej głębokości i zmniejszył liczbę wykonywanych zadań. Wyrażenie filtrujące `meta.id && meta.organism && meta.depth >= 25000000` łączy prawdziwość z jawnymi porównaniami: @@ -1708,13 +1878,13 @@ nextflow run main.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` Crash z NullPointerException. @@ -1764,7 +1934,27 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` Żadnego crashu! Workflow obsługuje teraz brakujące pole w sposób kontrolowany. Gdy `row.run_id` jest `null`, operator `?.` zapobiega wywołaniu `.toUpperCase()`, a `run_id` staje się `null` zamiast powodować wyjątek. @@ -1808,7 +1998,7 @@ Dodaj też operator `view()` w workflow, aby zobaczyć wyniki: === "Po" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1817,7 +2007,7 @@ Dodaj też operator `view()` w workflow, aby zobaczyć wyniki: === "Przed" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1870,7 +2060,7 @@ Utwórz funkcję walidacji przed blokiem workflow, wywołaj ją z workflow i zmi === "Po" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1888,6 +2078,7 @@ Utwórz funkcję walidacji przed blokiem workflow, wywołaj ją z workflow i zmi } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1901,6 +2092,7 @@ Utwórz funkcję walidacji przed blokiem workflow, wywołaj ją z workflow i zmi ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1913,9 +2105,9 @@ nextflow run main.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1932,9 +2124,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1948,7 +2140,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "Wyjście polecenia" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Tym razem uruchamia się pomyślnie. @@ -1987,14 +2199,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 + + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2025,7 +2247,7 @@ Dodaj handler zdarzeń do pliku `main.nf`, wewnątrz definicji workflow: === "Po" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2041,15 +2263,21 @@ Dodaj handler zdarzeń do pliku `main.nf`, wewnątrz definicji workflow: println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "Przed" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2064,29 +2292,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Uczyńmy to bardziej użytecznym, dodając logikę warunkową: === "Po" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2109,12 +2352,15 @@ Uczyńmy to bardziej użytecznym, dodając logikę warunkową: println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "Przed" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2130,37 +2376,56 @@ Uczyńmy to bardziej użytecznym, dodając logikę warunkową: println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` -Teraz otrzymujemy jeszcze bardziej informatywne podsumowanie, w tym komunikat o sukcesie/niepowodzeniu: +Teraz otrzymujemy jeszcze bardziej informatywne podsumowanie, w tym komunikat o sukcesie/niepowodzeniu i katalog wyjściowy, jeśli został podany: - +```bash +nextflow run main.nf +``` ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` -Możesz też zapisać podsumowanie do pliku za pomocą operacji na plikach: +Możesz też zapisać podsumowanie dopliku za pomocą operacji na plikach: ```groovy title="main.nf - Writing summary to file" workflow { diff --git a/docs/pl/docs/side_quests/metadata/index.md b/docs/pl/docs/side_quests/metadata/index.md index f6ee0c3b3d..08070ff65f 100644 --- a/docs/pl/docs/side_quests/metadata/index.md +++ b/docs/pl/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Widać, że operator zbudował mapę par klucz-wartość dla każdego wiersza pliku CSV, używając nagłówków kolumn jako kluczy dla odpowiadających im wartości. @@ -265,9 +271,9 @@ Na przykład możemy uzyskać dostęp do identyfikatora pliku przez `id` lub do Oto czego możesz się spodziewać w wynikach: ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -301,7 +307,7 @@ Aby uzyskać dostęp do kolumny `character`, dodaj operację `map` przed operacj .view() ``` -Ten sposób dostępu do konkretnego pola jest szczegółowo wyjaśniony w [tej sekcji](../../hello_nextflow/02_hello_channels.md#43-use-the-map-operator-to-extract-the-greetings) kursu Hello Nextflow, jeśli potrzebujesz przypomnienia. +Ten sposób dostępu do konkretnego pola jest szczegółowo wyjaśniony w [tej sekcji](../../hello_nextflow/02_hello_channels.md#43-use-the-map-operator-to-extract-the-greetings) kursu Hello Nextflow, jeśli potrzebujesz przypomnienia, jak to działa. #### 1.2.2. Uruchom workflow @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Potwierdza to, że możemy uzyskać dostęp do wartości z kolumny `character` dla każdego wiersza. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Jak widać, `COWPY` uruchomił się dla każdego pliku, używając właściwej postaci. @@ -653,12 +678,25 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Wynikiem jest te same siedem plików `cowpy-*.txt` co poprzednio, teraz produkowanych przy prostszym wywołaniu `COWPY`. @@ -743,7 +781,7 @@ Przestrukturyzujmy operację `map`, aby produkowała krotkę `[meta, file]`: === "Przed" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -769,9 +807,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -780,6 +818,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Każdy element kanału jest teraz krotką dwuelementową: najpierw mapa meta, potem plik. @@ -791,7 +835,7 @@ Każdy element kanału jest teraz krotką dwuelementową: najpierw mapa meta, po ] ``` -Jeśli później dodamy kolumnę `language` do arkusza danych, będzie ona dostępna jako `meta.language` bez konieczności wprowadzania jakichkolwiek zmian w definicji wejścia procesu. +Jeśli później dodamy kolumnę `language` do arkusza danych i uwzględnimy ją w operacji `map` (np. `language: row.language`), będzie ona dostępna jako `meta.language` bez konieczności wprowadzania jakichkolwiek zmian w definicji wejścia procesu. #### 1.5.3. Zaktualizuj proces `COWPY`, aby używał mapy meta @@ -890,12 +934,25 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Katalog wyników zawiera teraz pliki z ASCII art. @@ -1043,20 +1100,33 @@ nextflow run main.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` Mamy teraz przewidywanie języka dla każdego pliku w zestawie danych. @@ -1205,19 +1275,32 @@ nextflow run main.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` Tak, to się zgadza! @@ -1321,19 +1404,32 @@ nextflow run main.nf -resume ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` Mapa meta zawiera teraz cztery pola: `id`, `character`, `lang` i `lang_group`. @@ -1444,13 +1540,26 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` Katalog wyników jest teraz zorganizowany według rodziny językowej, a każdy plik nosi nazwę wykrytego języka: @@ -1508,18 +1617,19 @@ Gdy Nextflow podstawia `#!groovy ${meta.character}` do polecenia, narzędzie `CO ??? failure "Wyjście polecenia" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1539,7 +1649,7 @@ Gdy Nextflow podstawia `#!groovy ${meta.character}` do polecenia, narzędzie `CO cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1563,28 +1673,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -Klucz `character` nigdy nie zostanie utworzony w mapie meta. -Gdy skrypt procesu oblicza `#!groovy ${meta.character}`, brakujący klucz zwraca `null`, a Nextflow dosłownie podstawia string `null` do polecenia: +Operacja `map` jawnie zapisuje `#!groovy character: row.character`, więc klucz `character` nadal jest tworzony w mapie meta, jednak odwołanie do kolumny nieistniejącej w sparsowanym wierszu zwraca `null` — jego wartość staje się zatem `null`. +Gdy skrypt procesu oblicza `#!groovy ${meta.character}`, Nextflow dosłownie podstawia string `null` do polecenia: ??? failure "Wyjście polecenia" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1609,7 +1720,7 @@ Gdy skrypt procesu oblicza `#!groovy ${meta.character}`, brakujący klucz zwraca TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/pl/docs/side_quests/nf_test/index.md b/docs/pl/docs/side_quests/nf_test/index.md index da735c6e06..604d66628f 100644 --- a/docs/pl/docs/side_quests/nf_test/index.md +++ b/docs/pl/docs/side_quests/nf_test/index.md @@ -1,17 +1,3 @@ -Looking at the diff, I need to update the following in the existing Polish translation: - -1. Link `../hello_nextflow/README.md` → `../../hello_nextflow/index.md` (Prerequisites section) -2. Link `../envsetup/index.md` → `../../envsetup/index.md` (Open training codespace section) -3. Links `../hello_nextflow/00_orientation.md` → `../../hello_nextflow/00_orientation.md` and `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` (Review materials section) -4. Link `../hello_nextflow/index.md` → `../../hello_nextflow/index.md` (in the collapsible example) -5. Workflow code block: remove `publishDir` lines, add `main:` and `publish:` blocks, add `output` block -6. File assertions: `Holà` → `Hola` -7. Link `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` (in section 2.1) -8. `!!!warning` → `!!! warning` (fix formatting) -9. Link `../` → `../index.md` (What's next section) - -%%% - # Testowanie z nf-test :material-information-outline:{ .ai-translation-notice-icon } Tłumaczenie wspomagane przez AI - [dowiedz się więcej i zasugeruj ulepszenia](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) @@ -33,7 +19,7 @@ Testowanie pozwala systematycznie sprawdzać, czy każda część pipeline'u dzi Istnieje wiele różnych rodzajów testów, które możemy pisać: -1. **Testy na poziomie modułu**: Dla poszczególnych procesów +1. **Testy na poziomie procesu**: Dla poszczególnych procesów 2. **Testy na poziomie workflow'u**: Dla pojedynczego workflow'u 3. **Testy na poziomie pipeline'u**: Dla całego pipeline'u 4. **Testy wydajnościowe**: Dla szybkości i efektywności pipeline'u @@ -41,16 +27,16 @@ Istnieje wiele różnych rodzajów testów, które możemy pisać: Testowanie poszczególnych procesów jest analogiczne do testów jednostkowych w innych językach. Testowanie workflow'u lub całego pipeline'u odpowiada temu, co w innych językach nazywa się testami integracyjnymi — sprawdzamy w nich interakcje między komponentami. -[**nf-test**](https://www.nf-test.com/) to narzędzie umożliwiające pisanie testów na poziomie modułu, workflow'u i pipeline'u. Krótko mówiąc, pozwala systematycznie sprawdzać, czy każda indywidualna część pipeline'u działa zgodnie z oczekiwaniami — _w izolacji_. +[**nf-test**](https://www.nf-test.com/) to narzędzie umożliwiające pisanie testów na poziomie procesu, workflow'u i pipeline'u. Krótko mówiąc, pozwala systematycznie sprawdzać, czy każda indywidualna część pipeline'u działa zgodnie z oczekiwaniami — _w izolacji_. ### Cele szkolenia -W tym zadaniu dodatkowym nauczysz się używać nf-test do pisania testu na poziomie workflow'u dla pipeline'u, a także testów na poziomie modułu dla trzech wywoływanych przez niego procesów. +W tym zadaniu dodatkowym nauczysz się używać nf-test do pisania testu na poziomie workflow'u dla pipeline'u, a także testów na poziomie procesu dla dwóch wywoływanych przez niego procesów. Po ukończeniu tego zadania będziesz potrafić efektywnie stosować następujące techniki: - Inicjalizować nf-test w swoim projekcie -- Generować testy na poziomie modułu i workflow'u +- Generować testy na poziomie procesu i workflow'u - Dodawać typowe rodzaje asercji - Rozumieć, kiedy używać snapshotów, a kiedy asercji treści - Uruchamiać testy dla całego projektu @@ -64,6 +50,16 @@ Przed przystąpieniem do tego zadania dodatkowego powinieneś: - Ukończyć samouczek [Hello Nextflow](../../hello_nextflow/index.md) lub równoważny kurs dla początkujących. - Swobodnie posługiwać się podstawowymi konceptami i mechanizmami Nextflow (procesy, kanały, operatory, praca z plikami, metadane). +!!! warning "Wymagana wersja nf-test" + + Testy na poziomie procesu wymagają **nf-test 0.9.3 lub nowszego**. Starsze wersje (w tym 0.9.2) generują kod szkieletu testowego niezgodny ze ścisłym parserem składni, którego Nextflow używa domyślnie od wersji 26.04, co powoduje błąd `Script compilation failed` zamiast oczekiwanego wyniku testu. + + Sprawdź swoją wersję poleceniem `nf-test version`. Jeśli musisz zaktualizować: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. Pierwsze kroki @@ -95,7 +91,8 @@ Znajdziesz tu główny plik workflow'u oraz plik CSV o nazwie `greetings.csv`, z ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` Szczegółowy opis plików znajdziesz w [rozgrzewce z Hello Nextflow](../../hello_nextflow/00_orientation.md). @@ -125,21 +122,23 @@ Pełny kod workflow'u możesz zobaczyć poniżej. ??? example "Kod workflow'u" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * Parametry pipeline'u - */ + * Parametry pipeline'u + */ params.input_file = "greetings.csv" /* - * Użyj echo, żeby wypisać 'Hello World!' na standardowe wyjście - */ + * Użyj echo, żeby wypisać 'Hello World!' na standardowe wyjście + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -148,15 +147,15 @@ Pełny kod workflow'u możesz zobaczyć poniżej. } /* - * Użyj narzędzia do zamiany tekstu, żeby przekonwertować pozdrowienie na wielkie litery - */ + * Użyj narzędzia do zamiany tekstu, żeby przekonwertować pozdrowienie na wielkie litery + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -197,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` GRATULACJE! Właśnie uruchomiłeś test! @@ -449,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` Sukces! Pipeline uruchamia się pomyślnie i test przechodzi. Uruchamiaj go tyle razy, ile chcesz — zawsze otrzymasz ten sam wynik! @@ -474,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -548,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` Sukces! Pipeline uruchamia się pomyślnie i test przechodzi. Zaczęliśmy teraz testować szczegóły pipeline'u, a nie tylko jego ogólny status. @@ -633,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` Sukces! Testy przechodzą, ponieważ pipeline zakończył się pomyślnie, uruchomiono właściwą liczbę procesów i pliki wyjściowe zostały utworzone. Powinieneś też teraz zobaczyć, jak przydatne jest nadawanie testom informacyjnych nazw. @@ -744,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -814,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -822,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` Sukces! Test przechodzi, ponieważ proces `sayHello` uruchomił się pomyślnie i wyjście zostało utworzone. @@ -872,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` Sukces! Test przechodzi, ponieważ proces `sayHello` uruchomił się pomyślnie i wyjście pasuje do snapshotu. @@ -965,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. Testowanie procesu `convertToUpper` @@ -1012,10 +1040,10 @@ To podobny test do tego dla procesu `sayHello`, ale testuje proces `convertToUpp Musimy teraz dostarczyć pojedynczy plik wejściowy do procesu `convertToUpper`, zawierający tekst, który chcemy przekonwertować na wielkie litery. Możemy to zrobić na wiele sposobów: - Możemy utworzyć dedykowany plik do testów -- Możemy ponownie użyć istniejącego pliku `data/greetings.csv` +- Możemy ponownie użyć istniejącego pliku `greetings.csv` - Możemy go utworzyć w locie w ramach testu -Na razie ponownie użyjmy istniejącego pliku `data/greetings.csv`, korzystając z przykładu użytego w teście na poziomie pipeline'u. Jak poprzednio, możemy nazwać test tak, żeby lepiej odzwierciedlał to, co testujemy, ale tym razem zostawmy „snapshot" treści zamiast sprawdzać konkretne ciągi znaków (jak zrobiliśmy to w przypadku drugiego procesu). +Na razie ponownie użyjmy istniejącego pliku `greetings.csv`, korzystając z przykładu użytego w teście na poziomie pipeline'u. Jak poprzednio, możemy nazwać test tak, żeby lepiej odzwierciedlał to, co testujemy, ale tym razem zostawmy „snapshot" treści zamiast sprawdzać konkretne ciągi znaków (jak zrobiliśmy to w przypadku drugiego procesu). === "Po" @@ -1084,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1092,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` Zwróć uwagę, że utworzyliśmy plik snapshotu dla procesu `convertToUpper` w `tests/main.converttoupper.nf.test.snap`. Jeśli uruchomimy test ponownie, powinniśmy zobaczyć, że nf-test znowu przechodzi. @@ -1111,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### Podsumowanie @@ -1153,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` Spójrz na to! Uruchomiliśmy 4 testy — 1 dla każdego procesu i 2 dla całego pipeline'u — jednym poleceniem. Wyobraź sobie, jak potężne jest to w przypadku dużej bazy kodu! @@ -1207,7 +1235,7 @@ Zajrzyj do [dokumentacji nf-test](https://www.nf-test.com/), żeby poznać bardz - Dodać bardziej kompleksowe asercje do swoich testów - Pisać testy dla przypadków brzegowych i warunków błędów - Skonfigurować ciągłą integrację, żeby testy uruchamiały się automatycznie -- Poznać inne rodzaje testów, takie jak testy workflow'u i modułów +- Poznać inne rodzaje testów, takie jak testy workflow'u, wydajnościowe i obciążeniowe - Zgłębić bardziej zaawansowane techniki walidacji treści **Pamiętaj:** Testy to żywa dokumentacja tego, jak Twój kod powinien się zachowywać. Im więcej testów piszesz i im bardziej szczegółowe są Twoje asercje, tym większą pewność możesz mieć co do niezawodności swojego pipeline'u. @@ -1217,4 +1245,3 @@ Zajrzyj do [dokumentacji nf-test](https://www.nf-test.com/), żeby poznać bardz ## Co dalej? Wróć do [menu zadań dodatkowych](../index.md) lub kliknij przycisk w prawym dolnym rogu strony, żeby przejść do następnego tematu na liście. -%%% diff --git a/docs/pl/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/pl/docs/side_quests/plugin_development/01_plugin_basics.md index 6e1ecabbb6..a804a7d4e3 100644 --- a/docs/pl/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/pl/docs/side_quests/plugin_development/01_plugin_basics.md @@ -510,7 +510,7 @@ Zaktualizuj `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -533,7 +533,7 @@ Wtyczka generuje kilka komunikatów INFO i WARN podczas wykonywania. Są one normalne dla małego przykładu uruchamianego na lokalnej maszynie: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -599,7 +599,7 @@ Dodaj blok `co2footprint` do `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -613,7 +613,7 @@ Dodaj blok `co2footprint` do `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -634,11 +634,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: Ostrzeżenie o strefie zniknęło. Wtyczka używa teraz intensywności emisji dwutlenku węgla właściwej dla Wielkiej Brytanii (163,92 gCO₂eq/kWh) zamiast globalnej wartości zastępczej (480,0 gCO₂eq/kWh). -!!! note "Uwaga" - - Możesz również zobaczyć komunikat `WARN: Unrecognized config option 'co2footprint.location'`. - Jest on kosmetyczny i można go bezpiecznie zignorować — wtyczka nadal poprawnie odczytuje tę wartość. - W Części 6 stworzysz własny zakres konfiguracji dla swojej wtyczki. Ta wtyczka działa wyłącznie poprzez mechanizm obserwatora, podłączając się do zdarzeń cyklu życia workflow'u w celu zbierania metryk zasobów i generowania raportu po zakończeniu pipeline'u. diff --git a/docs/pl/docs/side_quests/plugin_development/02_create_project.md b/docs/pl/docs/side_quests/plugin_development/02_create_project.md index f1eeec9342..9bbd4ca5f2 100644 --- a/docs/pl/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/pl/docs/side_quests/plugin_development/02_create_project.md @@ -5,6 +5,7 @@ :material-information-outline:{ .ai-translation-notice-icon } Tłumaczenie wspomagane przez AI - [dowiedz się więcej i zasugeruj ulepszenia](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) + Wiesz już, jak wtyczki rozszerzają Nextflow'a o funkcjonalności wielokrotnego użytku. Teraz stworzysz własną, zaczynając od szablonu projektu, który zajmuje się konfiguracją budowania za Ciebie. @@ -66,15 +67,15 @@ Powinieneś zobaczyć: ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -134,13 +135,13 @@ Najważniejszy jest blok `nextflowPlugin`: ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -173,7 +174,7 @@ Zaktualizuj ją, aby odpowiadała zainstalowanej wersji Nextflow'a i zapewnić p ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -182,7 +183,7 @@ Zaktualizuj ją, aby odpowiadała zainstalowanej wersji Nextflow'a i zapewnić p ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -251,7 +252,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **Ostrzeżenia są oczekiwane.** diff --git a/docs/pl/docs/side_quests/plugin_development/03_custom_functions.md b/docs/pl/docs/side_quests/plugin_development/03_custom_functions.md index 1fb206df3f..14571349ca 100644 --- a/docs/pl/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/pl/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/pl/docs/side_quests/plugin_development/04_build_and_test.md b/docs/pl/docs/side_quests/plugin_development/04_build_and_test.md index 3d652f0512..78bb2b7ee6 100644 --- a/docs/pl/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/pl/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,16 +215,16 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **Gdzie są wyniki testów?** Gradle ukrywa szczegółowe wyjście, gdy wszystkie testy przechodzą. „BUILD SUCCESSFUL" oznacza, że wszystko zadziałało. Jeśli jakiś test nie przejdzie, zobaczysz szczegółowe komunikaty o błędach. -??? exercise "Ćwiczenie" +??? exercise "Dodaj test przypadku brzegowego" - Dodaj test sprawdzający przypadek brzegowy: czy `reverseGreeting` obsługuje pusty string. + Dodaj test sprawdzający, czy `reverseGreeting` obsługuje pusty string. Co powinno zwrócić `reverseGreeting('')`? Dodaj test, uruchom `make test` i sprawdź, czy przechodzi. diff --git a/docs/pl/docs/side_quests/plugin_development/05_observers.md b/docs/pl/docs/side_quests/plugin_development/05_observers.md index b0beedd860..eeffa1c3ee 100644 --- a/docs/pl/docs/side_quests/plugin_development/05_observers.md +++ b/docs/pl/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "Przykład" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/pl/docs/side_quests/plugin_development/06_configuration.md b/docs/pl/docs/side_quests/plugin_development/06_configuration.md index f852afdf24..c6465cd619 100644 --- a/docs/pl/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/pl/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ Budowanie kończy się niepowodzeniem: ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` W Groovy (i Javie) musisz _zadeklarować_ zmienną przed jej użyciem. diff --git a/docs/pl/docs/side_quests/plugin_development/index.md b/docs/pl/docs/side_quests/plugin_development/index.md index a41928e687..97de62a8d0 100644 --- a/docs/pl/docs/side_quests/plugin_development/index.md +++ b/docs/pl/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ Wcześniejsza znajomość Javy ani Groovy nie jest wymagana. **Katalog roboczy:** `side-quests/plugin_development` +#### Otwórz środowisko szkoleniowe + +Jeśli jeszcze tego nie zrobiłeś/-aś, otwórz środowisko szkoleniowe zgodnie z opisem w sekcji [Konfiguracja środowiska](../../envsetup/index.md). + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Cele szkolenia Po ukończeniu tego szkolenia będziesz potrafić: diff --git a/docs/pl/docs/side_quests/splitting_and_grouping/index.md b/docs/pl/docs/side_quests/splitting_and_grouping/index.md index 37d8082bcf..d78f116eea 100644 --- a/docs/pl/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/pl/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ Wprowadź następujące zmiany w `main.nf`: === "Po" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ Następnie rozważymy sytuację, w której chcemy łączyć na podstawie wielu p ### 3.2. Łączenie na podstawie wielu pól -Mamy 2 repliki dla próbki A, ale tylko 1 dla próbek B i C. W tym przypadku byliśmy w stanie skutecznie je połączyć, używając pola `id`, ale co by się stało, gdyby były niesynchronizowane? Moglibyśmy pomylić próbki normalne i nowotworowe z różnych replik! +Mamy 2 repliki dla pacjenta A, ale tylko 1 dla pacjentów B i C. W tym przypadku byliśmy w stanie skutecznie je połączyć, używając pola `id`, ale co by się stało, gdyby były niesynchronizowane? Moglibyśmy pomylić próbki normalne i nowotworowe z różnych replik! Aby tego uniknąć, możemy łączyć na podstawie wielu pól. Istnieje kilka sposobów, aby to osiągnąć, ale skupimy się na tworzeniu nowego klucza łączenia, który zawiera zarówno `id` próbki, jak i numer `replicate`. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + Ponieważ domknięcie opakowuje teraz każdą ścieżkę za pomocą `file()`, wpisy plików pojawiają się jako rozwiązane ścieżki bezwzględne, a nie same nazwy plików z arkusza próbek. + Użycie nazwanego domknięcia pozwala nam ponownie wykorzystać tę samą transformację w wielu miejscach, zmniejszając ryzyko błędów i czyniąc kod bardziej czytelnym i łatwym w utrzymaniu. ### 3.5. Redukcja duplikacji danych @@ -723,21 +725,21 @@ W naszym workflow'u mamy dużo zduplikowanych danych. Każdy element w połączo ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ W tej sekcji nauczyłeś się: ## 5. Agregowanie próbek za pomocą `groupTuple` -W poprzednich sekcjach nauczyliśmy się dzielić dane z pliku wejściowego i filtrować według określonych pól (w naszym przypadku próbki normalne i nowotworowe). Obejmuje to jednak tylko jeden typ łączenia. Co jeśli chcemy grupować próbki według określonego atrybutu? Na przykład, zamiast łączyć dopasowane pary normalny-nowotworowy, możemy chcieć przetwarzać wszystkie próbki z „próbki A" razem, niezależnie od ich typu. Ten wzorzec jest powszechny w workflow'ach bioinformatycznych, gdzie możesz chcieć przetwarzać powiązane próbki osobno ze względów wydajnościowych, zanim porównasz lub połączysz wyniki na końcu. +W poprzednich sekcjach nauczyliśmy się dzielić dane z pliku wejściowego i filtrować według określonych pól (w naszym przypadku próbki normalne i nowotworowe). Obejmuje to jednak tylko jeden typ łączenia. Co jeśli chcemy grupować próbki według określonego atrybutu? Na przykład, zamiast łączyć dopasowane pary normalny-nowotworowy, możemy chcieć przetwarzać wszystkie próbki z „pacjenta A" razem, niezależnie od ich typu. Ten wzorzec jest powszechny w workflow'ach bioinformatycznych, gdzie możesz chcieć przetwarzać powiązane próbki osobno ze względów wydajnościowych, zanim porównasz lub połączysz wyniki na końcu. Nextflow zawiera wbudowane metody do tego celu — główną, którą omówimy, jest `groupTuple`. @@ -1008,7 +1014,7 @@ Pierwszy krok jest podobny do tego, co robiliśmy w poprzedniej sekcji. Musimy w ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Opanowanie tych operacji na kanałach pozwoli Ci budować elastyczne, skalowalne 2. **Podział danych na osobne kanały:** Użyliśmy `filter` do podziału danych na niezależne strumienie na podstawie pola `type` ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Łączenie dopasowanych próbek:** Użyliśmy `join` do ponownego łączenia powiązanych próbek na podstawie pól `id` i `repeat` @@ -1199,31 +1205,31 @@ Opanowanie tych operacji na kanałach pozwoli Ci budować elastyczne, skalowalne - Łączenie dwóch kanałów według klucza (pierwszego elementu krotki) ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Wyodrębnienie klucza łączenia i łączenie według tej wartości ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - Łączenie na wielu polach przy użyciu subMap + - Łączenie na wielu polach przy użyciu `subMap` ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Rozdzielanie na interwały:** Użyliśmy `combine` do tworzenia iloczynów kartezjańskich próbek z interwałami genomicznymi do przetwarzania równoległego. ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Agregowanie według kluczy grupowania:** Użyliśmy `groupTuple` do grupowania według pierwszego elementu każdej krotki, zbierając tym samym próbki współdzielące pola `id` i `interval` oraz łącząc repliki techniczne. diff --git a/docs/pl/docs/side_quests/workflows_of_workflows/index.md b/docs/pl/docs/side_quests/workflows_of_workflows/index.md index 6472def214..472edd08dc 100644 --- a/docs/pl/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/pl/docs/side_quests/workflows_of_workflows/index.md @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` Aby uczynić go kompozytowalnym z innymi workflow'ami, konieczne jest wprowadzenie kilku zmian. ### 1.2. Uczyń workflow kompozytowalnym -Aby workflow był kompozytowalny, należy wprowadzić cztery zmiany: -workflow otrzymuje nazwę, wejścia przenosi się do bloku `take:`, wyjścia przenosi się do bloku `emit:`, -a samodzielne bloki `publish:`/`output {}` są usuwane (należą do entry workflow). +Aby workflow był kompozytowalny, należy wprowadzić trzy zmiany: +workflow otrzymuje nazwę, wejścia przenosi się do bloku `take:`, a wyjścia przenosi się do bloku `emit:` +(zastępując samodzielne bloki `publish:`/`output {}`, które należą do entry workflow). Omówmy te zmiany po kolei. @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "Zawartość katalogu" @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` Aby uczynić go kompozytowalnym z `GREETING_WORKFLOW`, należy zastosować te same trzy zmiany co w sekcji 1.2. @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "Zawartość katalogu" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "Zawartość pliku" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` Pipeline działa od początku do końca: powitanie zostało zamienione na wielkie litery i odwrócone. diff --git a/docs/pl/docs/side_quests/working_with_files/index.md b/docs/pl/docs/side_quests/working_with_files/index.md index b4825df1b1..216e45baff 100644 --- a/docs/pl/docs/side_quests/working_with_files/index.md +++ b/docs/pl/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Jak widać, Nextflow wypisał ścieżkę dokładnie tak, jak ją napisaliśmy. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Tym razem widzisz pełną ścieżkę bezwzględną zamiast ścieżki względnej, którą podaliśmy jako wejście. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Powyżej widzisz różne atrybuty pliku wypisane na konsolę. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Widać, że jesteśmy w stanie prawidłowo operować na pliku wewnątrz procesu. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Oto najważniejszy fragment: @@ -543,12 +568,13 @@ nextflow run main.nf ??? failure "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -576,9 +602,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Wynik zawiera wiele szczegółów dotyczących błędu, ponieważ proces jest skonfigurowany do wypisywania informacji debugowania, jak wspomniano powyżej. @@ -692,9 +718,9 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -702,9 +728,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Działa! Widać, że niewiele się zmieniło. @@ -813,16 +845,11 @@ Naiwnym sposobem na to byłoby połączenie metody `file()` z [`channel.of()`](h ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` To działa, ale jest nieporęczne. -!!! tip "Wskazówka: kiedy używać `file()` vs `channel.fromPath()`" - - - Używaj `file()`, gdy potrzebujesz pojedynczego obiektu Path do bezpośredniej manipulacji (sprawdzanie, czy plik istnieje, odczytywanie jego atrybutów lub przekazywanie do pojedynczego wywołania procesu) - - Używaj `channel.fromPath()`, gdy potrzebujesz kanału mogącego przechowywać wiele plików, szczególnie ze wzorcami glob, lub gdy pliki będą przepływać przez wiele procesów - Tu właśnie przydaje się [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath): wygodna fabryka kanałów, która łączy całą potrzebną funkcjonalność do generowania kanału z jednego lub więcej statycznych ciągów znaków pliku, a także wzorców glob. ### 3.1. Dodanie fabryki kanałów @@ -877,11 +904,17 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Jak widać, ścieżka pliku jest wczytywana jako obiekt typu `Path` w kanale. @@ -889,6 +922,11 @@ Jest to podobne do tego, co zrobiłaby metoda `file()`, z tą różnicą, że ma Użycie `channel.fromPath()` to wygodny sposób tworzenia nowego kanału wypełnionego listą plików. +!!! tip "Wskazówka: kiedy używać `file()` vs `channel.fromPath()`" + + - Używaj `file()`, gdy potrzebujesz pojedynczego obiektu Path do bezpośredniej manipulacji (sprawdzanie, czy plik istnieje, odczytywanie jego atrybutów lub przekazywanie do pojedynczego wywołania procesu) + - Używaj `channel.fromPath()`, gdy potrzebujesz kanału mogącego przechowywać wiele plików, szczególnie ze wzorcami glob, lub gdy pliki będą przepływać przez wiele procesów + ### 3.2. Wyświetlanie atrybutów plików w kanale W pierwszym podejściu do używania fabryki kanałów uprościliśmy kod i wypisaliśmy tylko nazwę pliku. @@ -934,12 +972,12 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -947,6 +985,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Takie same wyniki jak poprzednio, ale teraz plik jest w kanale, więc możemy dodać więcej. @@ -1003,12 +1047,12 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1024,6 +1068,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Jak widać, mamy teraz dwa obiekty Path w naszym kanale, co pokazuje, że Nextflow poprawnie rozwinął nazwy plików i wczytał oraz przetworzył oba pliki zgodnie z oczekiwaniami. @@ -1108,19 +1158,25 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Każdy element w kanale jest teraz krotką zawierającą `simpleName` i oryginalny obiekt pliku. @@ -1164,19 +1220,25 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Teraz krotka dla każdego elementu w naszym kanale zawiera listę metadanych (np. `[patientA, rep1, normal, R1, 001]`) i oryginalny obiekt pliku. @@ -1265,19 +1327,25 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Teraz metadane są starannie oznaczone (np. `[id:patientA, replicate:1, type:normal, readNum:2]`), więc znacznie łatwiej jest stwierdzić, co jest czym. @@ -1337,10 +1405,10 @@ Zaktualizujmy odpowiednio workflow `main.nf`: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Na razie zakomentuj mapowanie, wrócimy do tego! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1355,13 +1423,13 @@ Zaktualizujmy odpowiednio workflow `main.nf`: === "Przed" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // Wczytaj pliki za pomocą channel.fromFilePairs + // Wczytaj pliki za pomocą channel.fromPath ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1383,12 +1451,11 @@ nextflow run main.nf ??? failure "Wyjście polecenia" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1398,9 +1465,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Ups, tym razem uruchomienie się nie powiodło! @@ -1451,11 +1518,17 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Tym razem workflow zakończył się sukcesem! @@ -1476,10 +1549,10 @@ Odkomentuj operację map w workflow'ie i wprowadź następujące zmiany: // Wczytaj pliki za pomocą channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1496,10 +1569,10 @@ Odkomentuj operację map w workflow'ie i wprowadź następujące zmiany: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Na razie zakomentuj mapowanie, wrócimy do tego! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1526,11 +1599,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` I mamy to: mapa metadanych (`[id:patientA, replicate:1, type:normal]`) na pierwszej pozycji krotki wyjściowej, a po niej krotka sparowanych plików, zgodnie z zamierzeniem. @@ -1642,10 +1721,10 @@ W głównym workflow'ie zastąp operator `.view()` przez `#!groovy .set { ch_sam // Wczytaj pliki za pomocą channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1664,10 +1743,10 @@ W głównym workflow'ie zastąp operator `.view()` przez `#!groovy .set { ch_sam // Wczytaj pliki za pomocą channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1686,11 +1765,17 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Potwierdza to, że możemy teraz odwoływać się do kanału po nazwie. @@ -1714,10 +1799,10 @@ W głównym workflow'ie wprowadź następujące zmiany w kodzie: // Wczytaj pliki za pomocą channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1747,10 +1832,10 @@ W głównym workflow'ie wprowadź następujące zmiany w kodzie: // Wczytaj pliki za pomocą channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1784,12 +1869,19 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` Wyjścia są publikowane w katalogu `results`, więc zajrzyj tam. @@ -1849,12 +1941,26 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` Katalog wyników powinien teraz zawierać wyniki dla wszystkich dostępnych danych. @@ -1885,7 +1991,7 @@ Wprowadź następującą zmianę w bloku `output {}`: === "Po" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1893,7 +1999,7 @@ Wprowadź następującą zmianę w bloku `output {}`: === "Przed" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1911,12 +2017,26 @@ nextflow run main.nf ??? success "Wyjście polecenia" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` Sprawdź teraz katalog wyników: @@ -2069,7 +2189,7 @@ Stosowanie tych technik we własnej pracy pozwoli Ci budować wydajniejsze i ła 5. **Uproszczenie za pomocą channel.fromFilePairs:** Używaliśmy `channel.fromFilePairs()` do automatycznego parowania powiązanych plików i wyodrębniania metadanych z ID sparowanych plików. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Używanie operacji na plikach w procesach:** Integrowaliśmy operacje na plikach z procesami Nextflow'a z właściwą obsługą wejścia, używając bloku `output {}` do organizowania wyjść na podstawie metadanych. @@ -2079,10 +2199,10 @@ Stosowanie tych technik we własnej pracy pozwoli Ci budować wydajniejsze i ła ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], diff --git a/docs/pt/docs/hello_nextflow/01_hello_world.md b/docs/pt/docs/hello_nextflow/01_hello_world.md index d73537058b..9b07e37149 100644 --- a/docs/pt/docs/hello_nextflow/01_hello_world.md +++ b/docs/pt/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "Saída do comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -A saída do terminal deve parecer familiar. Externamente, nada mudou. +A saída do terminal agora termina com um resumo `Outputs:` listando as saídas publicadas e o diretório para o qual foram gravadas. -No entanto, verifique seu explorador de arquivos: desta vez, o Nextflow criou um novo diretório chamado `results/`. +Verifique seu explorador de arquivos: desta vez, o Nextflow também criou um novo diretório chamado `results/`. ??? abstract "Conteúdo do diretório" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Desta vez o resultado é escrito no subdiretório especificado. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Desta vez, se você olhar os resultados, o arquivo é uma cópia adequada em vez de apenas um link simbólico. @@ -767,19 +785,19 @@ No bloco do processo, faça a seguinte alteração de código: === "Depois" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "Antes" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` O símbolo `$` e as chaves (`{ }`) dizem ao Nextflow que este é um nome de variável que precisa ser substituído pelo valor de entrada real (=interpolado). @@ -811,15 +829,15 @@ No bloco do fluxo de trabalho, faça a seguinte alteração de código: === "Depois" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // emite uma saudação - sayHello(params.input) + // emite uma saudação + sayHello(params.input) ``` === "Antes" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // emite uma saudação - sayHello() + // emite uma saudação + sayHello() ``` Isso diz ao Nextflow para executar o processo `sayHello` no valor fornecido através do parâmetro `--input`. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Se você fez todas essas edições corretamente, deve obter outra execução bem-sucedida. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "Se não funcionou" @@ -936,7 +966,8 @@ nextflow run hello-world.nf Isso foi mencionado no início do curso, mas talvez você tenha perdido. Verifique o material de ajuda sobre [versões do Nextflow](../info/nxf_versions.md). - Em resumo, se você estiver usando o Nextflow `25.10`, então precisa habilitar o analisador de linguagem v2: + O analisador v2 é o padrão a partir do Nextflow 26.04, portanto você só verá este erro em versões anteriores. + Em uma versão anterior à 26.04, você precisa habilitar o analisador de linguagem v2: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Mais uma vez, você deve encontrar a saída atualizada correspondente no seu diretório de resultados. @@ -1004,8 +1041,6 @@ Saber como lançar fluxos de trabalho e recuperar saídas é ótimo, mas você r Aqui mostramos como usar o recurso [`-resume`](https://nextflow.io/docs/latest/cache-and-resume.html) para quando você precisar relançar o mesmo fluxo de trabalho, como inspecionar o log de execuções passadas com [`nextflow log`](https://nextflow.io/docs/latest/reference/cli.html#log), e como excluir diretórios work mais antigos com [`nextflow clean`](https://nextflow.io/docs/latest/reference/cli.html#clean). - - ### 4.1. Relance um fluxo de trabalho com `-resume` Às vezes, você vai querer executar novamente um pipeline que já lançou anteriormente sem refazer nenhuma etapa que já foi concluída com sucesso. @@ -1022,17 +1057,23 @@ Existem duas vantagens principais em fazer isso: Para usá-lo, basta adicionar `-resume` ao seu comando e executá-lo: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "Saída do comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` A saída do console deve parecer familiar, mas há uma coisa que é um pouco diferente em comparação com antes. diff --git a/docs/pt/docs/hello_nextflow/02_hello_channels.md b/docs/pt/docs/hello_nextflow/02_hello_channels.md index a19820acde..2c08eb42a2 100644 --- a/docs/pt/docs/hello_nextflow/02_hello_channels.md +++ b/docs/pt/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` Como anteriormente, você encontrará o arquivo de saída chamado `output.txt` no diretório `results/hello_channels` (como especificado no bloco `output` do script de fluxo de trabalho, mostrado acima). @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Se você fez ambas as edições corretamente, deve obter uma execução bem-sucedida. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "Saída do comando" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Como você pode ver, isso exibe o conteúdo do canal no console. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "Saída do comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Certamente parece ter executado bem. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Desta vez vemos todas as três execuções de processo e seus subdiretórios de trabalho associados listados na saída. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Voltando à visualização de resumo, a saída é resumida em uma linha novamente. @@ -605,8 +652,6 @@ Dê uma olhada no diretório `results` para ver se todas as saudações de saíd └── output.txt ``` -Sim! E cada uma tem o conteúdo esperado. - ??? abstract "Conteúdo do arquivo" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "Saída do comando" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -941,16 +986,25 @@ nextflow run hello-channels.nf ??? success "Saída do comando" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Desta vez funciona E nos dá a percepção adicional do que o conteúdo do canal parece antes e depois de executarmos o operador `flatten()`. @@ -1024,11 +1078,13 @@ Faça a seguinte edição na declaração do parâmetro: === "Antes" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Pipeline parameters */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` Isso assume que o arquivo está localizado junto com o código do fluxo de trabalho. @@ -1095,9 +1151,9 @@ nextflow run hello-channels.nf ??? failure "Saída do comando" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1198,12 +1254,12 @@ nextflow run hello-channels.nf ??? failure "Saída do comando" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1318,12 +1374,12 @@ nextflow run hello-channels.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1331,6 +1387,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` Desta vez deve executar sem erros. diff --git a/docs/pt/docs/hello_nextflow/03_hello_workflow.md b/docs/pt/docs/hello_nextflow/03_hello_workflow.md index 4cf28c038c..2323d246f1 100644 --- a/docs/pt/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/pt/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` Como anteriormente, você encontrará os arquivos de saída no local especificado no bloco `output`. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` Agora há uma linha extra na saída do console que corresponde ao novo processo que acabamos de adicionar. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "Saída do comando" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + A saída do terminal agora também termina com um bloco de resumo `Outputs:`. Omitimos aqui para focar nas linhas de status dos processos. + Ele executa com sucesso, incluindo a terceira etapa. No entanto, observe o número de chamadas para `collectGreetings()` na última linha. @@ -627,8 +651,8 @@ Agora dê uma olhada no conteúdo do arquivo de saída final. ??? abstract "Conteúdo do arquivo" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` Oh não. A etapa de coleta foi executada individualmente em cada saudação, o que NÃO é o que queríamos. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ Finalmente, você pode dar uma olhada no conteúdo do arquivo de saída para se ??? abstract "Conteúdo do arquivo" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` Ele executa com sucesso e produz a saída desejada: ??? abstract "Conteúdo do arquivo" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1156,14 +1194,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` Se você olhar no diretório `results/hello_workflow/`, encontrará o novo arquivo de relatório, `trio-report.txt`. @@ -1273,5 +1326,5 @@ Ao fornecer múltiplas entradas para um processo, o que deve ser verdadeiro? - [x] A ordem das entradas deve corresponder à ordem definida no bloco de entrada - [ ] Apenas duas entradas podem ser fornecidas por vez -Saiba mais: [3. Passe parâmetros adicionais para um processo](#3-pass-more-than-one-input-to-a-process) +Saiba mais: [3. Passe parâmetros adicionais para um processo](#3-pass-additional-parameters-to-a-process) diff --git a/docs/pt/docs/hello_nextflow/04_hello_modules.md b/docs/pt/docs/hello_nextflow/04_hello_modules.md index 71e0e26cc2..2dd655dd70 100644 --- a/docs/pt/docs/hello_nextflow/04_hello_modules.md +++ b/docs/pt/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` Como anteriormente, você encontrará os arquivos de saída no diretório especificado no bloco `output` (aqui, `results/hello_modules/`). @@ -172,7 +187,7 @@ Vamos inserir isso acima do bloco `params` e preenchê-lo adequadamente. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ Vamos inserir isso acima do bloco `params` e preenchê-lo adequadamente. * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ Insira a declaração de importação acima do bloco `params` e preencha-a adequ * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ Insira a declaração de importação acima do bloco `params` e preencha-a adequ * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ Insira a declaração de importação acima do bloco `params` e preencha-a adequ * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ Insira a declaração de importação acima do bloco `params` e preencha-a adequ * Pipeline parameters */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/pt/docs/hello_nextflow/05_hello_containers.md b/docs/pt/docs/hello_nextflow/05_hello_containers.md index d6047cefe2..23b2a887e3 100644 --- a/docs/pt/docs/hello_nextflow/05_hello_containers.md +++ b/docs/pt/docs/hello_nextflow/05_hello_containers.md @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` Como anteriormente, você encontrará os arquivos de saída no diretório especificado no bloco `output` (`results/hello_containers/`). @@ -259,22 +273,22 @@ Agora que você está dentro do contêiner, pode executar o comando `cowpy` dire Por exemplo, a documentação da ferramenta diz que podemos mudar o personagem ('cowacter') com `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Saída do comando" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "Saída do comando (editada para clareza)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` Desta vez realmente funciona! diff --git a/docs/pt/docs/hello_nextflow/06_hello_config.md b/docs/pt/docs/hello_nextflow/06_hello_config.md index 7ca7e844ac..c59318a714 100644 --- a/docs/pt/docs/hello_nextflow/06_hello_config.md +++ b/docs/pt/docs/hello_nextflow/06_hello_config.md @@ -3,7 +3,7 @@ :material-information-outline:{ .ai-translation-notice-icon } Tradução assistida por IA - [saiba mais e sugira melhorias](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md)
- +
/// caption @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Como anteriormente, você encontrará os arquivos de saída no diretório especificado no bloco `output` (`results/hello_config/`). @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Isso ainda produz a mesma saída de antes. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` Isso criará um novo conjunto de diretórios em `tux-run/` incluindo `tux-run/work/` e `tux-run/results/`. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` O arquivo de saída final deve conter o caractere stegosaurus dizendo as saudações. @@ -485,7 +549,7 @@ Quando estamos controlando como nossas saídas 'publicadas' são organizadas, te - O diretório de saída de nível superior - Como os arquivos são organizados dentro deste diretório -Temos usado o diretório de nível superior padrão até agora: `results`. +Temos usando o diretório de nível superior padrão até agora: `results`. Vamos começar personalizando isso, usando a opção CLI `-output-dir`. #### 2.1.1. Execute o pipeline com `-output-dir` @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Isso publica saídas em `custom-outdir-cli/` em vez de `results/`: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` Isso publica saídas em `custom-outdir-config-2/rep2/`, com o caminho base especificado _e_ o subdiretório do nome do lote _e_ resultados agrupados por processo: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Isso publica saídas em `config-output-mode/`, e elas ainda são todas cópias adequadas, não symlinks. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "Saída do comando" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` Isso deve funcionar sem problemas e produzir as mesmas saídas de antes em `custom-outdir-config/conda`. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Como você pode ver, isso nos permite alternar entre configurações muito convenientemente no tempo de execução. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` Isso usará Docker onde possível e produzirá saídas em `custom-outdir-config/test`, e desta vez o caractere é a dupla cômica `dragonandcow`. diff --git a/docs/pt/docs/hello_nf-core/00_orientation.md b/docs/pt/docs/hello_nf-core/00_orientation.md index e6b9555df7..a9f06e0f29 100644 --- a/docs/pt/docs/hello_nf-core/00_orientation.md +++ b/docs/pt/docs/hello_nf-core/00_orientation.md @@ -22,25 +22,20 @@ Se você está trabalhando neste curso por conta própria, por favor familiarize ### Requisitos de versão -Este treinamento é projetado para **Nextflow 25.10.2** ou posterior **com o analisador de sintaxe v2 DESABILITADO**. +Este treinamento funciona com o Nextflow 25.10.2 ou posterior **com o analisador de sintaxe v2**, que é o padrão a partir do Nextflow 26.04 em diante. +Em nosso ambiente de treinamento, você não precisa fazer nada: ele executa o Nextflow 26.04.4 com o analisador v2. Se você estiver usando um ambiente local ou personalizado, consulte as [notas de versão](../info/nxf_versions.md). -#### Se você está usando nosso ambiente de treinamento: - -Você DEVE executar o seguinte comando antes de prosseguir: - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### Se você está usando um ambiente local ou personalizado: - -Por favor certifique-se de que está usando as configurações corretas conforme documentado [aqui](../info/nxf_versions.md). - -O treinamento adicionalmente requer **nf-core tools 3.5.2**. +Este treinamento adicionalmente requer **nf-core tools 4.0.2**. Se você usar uma versão diferente das ferramentas nf-core, você pode ter dificuldades em acompanhar. Você pode verificar qual versão está instalada em seu ambiente usando o comando `nf-core --version`. +!!! warning "Compatibilidade com o analisador v2" + + Muitos pipelines nf-core ainda não suportam o analisador de sintaxe v2. + Se você executar um pipeline nf-core diferente dos usados neste curso e encontrar erros, pode ser necessário mudar para o analisador v1 definindo `export NXF_SYNTAX_PARSER=v1`. + Consulte as [notas de versão](../info/nxf_versions.md) para mais detalhes. + ## Prepare-se para trabalhar Uma vez que seu codespace esteja executando, há duas coisas que você precisa fazer antes de mergulhar no treinamento: configurar seu diretório de trabalho para este curso específico e dar uma olhada nos materiais fornecidos. @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ Usamos seções recolhíveis como esta para incluir a saída esperada de comando - **O arquivo `greetings.csv`** é um CSV contendo alguns dados colunares mínimos que usamos para fins de teste. +- **O arquivo `custom.config`** é um exemplo de arquivo de configuração Nextflow usado na Parte 1 para demonstrar substituições de recursos de processos e `ext.args`. + +- **O arquivo `malformed_samplesheet.csv`** é uma planilha de amostras intencionalmente quebrada usada na Parte 1 para demonstrar a validação de entrada. + +- **O arquivo `my_params.yml`** é um exemplo de arquivo de parâmetros usado na Parte 1 para demonstrar como passar parâmetros booleanos para um pipeline. + - **O diretório `original-hello`** contém uma cópia do código fonte produzido ao trabalhar na série completa de treinamento Hello Nextflow (com Docker habilitado). - **O diretório `solutions`** contém os scripts de fluxo de trabalho completos que resultam de cada etapa do curso. @@ -112,7 +116,7 @@ Acha que está pronto para mergulhar? - [ ] Eu entendo o objetivo deste curso e seus pré-requisitos - [ ] Meu ambiente está ativo e funcionando -- [ ] Eu me certifiquei de que o analisador de sintaxe está configurado para **v1** +- [ ] Estou usando nf-core tools 4.0.2 (verifique com `nf-core --version`) - [ ] Eu configurei meu diretório de trabalho apropriadamente Se você pode marcar todas as caixas, você está pronto para começar. diff --git a/docs/pt/docs/hello_nf-core/01_run_demo.md b/docs/pt/docs/hello_nf-core/01_run_demo.md index c74ea90a66..06c2b8ef7d 100644 --- a/docs/pt/docs/hello_nf-core/01_run_demo.md +++ b/docs/pt/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ A aba `Introduction` fornece uma visão geral do pipeline, incluindo uma represe ![pipeline subway map](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. Exemplo de linha de comando @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` O Nextflow faz um `pull` do código do pipeline, o que significa que ele baixa o repositório completo para sua unidade local. @@ -106,40 +107,73 @@ nextflow list Você pode tentar fazer o pull de alguns outros pipelines para ver como eles aparecem na lista quando você tem mais de um. -#### 1.2.3. Encontrar seus pipelines em `$NXF_HOME/assets/` +#### 1.2.3. Encontrar onde o pipeline foi baixado Você notará que os arquivos não estão no seu diretório de trabalho atual. -Por padrão, o Nextflow os salva em `$NXF_HOME/assets`. +Por padrão, o Nextflow salva os pipelines baixados em `$NXF_HOME/assets`. + +Para encontrar onde um pipeline específico está localizado, pergunte diretamente ao Nextflow: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "Saída do comando" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "Nota" +!!! info "Info" O caminho completo pode ser diferente no seu sistema se você não estiver usando nosso ambiente de treinamento. O Nextflow mantém o código-fonte baixado intencionalmente 'fora do caminho' com base no princípio de que esses pipelines devem ser usados mais como bibliotecas do que código com o qual você interagiria diretamente. +Internamente, o Nextflow armazena cada pipeline baixado como um repositório git em `$NXF_HOME/assets/.repos/`, e faz o checkout do código de cada revisão em um subdiretório `clones//`. +Como `.repos` é um diretório oculto, um simples `tree -L 2 $NXF_HOME/assets/` parecerá vazio. + #### 1.2.4. Criar um link simbólico para acessar o código-fonte facilmente Não vamos examinar o código em detalhes, mas vamos dar uma rápida olhada apenas para ter uma ideia de como é a organização geral. -Para facilitar a navegação pelo código-fonte do pipeline, crie um link simbólico para o diretório de assets: +Para facilitar a navegação pelo código-fonte do pipeline, crie um link simbólico apontando para a cópia do pipeline que foi baixada: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -Isso cria um atalho para que você possa explorar o código com `tree -L 2 pipelines` ou abrir arquivos diretamente. +Isso cria um atalho para que você possa explorar o código com `tree -L 2 pipelines/nf-core/demo` ou abrir arquivos diretamente. #### 1.2.5. Visão geral da organização do código @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` Como você pode ver, há muita coisa acontecendo lá, mas a maior parte não precisa ser motivo de preocupação. @@ -211,7 +247,7 @@ Convenientemente, todo pipeline do nf-core vem com um perfil de teste. Este é um conjunto mínimo de configurações para o pipeline executar usando um pequeno conjunto de dados de teste hospedado no repositório [nf-core/test-datasets](https://github.com/nf-core/test-datasets). É uma ótima maneira de experimentar rapidamente um pipeline em pequena escala. -!!! note "Nota" +!!! tip "Dica" O sistema de perfil de configuração do Nextflow permite que você alterne facilmente entre diferentes motores de contêiner ou ambientes de execução. Para mais detalhes, consulte [Hello Nextflow Parte 6: Configuração](../hello_nextflow/06_hello_config.md). @@ -220,10 +256,10 @@ Este é um conjunto mínimo de configurações para o pipeline executar usando u É uma boa prática verificar o que o perfil de teste de um pipeline especifica antes de executá-lo. O perfil `test` para `nf-core/demo` está no arquivo de configuração `conf/test.config`. -Você pode encontrá-lo localmente dentro do código-fonte do pipeline que o `nextflow pull` baixou: +Você pode encontrá-lo localmente dentro do código-fonte do pipeline que o `nextflow pull` baixou, através do link simbólico `pipelines` criado na seção 1.2.4: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` Aqui está o conteúdo desse arquivo: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Dados de entrada - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` Isso é chamado de planilha de amostras e é a forma mais comum de entrada para pipelines do nf-core. +Não se preocupe se você não estiver familiarizado com os formatos e tipos de dados, isso não é importante para o que se segue. -!!! note "Nota" - - Não se preocupe se você não estiver familiarizado com os formatos e tipos de dados, isso não é importante para o que se segue. - -Então isso confirma que temos tudo o que precisamos para experimentar o pipeline. +Agora temos tudo o que precisamos para experimentar o pipeline. ### 2.2. Executar o pipeline -Vamos decidir usar Docker para o sistema de contêiner e `demo-results` como o diretório de saída, e estamos prontos para executar o comando de teste: +Conforme mencionado acima, podemos usar o comando de teste de exemplo quase como está; só precisamos especificar qual sistema de empacotamento de software usar e como nomear o diretório de saída. +Aqui usaremos Docker para o sistema de contêiner e `demo-results`, respectivamente. + +Com isso, podemos executar o comando de teste: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ Se sua saída corresponder a isso, parabéns! Você acabou de executar seu prime Você notará que há muito mais saída no console do que quando você executa um pipeline Nextflow básico. Há um cabeçalho que inclui um resumo da versão do pipeline, entradas e saídas, e alguns elementos de configuração. -!!! note "Nota" +!!! info "Info" Sua saída mostrará carimbos de data/hora, nomes de execução e caminhos de arquivo diferentes, mas a estrutura geral e a execução do processo devem ser semelhantes. Observe a linha próxima ao topo da saída: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` Isso informa qual revisão do pipeline foi usada. @@ -379,7 +417,7 @@ Como não especificamos uma versão, o Nextflow usou o commit mais recente no `m Para execuções reproduzíveis, você deve fixar uma versão específica usando a flag `-r`: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` Isso garante que o mesmo código do pipeline seja usado sempre, independentemente de novos commits ou lançamentos. @@ -388,14 +426,15 @@ Para este treinamento, omitimos `-r` por simplicidade, mas em produção você d Seguindo para a saída de execução, vamos dar uma olhada nas linhas que nos dizem quais processos foram executados: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Isso nos diz que três processos foram executados, correspondendo às três ferramentas mostradas na página de documentação do pipeline no site do nf-core: FASTQC, SEQTK_TRIM e MULTIQC. +Isso nos diz que quatro processos foram executados, correspondendo às quatro ferramentas mostradas na página de documentação do pipeline no site do nf-core: `FASTQC`, `SEQTK_TRIM`, `MULTIQC` e `COWPY`. Os nomes completos dos processos como mostrado aqui, como `NFCORE_DEMO:DEMO:MULTIQC`, são mais longos do que o que você pode ter visto no material introdutório do Hello Nextflow. Estes incluem os nomes de seus fluxos de trabalho pai e refletem a modularidade do código do pipeline. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` Isso pode parecer muito. -Para saber mais sobre as saídas do pipeline `nf-core/demo`, consulte sua [página de documentação](https://nf-co.re/demo/1.1.0/docs/output/). +Para saber mais sobre as saídas do pipeline `nf-core/demo`, consulte sua [página de documentação](https://nf-co.re/demo/1.2.0/docs/output/). Nesta etapa, o que é importante observar é que os resultados são organizados por módulo, e há adicionalmente um diretório chamado `pipeline_info` contendo vários relatórios com carimbos de data/hora sobre a execução do pipeline. @@ -443,7 +485,7 @@ Por exemplo, o arquivo `execution_timeline_*` mostra quais processos foram execu ![execution timeline report](./img/execution_timeline.png) -!!! note "Nota" +!!! info "Info" Aqui as tarefas não foram executadas em paralelo porque estamos executando em uma máquina minimalista no Github Codespaces. Para ver essas execuções em paralelo, tente aumentar a alocação de CPU do seu codespace e os limites de recursos na configuração de teste. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,24 +596,98 @@ Em pipelines Nextflow simples, `--help` só funciona se o desenvolvedor o implem Conforme abordado em [Hello Config](../hello_nextflow/06_hello_config.md), você pode definir valores de parâmetros na linha de comando com `--nome_do_param` ou coletar um conjunto de parâmetros em um arquivo YAML e passá-lo com `-params-file`. Ambas as abordagens funcionam da mesma forma com pipelines do nf-core. -Por exemplo, para pular a etapa de trimming: +Por exemplo, para pular a etapa de trimming, queremos definir o parâmetro boolean `skip_trim` como `true`. +Um arquivo de parâmetros chamado `my_params.yml` está disponível no seu diretório de trabalho com esse valor já definido: + +```yaml title="my_params.yml" +skip_trim: true +``` + +Passe-o com `-params-file`: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "Saída do comando" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` O processo `SEQTK_TRIM` não aparece mais na saída. -!!! info "Info" +!!! warning "Aviso: Limitações importantes sobre entradas de parâmetros" + + **Definindo parâmetros boolean na linha de comando** + + A partir da versão 26.04 do Nextflow, todos os valores fornecidos na linha de comando são tipados como strings. + Para um parâmetro boolean como `skip_trim`, passá-lo como uma flag simples (`--skip_trim`) ou como `--skip_trim true` é avaliado como a **string** `"true"`, o que falha na validação do schema: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + Para definir um parâmetro boolean com um valor genuíno `true`/`false`, use um `-params-file` como mostrado acima, ou defina-o em um arquivo de configuração. + Parâmetros do tipo string, integer e file-path não são afetados e ainda podem ser definidos diretamente na linha de comando. + Este curso usa esse padrão ao longo de todo o material para parâmetros boolean. + + **Usando arquivos de configuração personalizados** Embora seja tecnicamente possível definir parâmetros do pipeline em um arquivo de configuração personalizado passado com `-c`, isso pode não substituir os padrões já definidos no próprio `nextflow.config` do pipeline, dependendo das regras de precedência de configuração do Nextflow. Usar `--nome_do_param` na linha de comando ou `-params-file` é mais confiável, pois estes sempre têm precedência. @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` O pipeline ainda é executado, mas o aviso alerta imediatamente que `--foobar` não é um parâmetro reconhecido. -Isso detecta erros de digitação como `--outDir` em vez de `--outdir` antes que você desperdice tempo de computação se perguntando por que a saída foi para o lugar errado. +Isso serve para chamar sua atenção para erros de digitação que não causam falha, como usar `--outDir` em vez de `--outdir`, o que pode ajudá-lo a evitar desperdício de tempo e recursos computacionais. ##### 3.1.3.2. Valores de parâmetros inválidos @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` O pipeline para antes que qualquer processo seja executado, evitando uma execução com falha ou incorreta. -Parâmetros boolean devem ser passados como flags (`--skip_trim`) sem um valor, ou definidos como `true`/`false` em um arquivo de parâmetros. +Conforme mencionado na seção 3.1.2, parâmetros boolean devem ser definidos com um valor genuíno `true`/`false` em um arquivo de parâmetros em vez de serem passados na linha de comando, pois os valores da linha de comando são tipados como strings. #### 3.1.4. Validação de entrada @@ -637,7 +756,7 @@ Também abordamos isso com mais detalhes na [Parte 5: Validação de Entrada](05 O pipeline `nf-core/demo` espera um arquivo CSV com as colunas `sample`, `fastq_1` e `fastq_2`. Isso é definido em um arquivo de schema (`assets/schema_input.json`) que especifica a estrutura esperada, tipos de coluna e restrições. -??? abstract "assets/schema_input.json" +??? abstract "Arquivo de schema para entradas" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Isso é definido em um arquivo de schema (`assets/schema_input.json`) que especi O schema especifica que `sample` e `fastq_1` são obrigatórios, enquanto `fastq_2` é opcional (suportando dados paired-end e single-end). Os caminhos de arquivo são validados quanto à existência e padrão de extensão. -##### 3.1.4.1. Criar uma planilha de amostras inválida - -Crie uma planilha de amostras com uma coluna ausente e um caminho de arquivo inexistente: +Para demonstrar isso, fornecemos uma planilha de amostras malformada chamada `malformed_samplesheet.csv` no seu diretório de trabalho: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` Esta planilha de amostras está faltando a coluna obrigatória `fastq_1` e tem um caminho de arquivo inexistente em `fastq_2`. -Ambos os problemas produzirão erros de validação na próxima etapa. - -##### 3.1.4.2. Executar o pipeline de demonstração com a planilha de amostras inválida -Execute o pipeline de demonstração usando `malformed_samplesheet.csv` como entrada. +Execute o pipeline de demonstração usando `malformed_samplesheet.csv` como entrada: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -725,14 +840,27 @@ Os pipelines do nf-core incluem configuração padrão em `nextflow.config` e no Antes de substituir qualquer coisa, é útil saber onde ficam os padrões. Você já viu na seção 2.1 que o código-fonte do pipeline está em `$NXF_HOME/assets`. -Liste os arquivos de configuração para ver o que está disponível: +Usando o link simbólico `pipelines` da seção 1.2.4, liste os arquivos de configuração para ver o que está disponível: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ Se você deseja modificar qualquer uma das configurações especificadas nesses Em vez disso, crie seu próprio arquivo de configuração e passe-o com `-c`. Os valores que você especificar substituirão os valores padrão definidos nesses outros arquivos. -Vamos percorrer alguns exercícios para fazer isso na prática. +Vamos experimentar isso na prática. -#### 3.2.1. Alterar a alocação de recursos para um processo +#### 3.2.1. Personalizar recursos de processos e argumentos de ferramentas -O pipeline de demonstração atribui recursos usando labels definidos em `base.config`. -Por exemplo, `FASTQC` usa o label `process_medium`, que aloca 6 CPUs e 36 GB de memória. +Os módulos do nf-core suportam dois tipos comuns de substituição de configuração: **alocação de recursos** (CPUs, memória, tempo) e **argumentos de ferramentas** via `ext.args`. -O perfil de teste limita recursos via `resourceLimits`, mas você também pode substituir recursos para processos específicos. +Muitas ferramentas de linha de comando têm argumentos que não são usados com frequência suficiente para serem expostos como parâmetros do pipeline. +A convenção `ext.args` permite que você passe esses argumentos para a ferramenta subjacente através de um arquivo de configuração. -Crie um arquivo chamado `custom.config`: +O arquivo `custom.config` disponível no seu diretório de trabalho demonstra ambas as substituições: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -Execute o pipeline com sua configuração personalizada: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "Saída do comando" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -A flag `-c` adiciona sua configuração sobre a configuração integrada do pipeline. - -#### 3.2.2. Definir valores de argumentos de ferramentas com `ext.args` - -Muitas ferramentas de linha de comando têm argumentos que não são obrigatórios e, portanto, não são configurados como parâmetros do pipeline, a menos que sejam muito comumente usados. -Para esses argumentos de ferramentas, os módulos do nf-core usam uma convenção do Nextflow chamada `ext.args` para passar argumentos para a ferramenta subjacente através de um arquivo de configuração. - -Por exemplo, vamos adicionar um argumento de trimming ao módulo `SEQTK_TRIM` usando `ext.args`. - -##### 3.2.2.1. Atualizar a configuração personalizada - -Atualize seu `custom.config`: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -Isso instrui o `seqtk trimfq` a remover 5 bases do início de cada leitura, além do trimming por qualidade. +O primeiro bloco substitui a alocação de recursos do `FASTQC`. +Por padrão, o `FASTQC` usa o label `process_medium` do `base.config`, que aloca 6 CPUs e 36 GB de memória; aqui limitamos a 2 CPUs e 4 GB. -##### 3.2.2.2. Executar o pipeline +O segundo bloco passa um argumento extra para o `SEQTK_TRIM` via `ext.args`. +A flag `-b 5` instrui o `seqtk trimfq` a remover 5 bases do início de cada leitura, além do trimming por qualidade. -Execute o pipeline novamente com esta configuração para ver o efeito: +Execute o pipeline com esta configuração: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "Saída do comando" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Para verificar se o argumento foi aplicado, encontre o hash do diretório de trabalho do `SEQTK_TRIM` na saída da execução (por exemplo, `work/ab/cd1234...`) e verifique o arquivo `.command.sh` dentro dele: +A flag `-c` adiciona sua configuração sobre a configuração integrada do pipeline. + +Para verificar se a substituição do `ext.args` teve efeito, encontre o hash do diretório de trabalho do `SEQTK_TRIM` na saída da execução (por exemplo, `work/17/428668...`) e verifique o arquivo `.command.sh` dentro dele: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "Saída do comando" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` -Você deve ver `-b 5` no comando `seqtk trimfq`, confirmando que sua substituição de `ext.args` teve efeito. +Você deve ver `-b 5` no comando `seqtk trimfq`. -##### 3.2.2.3. Substituindo valores padrão - -Alguns módulos já têm `ext.args` definido por padrão. -Por exemplo, o módulo `FASTQC` é configurado com `ext.args = '--quiet'` por padrão (definido em `conf/modules.config`). +Uma coisa importante a saber sobre `ext.args`: se um módulo já tem um valor padrão definido, seu valor irá **substituí-lo completamente** em vez de ser adicionado a ele. +Por exemplo, o `FASTQC` tem `ext.args = '--quiet'` definido por padrão em `conf/modules.config`: ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -Se você fornecer um valor para `ext.args` via um arquivo de configuração personalizado, esse valor substituirá completamente o padrão definido para aquele processo. - -Então, por exemplo, se o padrão era `'--quiet'` e você definir `ext.args = '--kmers 8'`, a flag `--quiet` não será mais aplicada. +Se você definir `ext.args = '--kmers 8'` para o `FASTQC`, a flag `--quiet` não será mais aplicada. Para manter ambos, defina `ext.args = '--quiet --kmers 8'`. -Isso significa que você é responsável por verificar qual é a configuração padrão das ferramentas para as quais deseja fornecer valores de argumento com `ext.args`. +Você deve sempre verificar a configuração padrão de um módulo antes de substituir `ext.args`. ### Conclusão @@ -878,4 +976,6 @@ Você sabe como obter ajuda de um pipeline do nf-core, definir parâmetros e ent ### O que vem a seguir? -Faça uma pausa! Quando estiver pronto, passe para a Parte 2, onde você criará seu próprio pipeline compatível com o nf-core do zero. +Se você só quer executar pipelines do nf-core, você terminou! + +Se você quer aprender a desenvolver seus próprios pipelines seguindo os padrões do nf-core, faça uma pausa e passe para a Parte 2 quando estiver pronto. Você aprenderá a criar seu próprio pipeline compatível com o nf-core usando as ferramentas baseadas no template do nf-core. diff --git a/docs/pt/docs/hello_nf-core/02_rewrite_hello.md b/docs/pt/docs/hello_nf-core/02_rewrite_hello.md index 5b2e882fac..c2b82c811b 100644 --- a/docs/pt/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/pt/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Se você não está familiarizado com o pipeline Hello ou precisa relembrar, con - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "Nota" - - Certifique-se de estar no diretório `hello-nf-core` no seu terminal. - --- ## 1. Examinar a estrutura do código do pipeline @@ -30,6 +26,7 @@ O projeto nf-core impõe diretrizes rigorosas sobre como os pipelines são estru Antes de começarmos nosso projeto de criação de pipeline, precisamos entender essa estrutura e organização. Então vamos dar uma olhada em como o código do pipeline está organizado no repositório `nf-core/demo`, usando o link simbólico `pipelines` que criamos na Parte 1. +Certifique-se de estar no diretório `hello-nf-core` no seu terminal. Como lembrete, você pode usar `tree` ou o explorador de arquivos para encontrar e abrir o diretório `nf-core/demo`. @@ -82,7 +79,7 @@ Veja como são as relações entre os componentes de código relevantes: O fluxo de trabalho sem nome em `main.nf` é chamado de script _entrypoint_. Ele atua como um wrapper para dois tipos de fluxos de trabalho aninhados: o fluxo de trabalho `DEMO` contendo a lógica de análise real, localizado em `workflows/demo.nf`, e um conjunto de fluxos de trabalho de manutenção localizados em `subworkflows/`. O fluxo de trabalho `demo.nf` chama **módulos** localizados em `modules/`; estes contêm os **processos** que realizarão as etapas de análise reais. -!!! note "Nota" +!!! info "Info" Subfluxos de trabalho não se limitam a funções de manutenção, e podem fazer uso de módulos de processo. @@ -107,7 +104,7 @@ Abordaremos as diferenças relevantes na próxima parte deste curso, quando trat O fluxo de trabalho `demo.nf` chama **módulos** localizados em `modules/`, que revisaremos a seguir. -!!! note "Nota" +!!! info "Info" Alguns fluxos de trabalho de análise nf-core exibem níveis adicionais de aninhamento ao chamar subfluxos de trabalho de nível inferior. Isso é usado principalmente para agrupar dois ou mais módulos comumente usados juntos em segmentos de pipeline facilmente reutilizáveis. @@ -266,13 +263,20 @@ Quando a TUI fechar, você deverá ver a seguinte saída no console. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -Não há confirmação explícita na saída do console de que a criação do pipeline funcionou, mas você deverá ver um novo diretório chamado `core-hello`. +Quando a TUI terminar, a ferramenta informa que criou o pipeline e gerou sua configuração de contêiner: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +Você deverá ver agora um novo diretório chamado `core-hello`. Visualize o conteúdo do novo diretório para ver quanto trabalho você economizou usando o template. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "Conteúdo do diretório" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` São muitos arquivos! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +As linhas `WARN: Unrecognized config option 'validation.*'` vêm da versão do plugin nf-schema fixada no template recém-criado. +Elas são inofensivas e não afetam a execução. + Isso mostra que toda a configuração básica está no lugar. Então onde estão as saídas? Existem algumas? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -435,7 +446,7 @@ Vamos dar uma olhada mais de perto. Este serve como o placeholder para nosso fluxo de trabalho de análise, com alguma funcionalidade nf-core já implementada. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -454,14 +465,16 @@ workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Agrupar e salvar versões de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -478,19 +491,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -503,15 +513,15 @@ workflow HELLO { Comparado a um fluxo de trabalho Nextflow básico como o desenvolvido em [Hello Nextflow](../hello_nextflow/index.md), você notará algumas coisas novas aqui (linhas destacadas acima): - O bloco workflow tem um nome -- As entradas do fluxo de trabalho são declaradas usando a palavra-chave `take:` e a construção do canal é movida para o fluxo de trabalho pai +- As entradas do fluxo de trabalho são declaradas usando a palavra-chave `take:` (aqui um canal de samplesheet e um diretório de saída), e a construção do canal é movida para o fluxo de trabalho pai - O conteúdo do fluxo de trabalho é colocado dentro de um bloco `main:` - As saídas são declaradas usando a palavra-chave `emit:` Esses são recursos opcionais do Nextflow que tornam o fluxo de trabalho **componível**, o que significa que ele pode ser chamado de dentro de outro fluxo de trabalho. -??? note "O bloco `Channel.topic`" +??? note "O bloco `channel.topic`" - Você pode ter notado o bloco `def topic_versions = Channel.topic("versions")` começando na linha 17. + Você pode ter notado o bloco `def topic_versions = channel.topic("versions")` começando na linha 28. Este é um código de manutenção padrão que coleta informações de versão de software de todos os módulos automaticamente. O nf-core está implementando esse mecanismo em todos os pipelines em 2026, então você o verá em todos os novos pipelines daqui para frente. A Parte 4 deste curso explica como ele funciona em detalhes. @@ -575,15 +585,15 @@ nextflow run original-hello/hello.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` Se funcionou para você, está pronto para começar a modificar. @@ -704,7 +714,7 @@ Já que estamos nisso, também podemos comentar a linha `params.greeting = 'gree params.character = 'turkey' ``` -!!! note "Nota" +!!! info "Info" Se você tiver a extensão do servidor de linguagem Nextflow instalada, o verificador de sintaxe iluminará seu código com rabiscos vermelhos. Isso ocorre porque se você colocar uma declaração `take:`, também precisa ter um `main:`. @@ -851,7 +861,7 @@ Há duas observações importantes a fazer aqui: - A sintaxe para chamar o fluxo de trabalho importado é essencialmente a mesma que a sintaxe para chamar módulos. - Tudo que está relacionado a trazer as entradas para o fluxo de trabalho (parâmetro de entrada e construção de canal) agora é declarado neste fluxo de trabalho pai. -!!! note "Nota" +!!! info "Info" Nomear o arquivo de fluxo de trabalho entrypoint `main.nf` é uma convenção, não um requisito. @@ -878,19 +888,19 @@ Se você fez todas as mudanças corretamente, isso deve executar até a conclus ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -Isso significa que atualizamos com sucesso nosso fluxo de trabalho HELLO para ser componível. +Isso significa que atualizamos com sucesso nosso fluxo de trabalho `HELLO` para ser componível. ### Conclusão @@ -932,14 +942,16 @@ workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Agrupar e salvar versões de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -956,19 +968,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } /* @@ -978,8 +987,8 @@ workflow HELLO { */ ``` -As linhas destacadas definem a estrutura do fluxo de trabalho componível: `workflow HELLO {`, `take:`, `main:` e `emit:`. -O grande bloco entre as linhas 17–34 é mais substancial: ele lida com a captura de versões de software usando topic channels, um mecanismo que o nf-core está implementando em todos os pipelines em 2026. +Esta é a estrutura do fluxo de trabalho componível: um bloco `workflow HELLO {` nomeado com `take:`, `main:` e `emit:`. +O bloco sob `// Collate and save software versions` é mais substancial: ele lida com a captura de versões de software usando topic channels, um mecanismo que o nf-core está implementando em todos os pipelines em 2026. Explicaremos isso na Parte 4; por enquanto, trate-o como código padrão que você pode deixar sem alterações. Precisamos adicionar o código relevante da versão componível do fluxo de trabalho original que desenvolvemos na seção 2. @@ -991,7 +1000,7 @@ Vamos abordar isso nos seguintes estágios: 3. Adicionar a lógica do fluxo de trabalho ao bloco `main` 4. Atualizar o bloco `emit` -!!! note "Nota" +!!! info "Info" Vamos ignorar o bloco de captura de versão nesta primeira passagem. A Parte 4 explica como ele funciona. @@ -1079,9 +1088,10 @@ Mais duas observações interessantes aqui: O projeto nf-core tem muita funcionalidade pré-construída em torno do conceito de samplesheet, que é tipicamente um arquivo CSV contendo dados em colunas. Como isso é essencialmente o que nosso arquivo `greetings.csv` é, vamos manter a declaração `take` atual como está, e simplesmente atualizar o nome do canal de entrada no próximo passo. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // channel: samplesheet read in from --input + outdir ``` O tratamento de entrada será feito antes deste fluxo de trabalho (não neste arquivo de código). @@ -1111,20 +1121,21 @@ Como lembrete, este é o código relevante no fluxo de trabalho original, que n Precisamos copiar o código que vem depois de `main:` para a nova versão do fluxo de trabalho. Já existe algum código lá que tem a ver com capturar as versões das ferramentas que são executadas pelo fluxo de trabalho. Vamos deixar isso em paz por enquanto (lidaremos com as versões de ferramentas mais tarde). -Manteremos a inicialização `ch_versions = channel.empty()` no topo, depois inseriremos nossa lógica de fluxo de trabalho, mantendo o código de coleta de versões no final. +Manteremos a inicialização `def ch_versions = channel.empty()` no topo, depois inseriremos nossa lógica de fluxo de trabalho, mantendo o código de coleta de versões no final. Esta ordenação faz sentido porque em um pipeline real, os processos emitiriam informações de versão que seriam adicionadas ao canal `ch_versions` conforme o fluxo de trabalho executa. === "Depois" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // emitir uma saudação sayHello(greeting_ch) @@ -1141,7 +1152,7 @@ Esta ordenação faz sentido porque em um pipeline real, os processos emitiriam // // Agrupar e salvar versões de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1158,37 +1169,36 @@ Esta ordenação faz sentido porque em um pipeline real, os processos emitiriam "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // channel: samplesheet read in from --input + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Agrupar e salvar versões de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1205,36 +1215,31 @@ Esta ordenação faz sentido porque em um pipeline real, os processos emitiriam "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // channel: [ path(versions.yml) ] - } ``` -Você notará que também adicionamos uma linha em branco antes de `main:` para tornar o código mais legível. - Isso parece ótimo, mas ainda precisamos atualizar o nome do canal que estamos passando para o processo `sayHello()` de `greeting_ch` para `ch_samplesheet` conforme mostrado abaixo, para corresponder ao que está escrito sob a palavra-chave `take:`. === "Depois" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // emitir uma saudação (atualizado para usar a convenção nf-core para samplesheets) sayHello(ch_samplesheet) ``` === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // emite uma saudação sayHello(greeting_ch) ``` @@ -1247,7 +1252,7 @@ Finalmente, precisamos atualizar o bloco `emit` para incluir a declaração das === "Depois" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // channel: [ path(versions.yml) ] @@ -1255,12 +1260,12 @@ Finalmente, precisamos atualizar o bloco `emit` para incluir a declaração das === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // channel: [ path(versions.yml) ] ``` -Isso conclui as modificações que precisamos fazer no próprio fluxo de trabalho HELLO. +Isso conclui as modificações que precisamos fazer no próprio fluxo de trabalho `HELLO`. Neste ponto, alcançamos a estrutura geral de código que nos propusemos a implementar. ### Conclusão @@ -1324,7 +1329,8 @@ workflow CORE_HELLO { // WORKFLOW: Run pipeline // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1361,7 +1367,6 @@ workflow { // SUBWORKFLOW: Run completion tasks // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1377,7 +1382,7 @@ O projeto nf-core faz uso intenso de subfluxos de trabalho aninhados, então est O que importa aqui é que existem dois fluxos de trabalho definidos: -- `CORE_HELLO` é um wrapper fino para executar o fluxo de trabalho HELLO que acabamos de terminar de adaptar em `core-hello/workflows/hello.nf`. +- `CORE_HELLO` é um wrapper fino para executar o fluxo de trabalho `HELLO` que acabamos de terminar de adaptar em `core-hello/workflows/hello.nf`. - Um fluxo de trabalho sem nome que chama `CORE_HELLO` bem como dois outros subfluxos de trabalho, `PIPELINE_INITIALISATION` e `PIPELINE_COMPLETION`. Aqui está um diagrama de como eles se relacionam: @@ -1422,9 +1427,9 @@ Se abrirmos esse arquivo e rolarmos para baixo, chegamos a este pedaço de códi versions = ch_versions ``` -Esta é a fábrica de canais que analisa a samplesheet e a passa adiante em uma forma que está pronta para ser consumida pelo fluxo de trabalho HELLO. +Esta é a fábrica de canais que analisa a samplesheet e a passa adiante em uma forma que está pronta para ser consumida pelo fluxo de trabalho `HELLO`. -!!! note "Nota" +!!! info "Info" A sintaxe acima é um pouco diferente do que usamos anteriormente, mas basicamente isto: @@ -1533,7 +1538,7 @@ Agora podemos atualizar o arquivo `test.config` da seguinte forma: === "Depois" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1595,13 +1600,53 @@ E já que estamos nisso, vamos apertar os limites de recursos padrão para garan Isso completa as modificações de código que precisamos fazer. -### 5.4. Executar o pipeline com o perfil de teste +### 5.4. Desabilitar a validação de parâmetros + +Substituímos a análise de samplesheet do template pela nossa própria construção de canal simples, mas o template ainda inclui um `nextflow_schema.json` e `assets/schema_input.json` descrevendo uma samplesheet baseada em fastq. +Como ainda não adaptamos esses schemas para o nosso formato `greetings.csv`, precisamos desativar a validação de parâmetros por enquanto (vamos configurá-la corretamente mais tarde). + +Abra `core-hello/nextflow.config` e defina `validate_params` como `false`: + +=== "Depois" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "Antes" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +Definimos isso no arquivo de configuração em vez de na linha de comando porque a partir do Nextflow versão 26.04, todos os valores fornecidos na linha de comando são tipados como strings. +Como resultado, parâmetros booleanos devem ser definidos em um arquivo de configuração ou em um `-params-file` para assumir um valor genuíno `true`/`false`. + +Por exemplo, usar `--validate_params false` aqui seria avaliado como a **string** `"false"`, o que deixa a validação ativada. + +!!! tip "Linhas de compatibilidade com o parser v2 em `nextflow.config`" + + Falando em sintaxe v2, você pode notar estas duas linhas logo abaixo do bloco `params` no arquivo de configuração: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + Estas são necessárias para compatibilidade com o parser de sintaxe v2. + + - Com a sintaxe v2, variáveis `params.*` não podem ser referenciadas diretamente dentro de diretivas `publishDir` em módulos de processo, então `outputDir` é definido aqui como uma variável de configuração de nível superior que essas diretivas podem acessar. + + - `workflow.output.mode` define o modo de publicação padrão para o bloco de saída de fluxo de trabalho v2. + + Ambas são geradas automaticamente pelo template de pipeline nf-core e não precisam ser modificadas. + +### 5.5. Executar o pipeline com o perfil de teste Isso foi muito, mas finalmente podemos tentar executar o pipeline! -Note que temos que adicionar `--validate_params false` à linha de comando porque ainda não configuramos a validação (isso virá mais tarde). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` Se você fez todas as modificações corretamente, deve executar até a conclusão. @@ -1609,9 +1654,9 @@ Se você fez todas as modificações corretamente, deve executar até a conclus ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1623,10 +1668,10 @@ Se você fez todas as modificações corretamente, deve executar até a conclus Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1637,17 +1682,17 @@ Se você fez todas as modificações corretamente, deve executar até a conclus !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -Como você pode ver, isso produziu o resumo típico nf-core no início graças ao subfluxo de trabalho de inicialização, e as linhas para cada módulo agora mostram os nomes completos PIPELINE:WORKFLOW:módulo. +Como você pode ver, isso produziu o resumo típico nf-core no início graças ao subfluxo de trabalho de inicialização, e as linhas para cada módulo agora mostram os nomes completos `PIPELINE:WORKFLOW:módulo`. -### 5.5. Encontrar as saídas do pipeline +### 5.6. Encontrar as saídas do pipeline A questão agora é: onde estão as saídas do pipeline? E a resposta é bastante interessante: agora há dois lugares diferentes para procurar os resultados. @@ -1663,17 +1708,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1683,7 +1728,7 @@ Desta vez você vê todas as tarefas que foram executadas como esperado. ![relatório de timeline de execução para o pipeline Hello](./img/execution_timeline_hello.png) -!!! note "Nota" +!!! info "Info" Mais uma vez as tarefas não foram executadas em paralelo porque estamos executando em uma máquina minimalista no GitHub Codespaces. Para ver essas executadas em paralelo, tente aumentar a alocação de CPU do seu codespace e os limites de recursos na configuração de teste. diff --git a/docs/pt/docs/hello_nf-core/03_use_module.md b/docs/pt/docs/hello_nf-core/03_use_module.md index 107f82bf85..816ef5127e 100644 --- a/docs/pt/docs/hello_nf-core/03_use_module.md +++ b/docs/pt/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ Para demonstrar como isso funciona, vamos substituir o módulo customizado `coll Você pode testar que ele executa com sucesso rodando o seguinte comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ Navegue até a página de módulos no seu navegador e use a barra de busca para Como você pode ver, há muitos resultados, vários deles módulos projetados para concatenar tipos muito específicos de arquivos. Entre eles, você deve ver um chamado `find_concatenate` que é de uso geral. -!!! note "Convenção de nomenclatura de módulos" +!!! info "Convenção de nomenclatura de módulos" O sublinhado (`_`) é usado como substituto para o caractere barra (`/`) nos nomes dos módulos. @@ -120,9 +120,11 @@ Isso exibe a documentação sobre o módulo, incluindo suas entradas, saídas e | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ Isso exibe a documentação sobre o módulo, incluindo suas entradas, saídas e Esta é exatamente a mesma informação que você pode encontrar no site. +Você pode ignorar a mensagem `INFO Reinstalling modules found in 'modules.json' but missing from directory`; ela é emitida pelo nf-core/tools 4.0.2 para qualquer módulo que você consulte com `info`, esteja ele instalado ou não, e não tem nenhum efeito já que o comando `info` não escreve nenhum arquivo. + ### 1.4. Instalar o módulo find/concatenate Agora que encontramos o módulo que queremos, precisamos adicioná-lo ao código-fonte do nosso pipeline. @@ -193,15 +197,13 @@ Agora que encontramos o módulo que queremos, precisamos adicioná-lo ao código A boa notícia é que o projeto nf-core inclui ferramentas para facilitar esta parte. Especificamente, o comando `nf-core modules install` torna possível automatizar a recuperação do código e torná-lo disponível para seu projeto em um único passo. -Navegue até o diretório do seu pipeline e execute o comando de instalação: +Certifique-se de que seu diretório de trabalho atual seja a raiz do projeto do pipeline `core-hello`, e então execute o comando de instalação: ```bash cd core-hello nf-core modules install find/concatenate ``` -A ferramenta procederá para instalar o módulo. - ??? success "Saída do comando" ```console @@ -212,26 +214,20 @@ A ferramenta procederá para instalar o módulo. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -O comando automaticamente: - -- Baixa os arquivos do módulo para `modules/nf-core/find/concatenate/` -- Atualiza `modules.json` para rastrear o módulo instalado -- Fornece a declaração `include` correta para usar no seu fluxo de trabalho - -!!! tip "Dica" - - Sempre certifique-se de que seu diretório de trabalho atual seja a raiz do projeto do seu pipeline antes de executar o comando de instalação de módulo. +O comando baixa os arquivos do módulo para `modules/nf-core/find/concatenate/` e atualiza `modules.json` para rastrear o módulo instalado. +Você pode ignorar o `NotADirectoryError` no final; ele ocorre porque o nf-core/tools 4.0.2 espera que cada módulo local esteja em seu próprio diretório (`modules/local//main.nf`), enquanto o `core-hello` ainda usa módulos locais de arquivo único nesta etapa. +No entanto, o módulo `find/concatenate` é instalado corretamente e o `modules.json` é atualizado conforme esperado. +Vamos converter o `cowpy` para o layout de diretório na Parte 4. -Vamos verificar que o módulo foi instalado corretamente: +Vamos verificar que os arquivos do módulo estão no lugar: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -Você também pode verificar a instalação pedindo ao utilitário nf-core para listar os módulos instalados localmente: +Você também pode confirmar a instalação inspecionando o `modules.json`, que agora lista `find/concatenate` sob o repositório nf-core/modules. + +??? abstract "Conteúdo do arquivo" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +Isso confirma que o módulo `find/concatenate` agora faz parte do código-fonte do seu projeto. +No entanto, para realmente usar o novo módulo, precisamos importá-lo no nosso pipeline. + +Por fim, você também pode usar o comando `nf-core modules list local` para verificar quais módulos estão sendo rastreados no seu pipeline. ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "Saída do comando" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -Isso confirma que o módulo `find/concatenate` agora faz parte do código-fonte do seu projeto. - -No entanto, para realmente usar o novo módulo, precisamos importá-lo no nosso pipeline. +Isso mostra `find/concatenate` na tabela resultante junto com seu repositório, SHA de versão, mensagem e data. ### 1.5. Atualizar as importações de módulos @@ -302,7 +354,7 @@ Abra [core-hello/workflows/hello.nf](core-hello/workflows/hello.nf) e faça a se === "Depois" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ Abra [core-hello/workflows/hello.nf](core-hello/workflows/hello.nf) e faça a se include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "Antes" @@ -345,7 +397,7 @@ Neste ponto, você pode estar tentado a mergulhar e começar a editar o código, Vamos abordar isso como uma seção separada porque envolve um novo mecanismo que ainda não cobrimos: mapas de metadados. -!!! note "Nota" +!!! info "Info" Você pode opcionalmente deletar o arquivo `collectGreetings.nf`: @@ -373,7 +425,7 @@ Isso nos permitirá determinar se podemos simplesmente tratar o novo módulo com Idealmente, isso é algo que você deveria fazer _antes_ mesmo de instalar o módulo, mas ei, melhor tarde do que nunca. (Vale ressaltar que existe um comando `uninstall` para se livrar de módulos que você decidir que não quer mais.) -!!! note "Nota" +!!! info "Info" O processo FIND_CONCATENATE inclui um tratamento bastante inteligente de diferentes tipos de compressão, extensões de arquivo e assim por diante, que não são estritamente relevantes para o que estamos tentando mostrar aqui, então vamos ignorar a maior parte e focar apenas nas partes que são importantes. @@ -512,7 +564,7 @@ Como mencionado anteriormente, a configuração de entrada `tuple val(meta), pat Esperamos que você possa começar a ver como isso pode ser útil. Não só permite nomear saídas com base em metadados, mas você também pode fazer coisas como usá-lo para aplicar diferentes valores de parâmetros e, em combinação com operadores específicos, você pode até agrupar, ordenar ou filtrar dados conforme eles fluem pelo pipeline. -!!! note "Saiba mais sobre metadados" +!!! info "Saiba mais sobre metadados" Para uma introdução abrangente ao trabalho com metadados em fluxos de trabalho Nextflow, incluindo como ler metadados de planilhas de amostras e usá-los para personalizar o processamento, consulte a missão paralela [Metadados em fluxos de trabalho](../side_quests/metadata/index.md). @@ -543,7 +595,7 @@ Agora que você sabe tudo sobre mapas de metadados (ou o suficiente para os prop Para maior clareza, vamos dividir isso e cobrir cada passo separadamente. -!!! note "Nota" +!!! info "Info" Todas as mudanças mostradas abaixo são feitas na lógica do fluxo de trabalho no bloco `main` no arquivo de fluxo de trabalho `core-hello/workflows/hello.nf`. @@ -570,8 +622,8 @@ Vamos adicionar essas linhas após a chamada de `convertToUpper`, removendo a ch === "Depois" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // emitir uma saudação + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // emitir uma saudação (atualizado para usar a convenção nf-core para planilhas de amostras) sayHello(ch_samplesheet) // converter a saudação para maiúsculas @@ -586,8 +638,8 @@ Vamos adicionar essas linhas após a chamada de `convertToUpper`, removendo a ch === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // emitir uma saudação + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // emitir uma saudação (atualizado para usar a convenção nf-core para planilhas de amostras) sayHello(ch_samplesheet) // converter a saudação para maiúsculas @@ -608,8 +660,8 @@ Em seguida, transforme o canal de arquivos em um canal de tuplas contendo metada === "Depois" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // emitir uma saudação + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // emitir uma saudação (atualizado para usar a convenção nf-core para planilhas de amostras) sayHello(ch_samplesheet) // converter a saudação para maiúsculas @@ -627,8 +679,8 @@ Em seguida, transforme o canal de arquivos em um canal de tuplas contendo metada === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // emitir uma saudação + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // emitir uma saudação (atualizado para usar a convenção nf-core para planilhas de amostras) sayHello(ch_samplesheet) // converter a saudação para maiúsculas @@ -654,8 +706,8 @@ Agora chame `FIND_CONCATENATE` no canal recém-criado: === "Depois" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // emitir uma saudação + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // emitir uma saudação (atualizado para usar a convenção nf-core para planilhas de amostras) sayHello(ch_samplesheet) // converter a saudação para maiúsculas @@ -676,8 +728,8 @@ Agora chame `FIND_CONCATENATE` no canal recém-criado: === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // emitir uma saudação + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // emitir uma saudação (atualizado para usar a convenção nf-core para planilhas de amostras) sayHello(ch_samplesheet) // converter a saudação para maiúsculas @@ -704,8 +756,8 @@ Como `cowpy` ainda não aceita tuplas de metadados (vamos corrigir isso na próx === "Depois" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // emitir uma saudação + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // emitir uma saudação (atualizado para usar a convenção nf-core para planilhas de amostras) sayHello(ch_samplesheet) // converter a saudação para maiúsculas @@ -729,8 +781,8 @@ Como `cowpy` ainda não aceita tuplas de metadados (vamos corrigir isso na próx === "Antes" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // emitir uma saudação + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // emitir uma saudação (atualizado para usar a convenção nf-core para planilhas de amostras) sayHello(ch_samplesheet) // converter a saudação para maiúsculas @@ -753,7 +805,7 @@ A operação `#!groovy .map { meta, file -> file }` extrai o arquivo da tupla `[ Então é só uma questão de passar `ch_for_cowpy` para `cowpy` em vez de `collectGreetings.out.outfile` naquela última linha. -!!! note "Nota" +!!! info "Info" Na próxima parte do curso, atualizaremos `cowpy` para trabalhar diretamente com tuplas de metadados, então este passo de extração não será mais necessário. @@ -762,7 +814,7 @@ Então é só uma questão de passar `ch_for_cowpy` para `cowpy` em vez de `coll Vamos testar que o fluxo de trabalho funciona com o módulo `find/concatenate` recém-integrado: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` Isso deve executar razoavelmente rápido. @@ -770,40 +822,40 @@ Isso deve executar razoavelmente rápido. ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` Observe que `FIND_CONCATENATE` agora aparece na lista de execução de processos em vez de `collectGreetings`. diff --git a/docs/pt/docs/hello_nf-core/04_make_module.md b/docs/pt/docs/hello_nf-core/04_make_module.md index 311f263ddd..0a2208bd9f 100644 --- a/docs/pt/docs/hello_nf-core/04_make_module.md +++ b/docs/pt/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ Depois disso, mostraremos como usar a criação de módulos baseada em template Você pode testar que ele executa com sucesso executando o seguinte comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,21 +94,21 @@ Abra o arquivo do módulo `cowpy.nf` (em `core-hello/modules/local/`) e modifiqu === "Depois" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Gera arte ASCII com cowpy (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "Antes" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Gera arte ASCII com cowpy (https://github.com/jeffbuttars/cowpy) process cowpy { ``` Neste caso, a conversão para maiúsculas é completamente direta. -Se o nome do processo fosse composto por várias palavras, por exemplo se tivéssemos um processo chamado MyCowpyTool originalmente em camel case, a convenção nf-core seria usar underscores para separá-las, resultando em MY_COWPY_TOOL. +Se o nome do processo fosse composto por várias palavras, por exemplo se tivéssemos um processo chamado `MyCowpyTool` originalmente em camel case, a convenção nf-core seria usar underscores para separá-las, resultando em `MY_COWPY_TOOL`. #### 1.1.2. Atualizar a declaração de importação do módulo @@ -164,7 +164,7 @@ Então agora vamos atualizar as duas referências ao processo no bloco workflow // // Agrupar e salvar versões de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ Então agora vamos atualizar as duas referências ao processo no bloco workflow // // Agrupar e salvar versões de software // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ Certifique-se de fazer **ambas** as alterações, caso contrário você obterá Vamos executar o fluxo de trabalho para testar que tudo está funcionando corretamente após essas mudanças. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ Retorne ao arquivo do módulo `cowpy.nf` e modifique-o para aceitar tuplas de me === "Depois" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ Retorne ao arquivo do módulo `cowpy.nf` e modifique-o para aceitar tuplas de me === "Antes" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ Isso não é tecnicamente necessário, mas é uma boa prática referir-se a saí Vamos executar o fluxo de trabalho para testar que tudo está funcionando corretamente após essas mudanças. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Você pode ver que fizemos três mudanças. Como resultado, a interface do módulo agora é mais simples: ela só espera as entradas essenciais de metadata e arquivo. -!!! note "Nota" +!!! info "Info" O operador `?:` é frequentemente chamado de 'operador Elvis' porque se parece com um rosto de Elvis Presley de lado, com o caractere `?` simbolizando a onda em seu cabelo. @@ -623,15 +623,15 @@ Vamos testar que o fluxo de trabalho ainda funciona como esperado, especificando Execute este comando usando `kosh`, uma das opções mais... enigmáticas: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "Saída do comando" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ Para resumir os benefícios desta abordagem: - **Portabilidade**: Módulos podem ser reutilizados sem opções de ferramenta codificadas - **Sem mudanças no fluxo de trabalho**: Adicionar ou alterar opções de ferramenta não requer atualizar o código do fluxo de trabalho -!!! note "Nota" +!!! info "Info" O sistema `ext.args` tem capacidades adicionais poderosas não cobertas aqui, incluindo alternar valores de argumentos dinamicamente com base em metadata. Veja as [especificações de módulos nf-core](https://nf-co.re/docs/guidelines/components/modules) para mais detalhes. @@ -841,15 +841,15 @@ Caso você esteja se perguntando, a closure `ext.prefix` tem acesso ao pedaço c Vamos testar que o fluxo de trabalho ainda funciona como esperado. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ Abra o arquivo do módulo `cowpy.nf` (em `core-hello/modules/local/`) e remova a Vamos dar uma olhada no que acontece se executarmos o pipeline agora. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ Agora o `core-hello-results` também contém as saídas do módulo `COWPY`. Você pode ver que o Nextflow criou essa hierarquia de diretórios baseada nos nomes do fluxo de trabalho e do módulo. -!!! note "Nota" +!!! info "Info" Você pode notar o arquivo `hello_software_versions.yml` em `pipeline_info/`. Atualmente ele contém apenas informações de versão do `FIND_CONCATENATE`, pois o `COWPY` ainda não reporta sua versão. @@ -1098,9 +1098,9 @@ Dito isso, você pode decidir que deseja organizar suas entradas de forma difere Para sobrescrever a diretiva `publishDir` padrão, você pode simplesmente adicionar suas próprias diretivas ao arquivo `conf/modules.config`. -Por exemplo, você poderia sobrescrever o padrão para um único processo usando o seletor `withName:`, como neste exemplo onde adicionamos uma diretiva `publishDir` personalizada para o processo 'COWPY'. +Por exemplo, você poderia sobrescrever o padrão para um único processo usando o seletor `withName:`, como neste exemplo onde adicionamos uma diretiva `publishDir` personalizada para o processo `COWPY`. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ Nenhuma alteração no bloco de script é necessária — a versão é declarada #### 1.6.2. Executar o pipeline e inspecionar o relatório de versões ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -A coleta no lado do fluxo de trabalho — o bloco `Channel.topic("versions")` que você viu no fluxo de trabalho placeholder na Parte 2 — assina o tópico e escreve esse relatório combinado automaticamente. +A coleta no lado do fluxo de trabalho — o bloco `channel.topic("versions")` que você viu no fluxo de trabalho placeholder na Parte 2 — assina o tópico e escreve esse relatório combinado automaticamente. -!!! note "Compatibilidade retroativa" +!!! info "Compatibilidade retroativa" O branch `versions_file` no bloco de topic channel do fluxo de trabalho existe para lidar com módulos que ainda não foram atualizados para usar `topic: versions` e ainda escrevem um arquivo `versions.yml` no bloco de script com `emit: versions`. Ambos os estilos são suportados simultaneamente durante a transição. @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Padrão 1: Tuplas de metadata ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ O código padrão oferece alternar entre Docker e Singularity, mas vamos simplif === "Antes" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Ambiente Conda -Para o ambiente Conda, o código do módulo especifica `conda "${moduleDir}/environment.yml"`, o que significa que deve ser configurado no arquivo `environment.yml`. +Para o ambiente Conda, o código do módulo especifica `#!groovy conda "${moduleDir}/environment.yml"`, o que significa que deve ser configurado no arquivo `environment.yml`. A ferramenta de criação de módulos nos avisou que não conseguiu encontrar o pacote `cowpy` no Bioconda (o canal principal para ferramentas de bioinformática). No entanto, `cowpy` está disponível no conda-forge, então você pode completar o `environment.yml` assim: @@ -1428,7 +1431,7 @@ Atualize os blocos de entrada e saída: === "Depois" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Atualize os blocos de entrada e saída: === "Antes" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` Isso especifica: @@ -1453,6 +1456,7 @@ Isso especifica: - O nome do parâmetro do arquivo de entrada (`input_file` em vez do genérico `input`) - O nome do arquivo de saída usando o padrão de prefixo configurável (`#!groovy ${prefix}.txt` em vez do curinga `*`) - Um nome de emissão descritivo (`cowpy_output` em vez do genérico `output`) +- Uma string de versão estática (`#!groovy val("1.1.5")`) no lugar do `#!groovy eval("cowpy --version")` do template, correspondendo ao módulo manual da seção 1.6 (a ferramenta `cowpy` não expõe uma flag `--version`) Se você está usando o servidor de linguagem Nextflow para validar a sintaxe, a parte `#!groovy ${prefix}` será marcada como erro nesta fase porque ainda não a adicionamos ao bloco de script. Vamos fazer isso agora. @@ -1517,7 +1521,7 @@ Não se preocupe muito se isso parece misterioso; incluímos isso por completude === "Antes" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1576,15 +1580,15 @@ Tudo o que precisamos fazer para experimentar esta nova versão do módulo `COWP Vamos executar o pipeline para testá-lo. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Saída do comando" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1611,10 +1615,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/pt/docs/hello_nf-core/05_input_validation.md b/docs/pt/docs/hello_nf-core/05_input_validation.md index 5b6fb13ebc..938319dad1 100644 --- a/docs/pt/docs/hello_nf-core/05_input_validation.md +++ b/docs/pt/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ Na quinta parte do curso de treinamento Hello nf-core, mostramos como usar o plu Você pode testar se ele executa com sucesso executando o seguinte comando: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ O nf-schema é o sucessor do plugin nf-validation descontinuado e usa o padrão ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ Agora vamos aplicar esses princípios na prática, começando com a validação Vamos começar adicionando validação de parâmetros ao nosso pipeline. Isso valida flags de linha de comando como `--input`, `--outdir` e `--batch`. -### 1.1. Configurar a validação para ignorar validação de arquivo de entrada +### 1.1. Habilitar a validação e ignorar a validação de arquivo de entrada O template de pipeline nf-core vem com o nf-schema já instalado e configurado: - O plugin nf-schema é instalado via o bloco `plugins{}` em `nextflow.config` -- A validação de parâmetros é habilitada por padrão via `params.validate_params = true` +- A validação de parâmetros é controlada por `params.validate_params` - A validação é realizada pelo subworkflow `UTILS_NFSCHEMA_PLUGIN` durante a inicialização do pipeline -O comportamento de validação é controlado através do escopo `validation{}` em `nextflow.config`. +Nas Partes 3 e 4 definimos `validate_params = false` para que o pipeline pudesse executar antes de configurarmos qualquer schema. +Agora que estamos prontos para adicionar validação, o primeiro passo é ativá-la. -Como estaremos trabalhando na validação de parâmetros primeiro (esta seção) e não configuraremos o schema de dados de entrada até a seção 2, precisamos temporariamente dizer ao nf-schema para ignorar a validação do conteúdo do arquivo do parâmetro `input`. +Abra `nextflow.config` e encontre o parâmetro `validate_params` (por volta da linha 37), e defina-o como `true`: -Abra `nextflow.config` e encontre o bloco `validation` (por volta da linha 247). Adicione `ignoreParams` para ignorar a validação de arquivo de entrada: +=== "Depois" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "Antes" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +O comportamento de validação em si é controlado através do escopo `validation{}` em `nextflow.config`. + +Como estaremos trabalhando na validação de parâmetros primeiro (esta seção) e não configuraremos o schema de dados de entrada até a seção 2, também precisamos temporariamente dizer ao nf-schema para ignorar a validação do conteúdo do arquivo do parâmetro `input`. + +Encontre o bloco `validation` (por volta da linha 252) e adicione `ignoreParams` para ignorar a validação de arquivo de entrada: === "Depois" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ Abra `nextflow.config` e encontre o bloco `validation` (por volta da linha 247). === "Antes" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ Esta configuração diz ao nf-schema para: - **`ignoreParams`**: Ignorar validação do conteúdo do arquivo do parâmetro `input` (temporário; vamos reabilitar isso na seção 2) - **`monochromeLogs`**: Desabilitar saída colorida em mensagens de validação quando definido como `true` (controlado por `params.monochrome_logs`) -!!! note "Por que ignorar o parâmetro input?" +!!! info "Por que ignorar o parâmetro input?" O parâmetro `input` em `nextflow_schema.json` tem `"schema": "assets/schema_input.json"` que diz ao nf-schema para validar o *conteúdo* do arquivo CSV de entrada contra esse schema. Como ainda não configuramos esse schema, temporariamente ignoramos essa validação. @@ -263,7 +280,7 @@ Você deve ver algo assim: | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -Você deve ver que o parâmetro `batch` foi adicionado ao schema com o campo "required" agora mostrando `["input", "outdir", "batch"]`. +Você deve ver que o parâmetro `batch` foi adicionado ao schema com o campo `required` agora mostrando `["input", "outdir", "batch"]`. ### 1.5. Testar a validação de parâmetros @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ Abra `nextflow.config` e remova a linha `ignoreParams` do bloco `validation`: === "Depois" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ Abra `nextflow.config` e remova a linha `ignoreParams` do bloco `validation`: === "Antes" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ Vamos verificar que nossa validação funciona testando entradas válidas e inv #### 2.7.1. Testar com entrada válida Primeiro, confirme que o pipeline executa com sucesso com entrada válida. -Note que não precisamos mais de `--validate_params false` já que a validação está funcionando! +Com `validate_params = true` e o schema de entrada configurado, tanto a validação de parâmetros quanto a validação de dados de entrada agora executam de verdade. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/pt/docs/info/nxf_versions.md b/docs/pt/docs/info/nxf_versions.md index 9e39c13d6e..a740fc69a6 100644 --- a/docs/pt/docs/info/nxf_versions.md +++ b/docs/pt/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: A partir da versão 3.0 do portal de treinamento, todos os nossos cursos de treinamento são compatíveis com o Nextflow versão 25.10.2 ou posterior, a menos que especificado de outra forma na página de índice do curso. (Isso não inclui materiais descontinuados ou arquivados que podem não ter um aviso de versão). -A versão do Nextflow atualmente carregada por padrão em nosso ambiente de treinamento é o **Nextflow 25.10.4**. +A versão do Nextflow atualmente carregada por padrão em nosso ambiente de treinamento é o **Nextflow 26.04.4**. Como os cursos agora usam entradas tipadas no nível do fluxo de trabalho, bem como diretivas de saída no nível do fluxo de trabalho, eles requerem o uso do analisador de sintaxe V2, **a menos que especificado de outra forma**. +O analisador V2 é o padrão a partir do Nextflow 26.04 em diante, portanto, na versão que carregamos, você não precisa habilitá-lo manualmente. Se você planeja usar o ambiente que fornecemos através do [Github Codespaces](../envsetup/01_setup.md) ou [devcontainers locais](../envsetup/03_devcontainer.md), você não precisa fazer nada, a menos que especificamente indicado nas instruções do curso. -No entanto, se você está planejando trabalhar nos treinamentos em seu próprio ambiente ([Instalação manual](../envsetup/02_local.md)), você precisará garantir o uso do Nextflow versão 25.10.2 ou posterior com o analisador de sintaxe v2 habilitado. +No entanto, se você está planejando trabalhar nos treinamentos em seu próprio ambiente ([Instalação manual](../envsetup/02_local.md)), você precisará garantir o uso do Nextflow versão 25.10.2 ou posterior e habilitar o analisador de sintaxe v2 caso esteja usando uma versão anterior à 26.04. ## Versões mais antigas dos materiais de treinamento @@ -40,7 +41,7 @@ Todo código Nextflow moderno usa DSL2. O analisador v1 é o original, mais permissivo. O analisador v2 é mais rigoroso e habilita novos recursos de linguagem, como tipagem estática (entradas e saídas tipadas) e diretivas de saída no nível do fluxo de trabalho. O analisador v2 também fornece melhores mensagens de erro e detecta mais erros no momento da análise em vez de em tempo de execução. -O analisador v2 se tornará o padrão no Nextflow 26.04. +O analisador v2 é o padrão a partir do Nextflow 26.04 em diante. Em resumo: DSL2 é a linguagem que você escreve; a versão do analisador de sintaxe determina quão rigorosamente essa linguagem é interpretada e quais recursos avançados estão disponíveis. @@ -52,21 +53,22 @@ Para mais informações sobre como atualizar sua versão do Nextflow, consulte a ### Habilitando o analisador de sintaxe v2 +A partir do Nextflow 26.04 em diante, o analisador v2 é o padrão, portanto as etapas abaixo são necessárias apenas em versões anteriores ao 26.04. + Para **habilitar** o analisador de sintaxe v2 para sua sessão atual, execute o seguinte comando no seu terminal: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Para tornar isso permanente (até que o v2 se torne o padrão no Nextflow 26.04), adicione o comando export ao seu perfil de shell (`~/.bashrc`, `~/.zshrc`, etc.): +Para tornar isso permanente, adicione o comando export ao seu perfil de shell (`~/.bashrc`, `~/.zshrc`, etc.): ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -Note que a variável de ambiente `NXF_SYNTAX_PARSER=v2` é um requisito temporário. -A partir do Nextflow 26.04 em diante, o analisador v2 se tornará o padrão e essa configuração não será mais necessária. +Note que em versões do Nextflow anteriores ao 26.04, a variável de ambiente `NXF_SYNTAX_PARSER=v2` é necessária para acessar os recursos v2 utilizados nestes cursos. ### Desabilitando o analisador de sintaxe v2 diff --git a/docs/pt/docs/nextflow_run/01_basics.md b/docs/pt/docs/nextflow_run/01_basics.md index 84b9982ad5..805810c3b0 100644 --- a/docs/pt/docs/nextflow_run/01_basics.md +++ b/docs/pt/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "Saída do comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Se sua saída do console se parece com isso, então parabéns, você acabou de executar seu primeiro fluxo de trabalho Nextflow! @@ -115,13 +121,14 @@ Se sua saída do console se parece com isso, então parabéns, você acabou de e Isso foi mencionado no início do curso, mas talvez você tenha perdido. Verifique o material de ajuda [Versões do Nextflow](../info/nxf_versions.md). - Em resumo, se você está usando o Nextflow `25.10`, então precisa habilitar o analisador de linguagem v2: + O analisador v2 é o padrão a partir do Nextflow 26.04 em diante, então você só verá isso em versões anteriores. + Em uma versão anterior à 26.04, você precisa habilitar o analisador de linguagem v2: ```bash export NXF_SYNTAX_PARSER=v2 ``` -A saída mais importante aqui é a última linha, que está destacada na saída acima: +A parte mais importante aqui é a linha destacada: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` Você deve ver que suas saídas agora são publicadas em um diretório chamado `hello_results` em vez de `results`: @@ -206,7 +219,7 @@ Isso pode parecer confuso, então vamos ver como isso se parece na prática. Voltando à saída do console para o fluxo de trabalho que executamos anteriormente, tínhamos esta linha: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` Vê como a linha começa com `[a3/1e1535]`? @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "Saída do comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` A saída do console deve parecer familiar, mas há uma coisa um pouco diferente comparado a antes. @@ -767,7 +786,7 @@ Na linha de saída do console `[a3/7be2fa] SAYHELLO | 1 of 1 ✔`, o que `[a3/7b - [x] O caminho truncado para o diretório de trabalho da tarefa - [ ] O checksum do arquivo de saída -Saiba mais: [2.4. Encontre a saída original e os logs no diretório `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +Saiba mais: [2.3. Encontre a saída original e os logs no diretório `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ Qual é o propósito do arquivo `.command.sh` em um diretório de tarefa? - [ ] Ele contém mensagens de erro de tarefas que falharam - [ ] Ele lista os arquivos de entrada preparados para a tarefa -Saiba mais: [2.4. Encontre a saída original e os logs no diretório `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) +Saiba mais: [2.3. Encontre a saída original e os logs no diretório `work/`](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ O que acontece com os resultados publicados quando você re-executa um fluxo de - [ ] O Nextflow impede a sobrescrita e falha - [ ] Eles são automaticamente copiados como backup -Saiba mais: [2.5. Re-execute o fluxo de trabalho com diferentes saudações](#24-re-run-the-workflow-with-different-greetings) +Saiba mais: [2.4. Re-execute o fluxo de trabalho com diferentes saudações](#24-re-run-the-workflow-with-different-greetings) O que esta saída do console indica? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] A tarefa falhou e foi pulada diff --git a/docs/pt/docs/nextflow_run/02_pipeline.md b/docs/pt/docs/nextflow_run/02_pipeline.md index 722bf35cd1..44f2e35b2d 100644 --- a/docs/pt/docs/nextflow_run/02_pipeline.md +++ b/docs/pt/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Empolgante, isso parece indicar que '3 of 3' chamadas foram feitas para o processo, o que é encorajador, já que havia três linhas de dados no CSV que fornecemos como entrada. @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "Saída do comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Desta vez vemos todas as três execuções de processo e seus subdiretórios de trabalho associados listados na saída. @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "Saída do comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` Você vê que como prometido, múltiplas etapas foram executadas como parte do fluxo de trabalho; as duas primeiras (`sayHello` e `convertToUpper`) foram presumivelmente executadas em cada saudação individual, e a terceira (`collectGreetings`) terá sido executada apenas uma vez, nas saídas de todas as três chamadas `convertToUpper`. @@ -670,13 +706,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "Saída do comando" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` Você deve ver novas saídas finais nomeadas com seu nome de lote personalizado. @@ -921,13 +975,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` Você notará que as execuções de processo foram todas cacheadas com sucesso, significando que o Nextflow reconheceu que já fez o trabalho solicitado, mesmo que o código tenha sido dividido e o arquivo de fluxo de trabalho principal tenha sido renomeado. @@ -1075,20 +1147,20 @@ Você vê que o sistema de arquivos dentro do contêiner é diferente do sistema De dentro do contêiner, você pode executar o comando `cowpy` diretamente. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "Saída do comando" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` Isso produz arte ASCII do personagem vaca padrão (ou 'cowacter') com um balão de fala contendo o texto que especificamos. @@ -1097,22 +1169,22 @@ Agora que você testou o uso básico, pode tentar dar alguns parâmetros. Por exemplo, a documentação da ferramenta diz que podemos definir o personagem com `-c`. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Saída do comando" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1298,15 +1370,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` As três primeiras etapas foram cacheadas já que as executamos antes, mas o processo `cowpy` é novo então esse realmente é executado. diff --git a/docs/pt/docs/nextflow_run/03_config.md b/docs/pt/docs/nextflow_run/03_config.md index 8a6512540f..99292734d5 100644 --- a/docs/pt/docs/nextflow_run/03_config.md +++ b/docs/pt/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` Isso ainda produz a mesma saída de antes. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` Isso criará um novo conjunto de diretórios sob `tux-run/` incluindo `tux-run/work/` e `tux-run/results/`. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` O arquivo de saída final deve conter o personagem stegosaurus dizendo as saudações. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` Isso ainda produz a mesma saída de antes, exceto que desta vez encontramos nossas saídas em `results_config/outdir/`. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` Isso ainda produz a mesma saída de antes, exceto que desta vez encontramos nossas saídas em `results_config/pnames/`, e elas estão agrupadas por processo. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` Isso ainda produz a mesma saída de antes, exceto que desta vez encontramos nossas saídas em `results_config/outmode/`. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "Saída do comando" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` Isso deve funcionar sem problemas e produzir as mesmas saídas de antes em `results_config/conda`. @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` Como você pode ver, isso nos permite alternar entre configurações muito convenientemente em tempo de execução. @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` Isso usará Docker onde possível e produzirá saídas em `results_config/test`, e desta vez o personagem é a dupla cômica `dragonandcow`. @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/pt/docs/nf4_science/_template/02_single_sample.md b/docs/pt/docs/nf4_science/_template/02_single_sample.md index 570175fed0..30f4f561b0 100644 --- a/docs/pt/docs/nf4_science/_template/02_single_sample.md +++ b/docs/pt/docs/nf4_science/_template/02_single_sample.md @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/pt/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/pt/docs/nf4_science/genomics/02_per_sample_variant_calling.md index f36a6d655b..921c629523 100644 --- a/docs/pt/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/pt/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` Você pode verificar se o arquivo de índice foi gerado corretamente olhando no diretório work ou no diretório results. @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` Agora, se olharmos para a saída do console, vemos os dois processos listados. @@ -891,13 +911,32 @@ Coisa engraçada: isso _pode funcionar_, OU _pode falhar_. Por exemplo, aqui est ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Se a execução do seu fluxo de trabalho teve sucesso, execute-o novamente até obter um erro como este: @@ -905,9 +944,9 @@ Se a execução do seu fluxo de trabalho teve sucesso, execute-o novamente até ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ Desta vez (e todas as vezes) tudo deve executar corretamente: ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` O diretório results agora contém tanto os arquivos BAM quanto BAI para cada amostra (da tupla), junto com as saídas VCF: @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Isso deve produzir o mesmo resultado de antes. Nosso fluxo de trabalho simples de chamada de variantes agora tem todos os recursos básicos que queríamos. diff --git a/docs/pt/docs/nf4_science/genomics/03_joint_calling.md b/docs/pt/docs/nf4_science/genomics/03_joint_calling.md index 0dafaa8293..c0f0f54205 100644 --- a/docs/pt/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/pt/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` A saída do Nextflow parece a mesma de antes, mas os arquivos `.g.vcf` e seus arquivos de índice agora estão organizados em subdiretórios. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` As duas primeiras etapas estão em cache da execução anterior, e a nova etapa `GATK_JOINTGENOTYPING` é executada uma vez nas entradas coletadas de todas as três amostras. diff --git a/docs/pt/docs/nf4_science/imaging/01_basics.md b/docs/pt/docs/nf4_science/imaging/01_basics.md index 3f357bc684..74ab2f3083 100644 --- a/docs/pt/docs/nf4_science/imaging/01_basics.md +++ b/docs/pt/docs/nf4_science/imaging/01_basics.md @@ -19,21 +19,21 @@ nextflow run hello-world.nf --greeting 'Hello World!' A saída do console deve se parecer com isto: -```console title="Saída" linenums="1" - N E X T F L O W ~ version 25.04.3 +```console title="Output" linenums="1" + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Parabéns, você acabou de executar seu primeiro fluxo de trabalho Nextflow! A saída mais importante aqui é a última linha (linha 6): -```console title="Saída" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` Isso nos diz que o processo `sayHello` foi executado com sucesso uma vez (`1 of 1 ✔`). @@ -63,7 +63,7 @@ Hello World! Isso é ótimo, nosso fluxo de trabalho fez o que deveria fazer! -No entanto, esteja ciente de que o resultado 'publicado' é uma cópia (ou em alguns casos um symlink) da saída real produzida pelo Nextflow quando executou o fluxo de trabalho. +No entanto, esteja ciente de que o resultado 'publicado' é uma cópia (ou em alguns casos um link simbólico) da saída real produzida pelo Nextflow quando executou o fluxo de trabalho. Então agora, vamos olhar por baixo do capô para ver onde o Nextflow realmente executou o trabalho. @@ -83,20 +83,20 @@ Isso pode parecer confuso, então vamos ver como isso se parece na prática. Voltando à saída do console para o fluxo de trabalho que executamos anteriormente, tínhamos esta linha: -```console title="Trecho da saída do comando" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +```console title="Excerpt of command output" linenums="6" +[71/8143bd] sayHello | 1 of 1 ✔ ``` -Vê como a linha começa com `[a3/7be2fa]`? +Vê como a linha começa com `[71/8143bd]`? Essa é uma forma truncada do caminho do diretório de tarefa para aquela chamada de processo, e diz onde encontrar a saída da chamada do processo `sayHello` dentro do caminho do diretório `work/`. -Você pode encontrar o caminho completo digitando o seguinte comando (substituindo `a3/7be2fa` pelo que você vê em seu próprio terminal) e pressionando a tecla tab para autocompletar o caminho ou adicionando um asterisco: +Você pode encontrar o caminho completo digitando o seguinte comando (substituindo `71/8143bd` pelo que você vê em seu próprio terminal) e pressionando a tecla tab para autocompletar o caminho ou adicionando um asterisco: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -Isso deve gerar o caminho completo do diretório: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +Isso deve gerar o caminho completo do diretório: `work/71/8143bd5ed3420e23c5f0dc1a05056d` Vamos dar uma olhada no que há lá dentro. @@ -116,8 +116,8 @@ Os nomes exatos dos subdiretórios serão diferentes no seu sistema. ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -136,7 +136,7 @@ Se você abri-lo, encontrará a saudação `Hello World!` novamente.
Conteúdo do arquivo output.txt -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,10 +159,9 @@ O arquivo `.command.sh` é especialmente útil porque mostra o comando principal
Conteúdo do arquivo -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
@@ -357,14 +356,14 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Procure pelo trecho `cached:` que foi adicionado na linha de status do processo (linha 5), o que significa que o Nextflow reconheceu que já fez este trabalho e simplesmente reutilizou o resultado da execução bem-sucedida anterior. +Procure pelo trecho `cached:` que foi adicionado na linha de status do processo, o que significa que o Nextflow reconheceu que já fez este trabalho e simplesmente reutilizou o resultado da execução bem-sucedida anterior. Você também pode ver que o hash do subdiretório de trabalho é o mesmo da execução anterior. O Nextflow está literalmente apontando para a execução anterior e dizendo "Eu já fiz isso ali." diff --git a/docs/pt/docs/nf4_science/imaging/02_run_molkart.md b/docs/pt/docs/nf4_science/imaging/02_run_molkart.md index d7c8ee6a7e..db2d6887cc 100644 --- a/docs/pt/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/pt/docs/nf4_science/imaging/02_run_molkart.md @@ -70,26 +70,34 @@ Isso cria um diretório `molkart/` contendo o código-fonte completo do pipeline Antes de executar o pipeline completo, vamos aprender por que os contêineres são essenciais para pipelines nf-core. -Vamos tentar executar o pipeline usando o conjunto de dados de teste e os parâmetros da configuração de teste do molkart: - -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +Vamos fornecer os parâmetros do pipeline usando um arquivo de parâmetros. +Um arquivo de parâmetros é um arquivo YAML que lista cada parâmetro e seu valor, o que mantém os valores tipados (como inteiros) intactos e mantém a linha de comando curta. + +Um arquivo `params.yaml` já está disponível no diretório de trabalho: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` -Vamos analisar esses parâmetros: +Esses parâmetros são: + +- `input`: Caminho para a planilha contendo metadados da amostra +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: Parâmetros para preenchimento de padrão de grade +- `clahe_pyramid_tile`: Tamanho do kernel para melhoria de contraste +- `segmentation_method`: Qual(is) algoritmo(s) usar para segmentação celular +- `outdir`: Onde salvar os resultados + +Vamos tentar executar o pipeline usando esses parâmetros: -- `--input`: Caminho para a planilha contendo metadados da amostra -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: Parâmetros para preenchimento de padrão de grade -- `--clahe_pyramid_tile`: Tamanho do kernel para melhoria de contraste -- `--segmentation_method`: Qual(is) algoritmo(s) usar para segmentação celular -- `--outdir`: Onde salvar os resultados +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "Este comando falhará - isso é intencional!" @@ -172,17 +180,10 @@ process { } ``` -Agora execute o pipeline novamente com o mesmo comando: +Agora execute o pipeline novamente, desta vez executando todos os três métodos de segmentação para que possamos compará-los mais tarde: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` Desta vez, o Nextflow irá: @@ -209,12 +210,13 @@ Conforme o pipeline é executado, você verá uma saída semelhante a esta: ??? success "Saída do comando" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ Conforme o pipeline é executado, você verá uma saída semelhante a esta: |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ Conforme o pipeline é executado, você verá uma saída semelhante a esta: https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,10 +300,10 @@ A linha do executor `executor > local (22)` informa: Cada linha de processo mostra: -- **Hash** (`[1a/2b3c4d]`): Identificador do diretório de trabalho (como antes) +- **Hash** (`[b4/e57ff1]`): Identificador do diretório de trabalho (como antes) - **Nome do processo**: Caminho completo do módulo e nome do processo - **Identificador de entrada**: Nome da amostra entre parênteses -- **Progresso**: Porcentagem completa e contagem (ex.: `1 of 1 ✔`) +- **Progresso**: Contagem de tarefas e status de conclusão (ex.: `1 of 1 ✔`) ### Conclusão @@ -372,7 +369,7 @@ O relatório inclui: - Métricas de qualidade de segmentação - Número de células e pontos detectados -!!! Tip +!!! Tip "Dica" Os relatórios MultiQC são normalmente incluídos em todos os pipelines nf-core. Eles sempre fornecem uma visão geral de alto nível da execução do pipeline e qualidade dos dados. @@ -426,7 +423,7 @@ Isso mostra: - Uso de CPU e memória - Quais tarefas foram armazenadas em cache vs. executadas -!!! Tip +!!! Tip "Dica" Esses relatórios são incrivelmente úteis para otimizar alocação de recursos e solucionar problemas de desempenho. @@ -447,7 +444,7 @@ Assim como no nosso exemplo Hello World, todo o trabalho real acontece no diret ### 4.1. Entendendo a estrutura do diretório de trabalho O diretório de trabalho contém um subdiretório para cada tarefa que foi executada. -Para este pipeline com 12 tarefas, haverá 12 subdiretórios de trabalho. +Para este pipeline com 22 tarefas, haverá 22 subdiretórios de trabalho. Liste o diretório de trabalho: @@ -477,7 +474,7 @@ A diferença principal do Hello World: - Arquivos de saída podem ser bastante grandes (máscaras de segmentação, imagens processadas) - Múltiplos arquivos de entrada e saída por tarefa -!!! Tip +!!! Tip "Dica" Se um processo falhar, você pode navegar até seu diretório de trabalho, examinar `.command.err` para mensagens de erro e até mesmo executar `.command.sh` manualmente para depurar o problema. @@ -517,30 +514,29 @@ Isso é essencial para pipelines de longa duração onde falhas podem ocorrer ta Execute o mesmo comando novamente, mas adicione `-resume`: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -Você deve ver uma saída como: +Você deve ver uma saída como: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -Observe `cached: 2` ou `cached: 1` para cada processo - nada foi executado novamente! +Observe a anotação `cached: N` em cada processo de pré-processamento e segmentação — essas tarefas foram reutilizadas em vez de executadas novamente. ### 5.3. Quando resume é útil @@ -551,7 +547,7 @@ Resume é particularmente valioso quando: - Sua conexão de rede cai durante o download de dados - Você quer adicionar saídas adicionais sem refazer a computação -!!! Warning +!!! Warning "Aviso" Resume só funciona se você não alterou os dados de entrada, código do pipeline ou parâmetros. Se você alterar qualquer um destes, o Nextflow irá corretamente executar novamente as tarefas afetadas. diff --git a/docs/pt/docs/nf4_science/imaging/03_inputs.md b/docs/pt/docs/nf4_science/imaging/03_inputs.md index 4232bed1a7..870686afe1 100644 --- a/docs/pt/docs/nf4_science/imaging/03_inputs.md +++ b/docs/pt/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Agora vamos aprender duas abordagens melhores para gerenciar entradas: **arquivo ### 1.1. O problema com linhas de comando longas -Lembre-se do nosso comando da Parte 2: +Na Parte 2, já usamos um arquivo de parâmetros para manter o comando curto e preservar os valores digitados (como os parâmetros inteiros de pré-processamento) intactos: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -Isso funciona, mas é difícil de reproduzir, compartilhar ou modificar. +Passar muitos parâmetros individualmente na linha de comando é difícil de reproduzir, compartilhar ou modificar. E se você precisar executar a mesma análise novamente no próximo mês? E se um colaborador quiser usar suas configurações exatas? +Um arquivo de parâmetros resolve isso. -### 1.2. Solução: Use um arquivo de parâmetros +### 1.2. O arquivo de parâmetros -Crie um arquivo chamado `params.yaml`: +Aqui está o arquivo `params.yaml` que temos usado: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -Agora seu comando se torna: +Cada parâmetro é escrito como um par `chave: valor`. +Escrever inteiros sem aspas (por exemplo, `mindagap_tilesize: 90`) preserva o tipo inteiro, o que a validação de parâmetros do pipeline exige. + +Seu comando se torna: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -É isso! O arquivo de parâmetros documenta sua configuração exata e facilita a reexecução ou compartilhamento. +O arquivo de parâmetros documenta sua configuração exata e facilita a reexecução ou compartilhamento. ### 1.3. Sobrescrevendo parâmetros @@ -58,7 +55,7 @@ nextflow run ./molkart -params-file params.yaml --segmentation_method "stardist" A linha acima altera o `segmentation_method` para `stardist` e o nome do `--outdir` para `stardist_results` em vez dos parâmetros no arquivo `params.yaml`. Além disso, você pode ver que a flag `-resume` nos permitiu reutilizar os resultados de pré-processamento da execução anterior, economizando tempo. -Você pode usar esse padrão para testar rapidamente diferentes variações do fluxo de trabalho. +Você pode usar esse padrão para testar rapidamente diferentes variações do pipeline. ### Conclusão @@ -125,7 +122,7 @@ sample,nuclear_image,spot_table,membrane_image mem_only,data/nuclear.tiff,data/spots.txt,data/membrane.tiff ``` -!!! warning "Aviso" +!!! Warning "Aviso" Observe que os caminhos na planilha de amostras são relativos a onde você **executa** o Nextflow, não onde a planilha de amostras está localizada. diff --git a/docs/pt/docs/nf4_science/imaging/04_config.md b/docs/pt/docs/nf4_science/imaging/04_config.md index dabff1854e..5541ed18e3 100644 --- a/docs/pt/docs/nf4_science/imaging/04_config.md +++ b/docs/pt/docs/nf4_science/imaging/04_config.md @@ -131,15 +131,16 @@ Como estamos usando `-resume`, o Nextflow vai verificar se algo mudou desde a ú Se os parâmetros, entradas e código forem os mesmos, todas as tarefas serão recuperadas do cache e o pipeline será concluído quase instantaneamente. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -Note que todos os processos mostram `cached: 2` ou `cached: 1` - nada foi re-executado! +Note a anotação `cached: N` em cada processo - as tarefas de pré-processamento e segmentação em cache não foram re-executadas. ### 2.4. Profiles de teste @@ -203,7 +204,7 @@ Profiles são aplicados da esquerda para a direita, então profiles posteriores Pipelines nf-core vêm com profiles integrados para contêineres, testes e ambientes especiais. Você pode combinar múltiplos profiles para construir a configuração que precisa. -### Próximos passos +### O que vem a seguir? Aprenda como criar seus próprios profiles personalizados para diferentes ambientes de computação. diff --git a/docs/pt/docs/nf4_science/rnaseq/02_single-sample.md b/docs/pt/docs/nf4_science/rnaseq/02_single-sample.md index 6a7b6c762f..110ce33029 100644 --- a/docs/pt/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/pt/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` Isso deve executar muito rapidamente se você trabalhou na Parte 1 e já baixou o contêiner. @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` Isso também deve executar muito rapidamente, já que estamos executando em um arquivo de entrada tão pequeno. @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` Você pode encontrar as saídas de alinhamento no diretório results. diff --git a/docs/pt/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/pt/docs/nf4_science/rnaseq/03_multi-sample.md index c2b15ba3f0..82df0f24f7 100644 --- a/docs/pt/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/pt/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "Saída do comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` Desta vez cada etapa é executada 6 vezes, uma vez para cada amostra no arquivo CSV. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` Uma única chamada ao MULTIQC foi adicionada após as chamadas de processo em cache. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -726,7 +852,7 @@ Este módulo precisa de mudanças mais substanciais: - A entrada muda de um único caminho para uma tupla de dois caminhos - O comando adiciona a flag `--paired` e recebe ambos os arquivos de leitura -- A saída muda para refletir os arquivos adicionados e diferentes convenções de nomenclatura do Trim Galore, produzindo relatórios FastQC separados para cada arquivo de leitura +- A saída muda para refletir as convenções de nomenclatura paired-end do Trim Galore, produzindo relatórios FastQC separados para cada arquivo de leitura === "Depois" @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "Saída do comando" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` Agora temos duas versões ligeiramente divergentes do nosso fluxo de trabalho, uma para dados de leitura single-end e uma para dados paired-end. diff --git a/docs/pt/docs/side_quests/debugging/index.md b/docs/pt/docs/side_quests/debugging/index.md index 62244ffaff..5a7fe87f17 100644 --- a/docs/pt/docs/side_quests/debugging/index.md +++ b/docs/pt/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. Uso de palavras-chave ou diretivas de processo incorretas @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. Uso de nomes de variáveis inválidos @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ Se você receber um erro 'No such variable', pode corrigi-lo definindo a variáv val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // Define variáveis em código Groovy antes do script @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Uso incorreto de variáveis Bash @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Variáveis Groovy vs Bash" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -713,7 +713,7 @@ nextflow run badpractice_syntax.nf -- Check '.nextflow.log' file for details ``` -A mensagem de erro indica claramente o problema: instruções (como definições de canais) não podem ser misturadas com declarações de script fora de um bloco workflow ou process. +A mensagem de erro indica claramente o problema: instruções (como definições de canais) não podem ser misturadas com declarações de script fora de um bloco workflow, process ou função. #### Verifique o código @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` Mantenha seus canais de entrada definidos dentro do bloco workflow e, em geral, siga quaisquer outras recomendações que a extensão fizer. @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -889,7 +889,7 @@ A mensagem de erro afirma claramente que a chamada esperava 1 argumento, mas rec process PROCESS_FILES { input: - val sample_name // O processo espera apenas 1 entrada + val sample_name // O processo espera apenas 1 canal de entrada output: path "${sample_name}_output.txt" @@ -926,7 +926,7 @@ Para este exemplo específico, o processo espera um único canal e não requer o process PROCESS_FILES { input: - val sample_name // O processo espera apenas 1 entrada + val sample_name // O processo espera apenas 1 canal de entrada output: path "${sample_name}_output.txt" @@ -955,7 +955,7 @@ Para este exemplo específico, o processo espera um único canal e não requer o process PROCESS_FILES { input: - val sample_name // O processo espera apenas 1 entrada + val sample_name // O processo espera apenas 1 canal de entrada output: path "${sample_name}_output.txt" @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` Mais comumente do que neste exemplo, você pode adicionar entradas adicionais a um processo e esquecer de atualizar a chamada do workflow adequadamente, o que pode levar a esse tipo de erro. Felizmente, este é um dos erros mais fáceis de entender e corrigir, pois a mensagem de erro é bastante clara sobre a incompatibilidade. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "Saída do comando" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` Este fluxo de trabalho é concluído sem erro, mas processa apenas uma única amostra! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` Agora você deve ver todas as três amostras sendo processadas em vez de apenas uma. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "Saída do comando" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. Técnicas de Depuração de Canais @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. Software ausente @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "Saída do comando" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "Nota" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker Vamos examinar `bad_resources.nf`: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // ERRO: Limite de tempo irrealista input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -Se você se certificar de ler suas mensagens de erro, falhas como essa não devem te confundir por muito tempo. Mas certifique-se de entender os requisitos de recursos dos comandos que você está executando para poder configurar suas diretivas de recursos adequadamente. +No executor `local`, o erro é menos explícito do que seria em um agendador: você recebe `process hasn't exited` e `WARN: Killing running tasks` em vez de uma mensagem que menciona o limite de tempo. A conexão a fazer é que o Nextflow encerra uma tarefa quando ela ultrapassa os recursos que você definiu, então quando um processo é encerrado sem um erro no nível do script, verifique suas diretivas de recursos. Aqui o culpado é a diretiva `time`, que está muito baixa para o trabalho que o processo realiza. Certifique-se de entender os requisitos de recursos dos comandos que você está executando para poder configurar suas diretivas de recursos adequadamente. ### 3.4. Técnicas de Depuração de Processos @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### Verifique o código @@ -2249,16 +2237,20 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - Este erro críptico indica um problema de análise em torno das linhas 11-12 no bloco `params{}`. O analisador v2 detecta problemas estruturais antecipadamente. + O analisador aponta para a linha 25 (`script:`), mas o verdadeiro culpado está logo acima: a vírgula final após a declaração `output:` na linha 23 faz o analisador esperar outra saída, então ele falha ao chegar em `script:`. Este é o primeiro de vários erros de sintaxe a resolver. Aplique o método de depuração em quatro fases que você aprendeu: @@ -2300,7 +2292,7 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O ``` ??? solution "Solução" - O `buggy_workflow.nf` contém 9 ou 10 erros distintos (dependendo de como você conta) cobrindo todas as principais categorias de depuração. Aqui está uma análise sistemática de cada erro e como corrigi-lo + O `buggy_workflow.nf` contém 10 erros distintos cobrindo todas as principais categorias de depuração. Aqui está uma análise sistemática de cada erro e como corrigi-lo, na ordem em que você os encontra no Nextflow 26.04. O compilador resolve o fluxo de trabalho em duas passagens: primeiro analisa a sintaxe, depois verifica estaticamente se todas as variáveis estão definidas. Portanto, você elimina os erros de sintaxe primeiro, depois um conjunto de erros de variáveis indefinidas, antes que o fluxo de trabalho seja executado e os erros de tempo de execução comecem. Vamos começar com os erros de sintaxe: @@ -2315,6 +2307,8 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O path "${sample_id}_result.txt" ``` + Com a vírgula removida, o analisador percorre até o final do arquivo procurando pela chave que deveria fechar `processFiles` e reporta `Unexpected input: ''`. + **Erro 2: Erro de Sintaxe - Chave de Fechamento Ausente** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O } // Adiciona a chave de fechamento ausente ``` + Agora a sintaxe é analisada com sucesso, então o verificador de tipos estático é executado. Ele reporta todas as variáveis indefinidas de uma vez, antes que o fluxo de trabalho seja executado: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + Essas quatro linhas correspondem a três bugs distintos, os Erros 3, 4 e 5 abaixo. O último deles, `i`, é uma variável Bash que o verificador de tipos não consegue distinguir de uma variável Nextflow, então ela aparece aqui em tempo de compilação em vez de como uma falha em tempo de execução. Corrija os três antes de executar novamente. + **Erro 3: Erro de Nome de Variável** ```groovy linenums="26" echo "Processing: ${sample}" // ERRO: deve ser sample_id @@ -2348,14 +2353,23 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // ERRO: sample_ids indefinida ``` - **Correção:** Use o canal correto e extraia os IDs de amostra + **Correção:** Use o canal correto ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - Neste ponto o fluxo de trabalho será executado, mas ainda receberemos erros (por exemplo, `Path value cannot be null` em `processFiles`), causados por estrutura de canal incorreta. + **Erro 5: Erro de Escape de Variável Bash** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // ERRO: $i parece uma variável Nextflow indefinida + ``` + **Correção:** Escape a variável bash para que o Nextflow a deixe para o shell + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + Com esses erros resolvidos, o fluxo de trabalho compila e começa a ser executado. O primeiro erro em tempo de execução vem de `processFiles`, que espera uma tupla mas está recebendo um valor simples: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **Erro 5: Erro de Estrutura de Canal - Saída de Map Incorreta** + **Erro 6: Erro de Estrutura de Canal - Saída de Map Incorreta** ```groovy linenums="83" .map { row -> row.sample_id } // ERRO: processFiles espera tupla ``` @@ -2364,29 +2378,18 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - Mas isso vai quebrar nossa correção para executar `heavyProcess()` acima, então precisaremos usar um map para passar apenas os IDs de amostra para esse processo: + Isso corrige `processFiles`, mas `input_ch` agora emite uma tupla de dois elementos, e `heavyProcess` ainda está recebendo a tupla inteira onde espera um único valor. A tupla é renderizada no script como `[sample_005, /path/sample_005.fastq.gz]`, o que quebra o comando Bash com um erro de sintaxe e status de saída 2. - **Erro 6: Estrutura de canal incorreta para heavyProcess** + **Erro 7: Estrutura de canal incorreta para heavyProcess** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // ERRO: input_ch agora tem 2 elementos por emissão - heavyProcess precisa apenas de 1 (o primeiro) + heavy_ch = heavyProcess(input_ch) // ERRO: input_ch agora emite uma tupla de 2 elementos; heavyProcess precisa apenas do primeiro elemento ``` - **Correção:** Use o canal correto e extraia os IDs de amostra + **Correção:** Passe apenas os IDs de amostra ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - Agora avançamos um pouco mais, mas recebemos um erro sobre `No such variable: i`, porque não escapamos uma variável Bash. - - **Erro 7: Erro de Escape de Variável Bash** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // ERRO: $i não escapado - ``` - **Correção:** Escape a variável bash - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - Agora recebemos `Process exceeded running time limit (1ms)`, então corrigimos o limite de tempo de execução para o processo relevante: + Agora `heavyProcess` é executado, mas atinge seu limite de tempo. No executor `local`, a mensagem é `process hasn't exited` (junto com uma mensagem `WARN: Killing running tasks`) em vez de um timeout explícito, então conecte a tarefa encerrada de volta à sua diretiva `time`: **Erro 8: Erro de Configuração de Recursos** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O time '100 s' ``` - Em seguida, temos um erro `Missing output file(s)` para resolver: + Em seguida, temos um erro `Missing output file(s)` para resolver, porque o script escreve `${sample_id}.txt` mas a declaração de saída espera `${sample_id}_heavy.txt`: **Erro 9: Incompatibilidade de Nome de Arquivo de Saída** ```groovy linenums="49" @@ -2408,9 +2411,9 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O done > ${sample_id}_heavy.txt ``` - Os dois primeiros processos foram executados, mas não o terceiro. + O fluxo de trabalho agora é concluído sem erros, mas a saída `files` está vazia: `handleFiles` nunca foi executado. Seu canal de entrada, `channel.fromPath("*.txt")`, não encontra nenhum arquivo no diretório de execução, então o processo é simplesmente ignorado em vez de falhar explicitamente. - **Erro 10: Incompatibilidade de Nome de Arquivo de Saída** + **Erro 10: Fonte de Canal Incorreta** ```groovy linenums="88" file_ch = channel.fromPath("*.txt") // Erro: tentando obter entrada do diretório atual em vez de um processo handleFiles(file_ch) @@ -2420,7 +2423,7 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O file_ch = handleFiles(heavy_ch) ``` - Com isso, o fluxo de trabalho completo deve ser executado. + Com isso, o fluxo de trabalho completo é executado do início ao fim e todas as três saídas são preenchidas. **Fluxo de Trabalho Corrigido Completo:** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ Agora é hora de colocar a abordagem sistemática de depuração em prática. O script: """ # Simula computação pesada - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/pt/docs/side_quests/dev_environment/index.md b/docs/pt/docs/side_quests/dev_environment/index.md index fad8135f0f..a9abaabfbf 100644 --- a/docs/pt/docs/side_quests/dev_environment/index.md +++ b/docs/pt/docs/side_quests/dev_environment/index.md @@ -5,6 +5,7 @@ :material-information-outline:{ .ai-translation-notice-icon } Tradução assistida por IA - [saiba mais e sugira melhorias](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) + Ambientes de Desenvolvimento Integrados (IDEs) modernos podem transformar radicalmente sua experiência de desenvolvimento com Nextflow. Esta missão secundária foca especificamente em aproveitar o VS Code e sua extensão para Nextflow para escrever código mais rápido, detectar erros cedo e navegar por fluxos de trabalho complexos com eficiência. !!! note "Isso não é um tutorial tradicional" @@ -77,7 +78,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "Sobre os Arquivos de Exemplo" @@ -87,7 +88,7 @@ tree . ### Atalhos de Teclado -Alguns dos recursos neste guia usam atalhos de teclado opcionais. Se você estiver acessando este material via GitHub Codespaces no navegador, alguns atalhos podem não funcionar como esperado, pois são usados para outras funções no seu sistema. +Alguns dos recursos neste guia usam atalhos de teclado opcionais. Você pode estar acessando este material via GitHub Codespaces no navegador e, nesse caso, alguns atalhos podem não funcionar como esperado, pois são usados para outras funções no seu sistema. Se você estiver executando o VS Code localmente, como provavelmente fará quando estiver escrevendo fluxos de trabalho de verdade, os atalhos funcionarão conforme descrito. @@ -102,7 +103,7 @@ Se você estiver usando um Mac, alguns (não todos) atalhos de teclado usarão " Para instalar a extensão manualmente: 1. Abra o VS Code -2. Vá para a visualização de Extensões clicando no ícone de extensões à esquerda: ![ícone de extensões](../img/extensions_icon.png) (atalho `Ctrl/Cmd+Shift+X` se você estiver executando o VSCode localmente) +2. Vá para a visualização de Extensões clicando no ícone de extensões à esquerda: ![ícone de extensões](../img/extensions_icon.png) (atalho `Ctrl/Cmd+Shift+X` se você estiver executando o VS Code localmente) 3. Pesquise por "Nextflow" 4. Instale a extensão oficial do Nextflow @@ -334,7 +335,7 @@ Agora vamos explorar a navegação em um fluxo de trabalho mais complexo usando ### 4.2. Navegação por Símbolos -Com `complex_workflow.nf` ainda aberto, você pode obter uma visão geral de todos os símbolos no arquivo digitando `@` na barra de pesquisa no topo do VSCode (o atalho de teclado é `Ctrl/Cmd+Shift+O`, mas pode não funcionar no Codespaces). Isso abre o painel de navegação por símbolos, que lista todos os símbolos no arquivo atual: +Com `complex_workflow.nf` ainda aberto, você pode obter uma visão geral de todos os símbolos no arquivo digitando `@` na barra de pesquisa no topo do VS Code (o atalho de teclado é `Ctrl/Cmd+Shift+O`, mas pode não funcionar no Codespaces). Isso abre o painel de navegação por símbolos, que lista todos os símbolos no arquivo atual: ![Navegação por símbolos](../img/symbols.png) @@ -548,7 +549,7 @@ Se o seu projeto for um repositório git (como este é), o VS Code mostra: - Visualizações de diff inline - Capacidades de commit e push -Abra o painel de Controle de Código-Fonte usando o botão de controle de código-fonte (![ícone de controle de código-fonte](../img/source_control_icon.png)) (`Ctrl+Shift+G` ou `Cmd+Shift+G` se você estiver trabalhando com VSCode localmente) para ver as alterações do git e fazer commits diretamente no editor. +Abra o painel de Controle de Código-Fonte usando o botão de controle de código-fonte (![ícone de controle de código-fonte](../img/source_control_icon.png)) (`Ctrl+Shift+G` ou `Cmd+Shift+G` se você estiver trabalhando com VS Code localmente) para ver as alterações do git e fazer commits diretamente no editor. ![Painel de Controle de Código-Fonte](../img/source_control.png) diff --git a/docs/pt/docs/side_quests/essential_scripting_patterns/index.md b/docs/pt/docs/side_quests/essential_scripting_patterns/index.md index c3962115ff..b05e020fb9 100644 --- a/docs/pt/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/pt/docs/side_quests/essential_scripting_patterns/index.md @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, Usaremos esse conjunto de dados realista para explorar técnicas práticas de programação que você encontrará em fluxos de trabalho reais de bioinformática. - - - - #### Lista de verificação de prontidão Acha que está pronto para mergulhar de cabeça? @@ -112,9 +108,19 @@ Comece com um fluxo de trabalho simples que apenas lê o arquivo CSV (já fizemo ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "Saída do comando" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Adicionando o operador Map @@ -148,7 +162,7 @@ Veja como essa operação map fica: === "Depois" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ Veja como essa operação map fica: === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ Agora vamos escrever lógica de **scripting** dentro da nossa closure para trans === "Depois" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ Agora vamos escrever lógica de **scripting** dentro da nossa closure para trans === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ Faça a seguinte mudança: === "Depois" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ Faça a seguinte mudança: === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ Vamos adicionar uma linha para criar uma versão simplificada dos nossos metadad === "Depois" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -329,7 +343,7 @@ Vamos adicionar uma linha para criar uma versão simplificada dos nossos metadad === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec ID fields only: [id:sample_001, organism:human, tissue:liver] - ID fields only: [id:sample_002, organism:mouse, tissue:brain] - ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Isso mostra tanto os metadados completos exibidos pela operação `view()` quanto o subconjunto extraído que imprimimos com `println`. @@ -390,7 +410,7 @@ Vamos produzir uma estrutura de canal composta por uma tupla de 2 elementos: o m === "Depois" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -409,7 +429,7 @@ Vamos produzir uma estrutura de canal composta por uma tupla de 2 elementos: o m === "Antes" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -485,9 +505,9 @@ nextflow run collect.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 Individual channel item: sample_001 Individual channel item: sample_002 @@ -501,7 +521,7 @@ Agora vamos ver o método `collect` em uma List em ação. Modifique `collect.nf === "Depois" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - agrupa múltiplas emissões de canal em uma @@ -519,7 +539,7 @@ Agora vamos ver o método `collect` em uma List em ação. Modifique `collect.nf === "Antes" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - agrupa múltiplas emissões de canal em uma @@ -543,9 +563,9 @@ nextflow run collect.nf ??? success "Saída do comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Individual channel item: sample_001 @@ -614,9 +634,9 @@ nextflow run collect.nf ??? success "Saída do comando" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) Spread operator result: [s1, s2, s3] @@ -673,7 +693,7 @@ Faça a seguinte mudança no seu fluxo de trabalho `main.nf` existente: === "Depois" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // Scripting para transformação de dados def sample_meta = [ @@ -700,7 +720,7 @@ Faça a seguinte mudança no seu fluxo de trabalho `main.nf` existente: === "Antes" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // Scripting para transformação de dados def sample_meta = [ @@ -743,13 +763,19 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Isso mostra os metadados enriquecidos a partir dos nomes dos arquivos. @@ -796,8 +822,9 @@ Em seguida, modifique o bloco `workflow` para conectar o canal `ch_samples` ao p === "Depois" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -824,13 +851,23 @@ Em seguida, modifique o bloco `workflow` para conectar o canal `ch_samples` ao p } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "Antes" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -853,9 +890,18 @@ Em seguida, modifique o bloco `workflow` para conectar o canal `ch_samples` ao p ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -868,28 +914,41 @@ nextflow run main.nf ??? failure "Saída do comando" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` Você pode ver que o processo está tentando executar `fastp` com um valor `null` para o segundo arquivo de entrada, o que está causando a falha. Isso ocorre porque nosso conjunto de dados contém leituras single-end, mas o processo está codificado para esperar leituras paired-end (dois arquivos de entrada por vez). @@ -953,18 +1012,24 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Parece bom! Se verificarmos os comandos reais que foram executados (personalize para o hash da sua tarefa): ```console title="Check commands executed" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Podemos ver que o Nextflow escolheu corretamente o comando para leituras single-end: @@ -976,7 +1041,7 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Outro uso comum de lógica de script dinâmica pode ser visto no [módulo de Genômica do Nextflow for Science](../../nf4_science/genomics/03_joint_calling.md). Nesse módulo, o processo GATK sendo chamado pode receber múltiplos arquivos de entrada, mas cada um deve ser prefixado com `-V` para formar uma linha de comando correta. O processo usa scripting para transformar uma coleção de arquivos de entrada (`all_gvcfs`) nos argumentos de comando corretos: @@ -1023,11 +1088,12 @@ Inclua o processo no seu `main.nf` e adicione-o ao fluxo de trabalho: === "Depois" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1054,15 +1120,25 @@ Inclua o processo no seu `main.nf` e adicione-o ao fluxo de trabalho: ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Antes" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1088,17 +1164,44 @@ Inclua o processo no seu `main.nf` e adicione-o ao fluxo de trabalho: } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` Agora execute o fluxo de trabalho e verifique os relatórios gerados em `results/reports/`. Eles devem conter informações básicas sobre cada amostra. - +```bash +nextflow run main.nf +``` ??? success "Saída do comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` Mas e se quisermos adicionar informações sobre quando e onde o processamento ocorreu? Vamos modificar o processo para usar variáveis **shell** e um pouco de substituição de comandos para incluir o usuário atual, hostname e data no relatório: @@ -1131,11 +1234,18 @@ Se você executar isso, notará um erro — o Nextflow tenta interpretar `#!groo ??? failure "Saída do comando" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Precisamos escapá-la para que o Bash possa tratá-la. @@ -1195,7 +1305,7 @@ Para ilustrar como isso fica com nosso fluxo de trabalho existente, faça a modi === "Depois" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1222,22 +1332,33 @@ Para ilustrar como isso fica com nosso fluxo de trabalho existente, faça a modi } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Antes" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1264,6 +1385,15 @@ Para ilustrar como isso fica com nosso fluxo de trabalho existente, faça a modi ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` @@ -1289,13 +1419,22 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` A saída deve mostrar ambos os processos sendo concluídos com sucesso. O fluxo de trabalho agora está muito mais limpo e fácil de manter, com toda a lógica complexa de processamento de metadados encapsulada na função `separateMetadata`. @@ -1359,26 +1498,35 @@ nextflow run main.nf -ansi-log false ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` Você pode verificar o comando `docker` exato que foi executado para ver a alocação de CPU para qualquer tarefa: ```console title="Check docker command" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` Você deve ver algo como: ```bash title="docker command" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` Neste exemplo, escolhemos um exemplo que solicitou 2 CPUs (`--cpu-shares 2048`), porque era uma amostra de alta profundidade, mas você deve ver diferentes alocações de CPU dependendo da profundidade da amostra. Tente isso para as outras tarefas também. @@ -1432,7 +1580,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` Isso indica que o processo foi encerrado por exceder os limites de memória. @@ -1520,7 +1668,7 @@ Inclua o novo módulo de `modules/trimgalore.nf`: === "Depois" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1538,7 +1686,7 @@ Inclua o novo módulo de `modules/trimgalore.nf`: === "Antes" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1556,14 +1704,26 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` Aqui, usamos expressões condicionais pequenas mas poderosas dentro do operador `.branch{}` para rotear amostras com base em seus metadados. Amostras humanas com alta cobertura passam pelo `FASTP`, enquanto todas as outras amostras passam pelo `TRIMGALORE`. @@ -1583,7 +1743,7 @@ Adicione o seguinte antes da operação de branch: === "Depois" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1603,7 +1763,7 @@ Adicione o seguinte antes da operação de branch: === "Antes" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1624,21 +1784,31 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -Como escolhemos um filtro que exclui algumas amostras, menos tarefas foram executadas. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +Neste caso, todas as três amostras satisfazem o filtro, então cada amostra continua pelo pipeline. +Um limite mais restrito excluiria amostras de baixa profundidade e reduziria o número de tarefas executadas. A expressão de filtro `meta.id && meta.organism && meta.depth >= 25000000` combina truthiness com comparações explícitas: @@ -1708,13 +1878,13 @@ nextflow run main.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` Isso falha com um NullPointerException. @@ -1764,7 +1934,27 @@ nextflow run main.nf ??? success "Saída do comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` Sem falhas! O fluxo de trabalho agora lida com o campo ausente de forma elegante. Quando `row.run_id` é `null`, o operador `?.` impede a chamada de `.toUpperCase()`, e `run_id` se torna `null` em vez de causar uma exceção. @@ -1808,7 +1998,7 @@ Adicione também um operador `view()` no fluxo de trabalho para ver os resultado === "Depois" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1817,7 +2007,7 @@ Adicione também um operador `view()` no fluxo de trabalho para ver os resultado === "Antes" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1870,7 +2060,7 @@ Crie uma função de validação antes do seu bloco de fluxo de trabalho, chame- === "Depois" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1888,6 +2078,7 @@ Crie uma função de validação antes do seu bloco de fluxo de trabalho, chame- } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1901,6 +2092,7 @@ Crie uma função de validação antes do seu bloco de fluxo de trabalho, chame- ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1913,9 +2105,9 @@ nextflow run main.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` Input CSV file path not provided. Please specify --input @@ -1932,9 +2124,9 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 Input CSV file not found: ./data/nonexistent.csv ``` @@ -1948,7 +2140,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "Saída do comando" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Desta vez, ele é executado com sucesso. @@ -1987,14 +2199,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 + + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2025,7 +2247,7 @@ Adicione o handler de eventos ao seu arquivo `main.nf`, dentro da definição do === "Depois" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2041,15 +2263,21 @@ Adicione o handler de eventos ao seu arquivo `main.nf`, dentro da definição do println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "Antes" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2064,29 +2292,44 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:14:24.885384+01:00 - Duration : 2.9s + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Vamos torná-lo mais útil adicionando lógica condicional: === "Depois" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2109,12 +2352,15 @@ Vamos torná-lo mais útil adicionando lógica condicional: println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "Antes" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) @@ -2130,34 +2376,53 @@ Vamos torná-lo mais útil adicionando lógica condicional: println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` Agora obtemos um resumo ainda mais informativo, incluindo uma mensagem de sucesso/falha e o diretório de saída, se especificado: - +```bash +nextflow run main.nf +``` ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) Pipeline execution summary: ========================== - Completed at: 2025-10-10T12:16:00.522569+01:00 - Duration : 3.6s + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s Success : true workDir : /workspaces/training/side-quests/essential_scripting_patterns/work exit status : 0 ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` Você também pode escrever o resumo em um arquivo usando operações de arquivo: diff --git a/docs/pt/docs/side_quests/metadata/index.md b/docs/pt/docs/side_quests/metadata/index.md index f341596352..32459f5da4 100644 --- a/docs/pt/docs/side_quests/metadata/index.md +++ b/docs/pt/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Como você pode ver, o operador construiu um map de pares chave-valor para cada linha do arquivo CSV, com os cabeçalhos das colunas como chaves para os valores correspondentes. @@ -265,9 +271,9 @@ Por exemplo, poderíamos acessar o ID do arquivo com `id` ou o caminho do arquiv E aqui está o que você pode esperar ver na saída: ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Isso mostra que conseguimos acessar os valores da coluna `character` para cada linha. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Como você pode ver, o `COWPY` foi executado em cada arquivo usando o personagem correto para cada um. @@ -654,12 +679,25 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` A saída são os mesmos sete arquivos `cowpy-*.txt` de antes, agora produzidos com uma chamada mais simples ao `COWPY`. @@ -744,7 +782,7 @@ Vamos reestruturar a operação `map` para produzir uma tupla `[meta, file]`: === "Antes" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -770,9 +808,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -781,6 +819,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Cada elemento no canal agora é uma tupla de dois elementos: o meta map primeiro e o arquivo em segundo. @@ -792,7 +836,7 @@ Cada elemento no canal agora é uma tupla de dois elementos: o meta map primeiro ] ``` -Se mais tarde adicionarmos uma coluna `language` à planilha, ela ficará disponível como `meta.language` sem exigir nenhuma alteração na definição de entrada do processo. +Se mais tarde adicionarmos uma coluna `language` à planilha e incluí-la na operação `map` (por exemplo, `language: row.language`), ela ficará disponível como `meta.language` sem exigir nenhuma alteração na definição de entrada do processo. #### 1.5.3. Atualizar o processo `COWPY` para usar o meta map @@ -891,12 +935,25 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` O diretório de resultados agora contém os arquivos de arte ASCII. @@ -1044,20 +1101,33 @@ nextflow run main.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` Agora temos uma previsão de idioma para cada arquivo no conjunto de dados. @@ -1206,19 +1276,32 @@ nextflow run main.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` Sim, está correto! @@ -1311,7 +1394,7 @@ Pontos principais: -#### 2.3.2. Executar o fluxo de trabalho +#### 2.3.2. Executar o fluxo de trabalho: Execute o fluxo de trabalho para verificar que funciona: @@ -1322,19 +1405,32 @@ nextflow run main.nf -resume ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` O meta map agora carrega quatro campos: `id`, `character`, `lang` e `lang_group`. @@ -1445,13 +1541,26 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` O diretório de resultados agora está organizado por família linguística, com cada arquivo nomeado de acordo com o idioma detectado: @@ -1509,18 +1618,19 @@ Quando o Nextflow substitui `#!groovy ${meta.character}` no comando, a ferrament ??? failure "Saída do comando" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1540,7 +1650,7 @@ Quando o Nextflow substitui `#!groovy ${meta.character}` no comando, a ferrament cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1564,28 +1674,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -A chave `character` nunca é criada no meta map. -Quando o script do processo avalia `#!groovy ${meta.character}`, a chave ausente retorna `null`, e o Nextflow literalmente substitui a string `null` no comando: +Nossa operação `map` escreve explicitamente `#!groovy character: row.character`, então a chave `character` ainda é criada no meta map, mas acessar uma coluna que não existe na linha analisada retorna `null`, fazendo com que seu valor se torne `null`. +Quando o script do processo avalia `#!groovy ${meta.character}`, o Nextflow literalmente substitui a string `null` no comando: ??? failure "Saída do comando" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1610,7 +1721,7 @@ Quando o script do processo avalia `#!groovy ${meta.character}`, a chave ausente TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/pt/docs/side_quests/nf_test/index.md b/docs/pt/docs/side_quests/nf_test/index.md index de2f515a62..47b60329a0 100644 --- a/docs/pt/docs/side_quests/nf_test/index.md +++ b/docs/pt/docs/side_quests/nf_test/index.md @@ -1,19 +1,3 @@ -I'll analyze the diff and update only the specific sections that changed in the existing translation. - -The changes are: - -1. Link URL: `../hello_nextflow/README.md` → `../../hello_nextflow/index.md` (Prerequisites section) -2. Link URL: `../envsetup/index.md` → `../../envsetup/index.md` (Open training codespace section) -3. Link URLs in "Revise os materiais" section: `../hello_nextflow/00_orientation.md` → `../../hello_nextflow/00_orientation.md` and `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` -4. Link URL in the example block: `../hello_nextflow/index.md` → `../../hello_nextflow/index.md` -5. Workflow code block: removed `publishDir` directives, added `main:`, `publish:`, and `output {}` block -6. File assertions: `Holà` → `Hola` (two occurrences) -7. Link URL in section 2.1: `../hello_nextflow/03_hello_workflow.md` → `../../hello_nextflow/03_hello_workflow.md` -8. Warning admonition: `!!!warning` → `!!! warning` -9. Final link: `../` → `../index.md` - -%%% - # Testando com nf-test :material-information-outline:{ .ai-translation-notice-icon } Tradução assistida por IA - [saiba mais e sugira melhorias](https://github.com/nextflow-io/training/blob/master/TRANSLATING.md) @@ -35,7 +19,7 @@ Os testes permitem que você verifique sistematicamente se cada parte do seu pip Existem muitos tipos diferentes de testes que podemos escrever: -1. **Testes em nível de módulo**: Para processos individuais +1. **Testes em nível de processo**: Para processos individuais 2. **Testes em nível de fluxo de trabalho**: Para um único fluxo de trabalho 3. **Testes em nível de pipeline**: Para o pipeline como um todo 4. **Testes de desempenho**: Para a velocidade e eficiência do pipeline @@ -43,16 +27,16 @@ Existem muitos tipos diferentes de testes que podemos escrever: Testar processos individuais é análogo a testes unitários em outras linguagens. Testar o fluxo de trabalho ou o pipeline inteiro é análogo ao que é chamado de testes de integração em outras linguagens, onde testamos as interações dos componentes. -[**nf-test**](https://www.nf-test.com/) é uma ferramenta que permite escrever testes em nível de módulo, fluxo de trabalho e pipeline. Em resumo, ela permite que você verifique sistematicamente cada parte individual do pipeline está funcionando como esperado, _de forma isolada_. +[**nf-test**](https://www.nf-test.com/) é uma ferramenta que permite escrever testes em nível de processo, fluxo de trabalho e pipeline. Em resumo, ela permite que você verifique sistematicamente cada parte individual do pipeline está funcionando como esperado, _de forma isolada_. ### Objetivos de aprendizado -Nesta missão secundária, você aprenderá a usar o nf-test para escrever um teste em nível de fluxo de trabalho para o pipeline, bem como testes em nível de módulo para os três processos que ele utiliza. +Nesta missão secundária, você aprenderá a usar o nf-test para escrever um teste em nível de fluxo de trabalho para o pipeline, bem como testes em nível de processo para os dois processos que ele utiliza. Ao final desta missão secundária, você será capaz de usar as seguintes técnicas de forma eficaz: - Inicializar o nf-test no seu projeto -- Gerar testes em nível de módulo e de fluxo de trabalho +- Gerar testes em nível de processo e de fluxo de trabalho - Adicionar tipos comuns de asserções - Entender quando usar snapshots vs. asserções de conteúdo - Executar testes para um projeto inteiro @@ -66,6 +50,16 @@ Antes de embarcar nesta missão secundária, você deve: - Ter concluído o tutorial [Hello Nextflow](../../hello_nextflow/index.md) ou um curso equivalente para iniciantes. - Estar confortável usando conceitos e mecanismos básicos do Nextflow (processos, canais, operadores, trabalhando com arquivos, metadados) +!!! warning "Requisito de versão do nf-test" + + Testes em nível de processo requerem **nf-test 0.9.3 ou posterior**. Versões mais antigas (incluindo 0.9.2) geram código de estrutura de teste incompatível com o analisador de sintaxe estrito que o Nextflow usa por padrão a partir da versão 26.04, causando um erro `Script compilation failed` em vez do resultado esperado do teste. + + Verifique sua versão com `nf-test version`. Se precisar atualizar: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. Primeiros passos @@ -97,7 +91,8 @@ Você encontrará um arquivo de fluxo de trabalho principal e um arquivo CSV cha ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` Para uma descrição detalhada dos arquivos, consulte o [aquecimento do Hello Nextflow](../../hello_nextflow/00_orientation.md). @@ -127,21 +122,23 @@ Você pode ver o código completo do fluxo de trabalho abaixo. ??? example "Código do fluxo de trabalho" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * Parâmetros do pipeline - */ + * Parâmetros do pipeline + */ params.input_file = "greetings.csv" /* - * Usa echo para imprimir 'Hello World!' na saída padrão - */ + * Usa echo para imprimir 'Hello World!' na saída padrão + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -150,15 +147,15 @@ Você pode ver o código completo do fluxo de trabalho abaixo. } /* - * Usa um utilitário de substituição de texto para converter a saudação para maiúsculas - */ + * Usa um utilitário de substituição de texto para converter a saudação para maiúsculas + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -199,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` PARABÉNS! Você acabou de executar um teste! @@ -451,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` Sucesso! O pipeline é executado com sucesso e o teste passa. Execute quantas vezes quiser e você sempre obterá o mesmo resultado! @@ -476,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -550,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` Sucesso! O pipeline é executado com sucesso e o teste passa. Agora começamos a testar os detalhes do pipeline, bem como o status geral. @@ -635,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` Sucesso! Os testes passam porque o pipeline foi concluído com sucesso, o número correto de processos foi executado e os arquivos de saída foram criados. Isso também deve mostrar como é útil fornecer esses nomes informativos para seus testes. @@ -746,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -816,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -824,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` Sucesso! O teste passa porque o processo `sayHello` foi executado com sucesso e a saída foi criada. @@ -874,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` Sucesso! O teste passa porque o processo `sayHello` foi executado com sucesso e a saída correspondeu ao snapshot. @@ -967,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. Testar o processo `convertToUpper` @@ -1014,10 +1040,10 @@ Este é um teste semelhante ao do processo `sayHello`, mas está testando o proc Agora precisamos fornecer um único arquivo de entrada para o processo convertToUpper, que inclui algum texto que queremos converter para maiúsculas. Há muitas maneiras de fazer isso: - Poderíamos criar um arquivo dedicado para testar -- Poderíamos reutilizar o arquivo data/greetings.csv existente +- Poderíamos reutilizar o arquivo greetings.csv existente - Poderíamos criá-lo dinamicamente dentro do teste -Por enquanto, vamos reutilizar o arquivo data/greetings.csv existente usando o exemplo que usamos com o teste em nível de pipeline. Como antes, podemos nomear o teste para refletir melhor o que estamos testando, mas desta vez vamos deixá-lo 'capturar' o conteúdo em vez de verificar strings específicas (como fizemos no outro processo). +Por enquanto, vamos reutilizar o arquivo greetings.csv existente usando o exemplo que usamos com o teste em nível de pipeline. Como antes, podemos nomear o teste para refletir melhor o que estamos testando, mas desta vez vamos deixá-lo 'capturar' o conteúdo em vez de verificar strings específicas (como fizemos no outro processo). === "Depois" @@ -1086,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1094,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` Observe que criamos um arquivo de snapshot para o processo `convertToUpper` em `tests/main.converttoupper.nf.test.snap`. Se executarmos o teste novamente, devemos ver o nf-test passar novamente. @@ -1113,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### Conclusão @@ -1155,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` Veja só! Executamos 4 testes, 1 para cada processo e 2 para o pipeline inteiro com um único comando. Imagine como isso é poderoso em uma base de código grande! @@ -1209,7 +1235,7 @@ Confira a [documentação do nf-test](https://www.nf-test.com/) para recursos de - Adicionar asserções mais abrangentes aos seus testes - Escrever testes para casos extremos e condições de erro - Configurar integração contínua para executar testes automaticamente -- Aprender sobre outros tipos de testes como testes de fluxo de trabalho e de módulo +- Aprender sobre outros tipos de testes como testes de fluxo de trabalho, desempenho e estresse - Explorar técnicas de validação de conteúdo mais avançadas **Lembre-se:** Os testes são documentação viva de como seu código deve se comportar. Quanto mais testes você escrever, e quanto mais específicas forem suas asserções, mais confiante você pode estar na confiabilidade do seu pipeline. @@ -1219,4 +1245,3 @@ Confira a [documentação do nf-test](https://www.nf-test.com/) para recursos de ## O que vem a seguir? Retorne ao [menu de Missões Secundárias](../index.md) ou clique no botão no canto inferior direito da página para avançar para o próximo tópico da lista. -%%% diff --git a/docs/pt/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/pt/docs/side_quests/plugin_development/01_plugin_basics.md index f3cfabcc6b..d1dd4e45e0 100644 --- a/docs/pt/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/pt/docs/side_quests/plugin_development/01_plugin_basics.md @@ -511,7 +511,7 @@ Atualize o `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -534,7 +534,7 @@ O plugin produz várias mensagens INFO e WARN durante a execução. Isso é normal para um exemplo pequeno sendo executado em uma máquina local: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -600,7 +600,7 @@ Adicione um bloco `co2footprint` ao `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -614,7 +614,7 @@ Adicione um bloco `co2footprint` ao `nextflow.config`: plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -635,11 +635,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: O aviso de zona desapareceu. O plugin agora usa a intensidade de carbono específica do GB (163.92 gCO₂eq/kWh) em vez do valor global de fallback (480.0 gCO₂eq/kWh). -!!! note "Nota" - - Você também pode ver uma mensagem `WARN: Unrecognized config option 'co2footprint.location'`. - Isso é apenas cosmético e pode ser ignorado com segurança; o plugin ainda lê o valor corretamente. - Na Parte 6, você criará um escopo de configuração para o seu próprio plugin. Este plugin funciona inteiramente por meio do mecanismo observer, conectando-se aos eventos do ciclo de vida do fluxo de trabalho para coletar métricas de recursos e gerar seu relatório quando o pipeline é concluído. diff --git a/docs/pt/docs/side_quests/plugin_development/02_create_project.md b/docs/pt/docs/side_quests/plugin_development/02_create_project.md index 1117a0dc61..6b7c21dd48 100644 --- a/docs/pt/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/pt/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ Você deve ver: ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ A mais importante é o bloco `nextflowPlugin`: ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ Atualize-o para corresponder à versão do Nextflow instalada para garantir comp ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ Atualize-o para corresponder à versão do Nextflow instalada para garantir comp ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **Os avisos são esperados.** diff --git a/docs/pt/docs/side_quests/plugin_development/03_custom_functions.md b/docs/pt/docs/side_quests/plugin_development/03_custom_functions.md index f9f8f09899..14f819a19f 100644 --- a/docs/pt/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/pt/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "Output" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/pt/docs/side_quests/plugin_development/04_build_and_test.md b/docs/pt/docs/side_quests/plugin_development/04_build_and_test.md index e410792c4b..c47da4cd4d 100644 --- a/docs/pt/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/pt/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **Onde estão os resultados dos testes?** O Gradle oculta a saída detalhada quando todos os testes passam. diff --git a/docs/pt/docs/side_quests/plugin_development/05_observers.md b/docs/pt/docs/side_quests/plugin_development/05_observers.md index 7722c7bdcc..d64aac066a 100644 --- a/docs/pt/docs/side_quests/plugin_development/05_observers.md +++ b/docs/pt/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "Saída" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/pt/docs/side_quests/plugin_development/06_configuration.md b/docs/pt/docs/side_quests/plugin_development/06_configuration.md index fae9cc00db..4f63e6b48b 100644 --- a/docs/pt/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/pt/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ A compilação falha: ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` Em Groovy (e Java), você deve _declarar_ uma variável antes de usá-la. diff --git a/docs/pt/docs/side_quests/plugin_development/index.md b/docs/pt/docs/side_quests/plugin_development/index.md index c76370ffbf..3a35c7b6f9 100644 --- a/docs/pt/docs/side_quests/plugin_development/index.md +++ b/docs/pt/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ Não é necessária experiência prévia com Java ou Groovy. **Diretório de trabalho:** `side-quests/plugin_development` +#### Abra o codespace de treinamento + +Se ainda não tiver feito isso, certifique-se de abrir o ambiente de treinamento conforme descrito em [Configuração do Ambiente](../../envsetup/index.md). + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Objetivos de aprendizado Ao final deste treinamento, você será capaz de: diff --git a/docs/pt/docs/side_quests/splitting_and_grouping/index.md b/docs/pt/docs/side_quests/splitting_and_grouping/index.md index a7a2a68800..feeb8d0437 100644 --- a/docs/pt/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/pt/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ Aplique estas alterações ao `main.nf`: === "Depois" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ A seguir, vamos considerar a situação em que você quer unir por múltiplos ca ### 3.2. Unir por múltiplos campos -Temos 2 réplicas para a amostraA, mas apenas 1 para as amostrasB e C. Neste caso, conseguimos uni-las efetivamente usando o campo `id`, mas o que aconteceria se elas estivessem fora de sincronia? Poderíamos misturar as amostras normal e tumoral de réplicas diferentes! +Temos 2 réplicas para o patientA, mas apenas 1 para o patientB e o patientC. Neste caso, conseguimos uni-las efetivamente usando o campo `id`, mas o que aconteceria se elas estivessem fora de sincronia? Poderíamos misturar as amostras normal e tumoral de réplicas diferentes! Para evitar isso, podemos unir por múltiplos campos. Na verdade, existem várias formas de fazer isso, mas vamos nos concentrar em criar uma nova chave de junção que inclua tanto o `id` quanto o número de `replicate` da amostra. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + Como o closure agora envolve cada caminho com `file()`, as entradas de arquivo aparecem como caminhos absolutos resolvidos em vez dos nomes de arquivo simples da planilha de amostras. + Usar um closure nomeado nos permite reutilizar a mesma transformação em múltiplos lugares, reduzindo o risco de erros e tornando o código mais legível e de fácil manutenção. ### 3.5. Reduzir a duplicação de dados @@ -723,21 +725,21 @@ Temos muitos dados duplicados no nosso fluxo de trabalho. Cada item nas amostras ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "Saída do comando" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ Nesta seção, você aprendeu: ## 5. Agregando amostras usando `groupTuple` -Nas seções anteriores, aprendemos como dividir dados de um arquivo de entrada e filtrar por campos específicos (no nosso caso, amostras normais e tumorais). Mas isso cobre apenas um tipo de junção. E se quisermos agrupar amostras por um atributo específico? Por exemplo, em vez de unir pares normal-tumor correspondentes, podemos querer processar todas as amostras de "sampleA" juntas, independentemente do tipo. Esse padrão é comum em fluxos de trabalho de bioinformática onde você pode querer processar amostras relacionadas separadamente por razões de eficiência antes de comparar ou combinar os resultados no final. +Nas seções anteriores, aprendemos como dividir dados de um arquivo de entrada e filtrar por campos específicos (no nosso caso, amostras normais e tumorais). Mas isso cobre apenas um tipo de junção. E se quisermos agrupar amostras por um atributo específico? Por exemplo, em vez de unir pares normal-tumor correspondentes, podemos querer processar todas as amostras de "patientA" juntas, independentemente do tipo. Esse padrão é comum em fluxos de trabalho de bioinformática onde você pode querer processar amostras relacionadas separadamente por razões de eficiência antes de comparar ou combinar os resultados no final. O Nextflow inclui métodos integrados para fazer isso, o principal que veremos é o `groupTuple`. @@ -1008,7 +1014,7 @@ O primeiro passo é semelhante ao que fizemos na seção anterior. Devemos isola ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Dominar essas operações de canal permitirá que você construa pipelines flex 2. **Divisão de dados em canais separados:** Usamos `filter` para dividir dados em fluxos independentes com base no campo `type` ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Junção de amostras correspondentes:** Usamos `join` para recombinar amostras relacionadas com base nos campos `id` e `repeat` @@ -1199,31 +1205,31 @@ Dominar essas operações de canal permitirá que você construa pipelines flex - Unir dois canais por chave (primeiro elemento da tupla) ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Extrair chave de junção e unir por esse valor ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - Unir por múltiplos campos usando subMap + - Unir por múltiplos campos usando `subMap` ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Distribuição por intervalos:** Usamos `combine` para criar produtos cartesianos de amostras com intervalos genômicos para processamento paralelo. ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Agregação por chaves de agrupamento:** Usamos `groupTuple` para agrupar pelo primeiro elemento em cada tupla, coletando assim amostras que compartilham os campos `id` e `interval` e mesclando réplicas técnicas. diff --git a/docs/pt/docs/side_quests/workflows_of_workflows/index.md b/docs/pt/docs/side_quests/workflows_of_workflows/index.md index ab6f31e47b..2eb2386d57 100644 --- a/docs/pt/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/pt/docs/side_quests/workflows_of_workflows/index.md @@ -141,21 +141,35 @@ nextflow run workflows/greeting.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` Para torná-lo composável com outros fluxos de trabalho, algumas coisas precisam mudar. ### 1.2. Tornar o fluxo de trabalho composável -Para tornar um fluxo de trabalho composável, quatro coisas precisam mudar: -o fluxo de trabalho recebe um nome, as entradas são movidas para um bloco `take:`, as saídas são movidas para um bloco `emit:`, -e os blocos independentes `publish:`/`output {}` são removidos (eles pertencem ao entry workflow). +Para tornar um fluxo de trabalho composável, três coisas precisam mudar: +o fluxo de trabalho recebe um nome, as entradas são movidas para um bloco `take:` e as saídas são movidas para um bloco `emit:` +(substituindo os blocos independentes `publish:`/`output {}`, que pertencem ao entry workflow). Vamos percorrer essas mudanças uma a uma. @@ -278,8 +292,8 @@ nextflow run workflows/greeting.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -363,12 +377,21 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "Conteúdo do diretório" @@ -456,11 +479,25 @@ nextflow run workflows/transform.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` Para torná-lo composável com o `GREETING_WORKFLOW`, as mesmas três mudanças da seção 1.2 se aplicam. @@ -585,14 +622,33 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "Conteúdo do diretório" @@ -616,7 +672,7 @@ nextflow run main.nf ??? abstract "Conteúdo do arquivo" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` O pipeline está funcionando de ponta a ponta: a saudação foi convertida para maiúsculas e invertida. diff --git a/docs/pt/docs/side_quests/working_with_files/index.md b/docs/pt/docs/side_quests/working_with_files/index.md index 50afa18823..e9759147db 100644 --- a/docs/pt/docs/side_quests/working_with_files/index.md +++ b/docs/pt/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Como você pode ver, o Nextflow imprimiu o caminho em string exatamente como o escrevemos. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Desta vez, você vê o caminho absoluto completo em vez do caminho relativo que fornecemos como entrada. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Você vê os vários atributos do arquivo impressos no console acima. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Isso mostra que somos capazes de operar no arquivo adequadamente dentro de um processo. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Esta é a parte importante: @@ -543,12 +568,13 @@ nextflow run main.nf ??? failure "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -576,9 +602,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Isso mostra muitos detalhes sobre o erro porque o processo está configurado para exibir informações de depuração, conforme mencionado acima. @@ -692,9 +718,9 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -702,9 +728,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Funcionou! Você pode ver que muito pouco mudou. @@ -813,16 +845,11 @@ Uma forma ingênua de fazer isso seria combinar o método `file()` com [`channel ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` Isso funciona, mas é desajeitado. -!!! tip "Quando usar `file()` vs `channel.fromPath()`" - - - Use `file()` quando precisar de um único objeto Path para manipulação direta (verificar se um arquivo existe, ler seus atributos ou passar para uma única invocação de processo) - - Use `channel.fromPath()` quando precisar de um canal que possa conter múltiplos arquivos, especialmente com padrões glob, ou quando os arquivos fluirão por múltiplos processos - É aqui que entra o [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath): um channel factory conveniente que agrupa toda a funcionalidade necessária para gerar um canal a partir de uma ou mais strings de arquivo estáticas, bem como padrões glob. ### 3.1. Adicionar o channel factory @@ -877,11 +904,17 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Como você pode ver, o caminho do arquivo está sendo carregado como um objeto do tipo `Path` no canal. @@ -889,6 +922,11 @@ Isso é semelhante ao que `file()` teria feito, exceto que agora temos um canal Usar `channel.fromPath()` é uma forma conveniente de criar um novo canal populado por uma lista de arquivos. +!!! tip "Quando usar `file()` vs `channel.fromPath()`" + + - Use `file()` quando precisar de um único objeto Path para manipulação direta (verificar se um arquivo existe, ler seus atributos ou passar para uma única invocação de processo) + - Use `channel.fromPath()` quando precisar de um canal que possa conter múltiplos arquivos, especialmente com padrões glob, ou quando os arquivos fluirão por múltiplos processos + ### 3.2. Visualizar atributos de arquivos no canal Em nossa primeira passagem usando o channel factory, simplificamos o código e apenas imprimimos o nome do arquivo. @@ -934,12 +972,12 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -947,6 +985,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` E aí está, os mesmos resultados de antes, mas agora temos o arquivo em um canal, então podemos adicionar mais. @@ -1003,12 +1047,12 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1024,6 +1068,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Como você pode ver, agora temos dois objetos Path em nosso canal, o que mostra que o Nextflow fez a expansão de nome de arquivo corretamente e carregou e processou ambos os arquivos conforme esperado. @@ -1108,19 +1158,25 @@ nextflow run main.nf ??? success "Saída do comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Cada elemento no canal agora é uma tupla contendo o `simpleName` e o objeto de arquivo original. @@ -1164,19 +1220,25 @@ nextflow run main.nf ??? success "Saída do comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Agora a tupla para cada elemento em nosso canal contém a lista de metadados (_ex.:_ `[patientA, rep1, normal, R1, 001]`) e o objeto de arquivo original. @@ -1265,19 +1327,25 @@ nextflow run main.nf ??? success "Saída do comando" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Agora os metadados estão claramente rotulados (_ex.:_ `[id:patientA, replicate:1, type:normal, readNum:2]`), então é muito mais fácil identificar o que é o quê. @@ -1337,10 +1405,10 @@ Vamos atualizar o fluxo de trabalho `main.nf` adequadamente: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Comentando o mapeamento por enquanto, voltaremos a ele! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1355,13 +1423,13 @@ Vamos atualizar o fluxo de trabalho `main.nf` adequadamente: === "Antes" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // Carrega arquivos com channel.fromFilePairs + // Carrega arquivos com channel.fromPath ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1383,12 +1451,11 @@ nextflow run main.nf ??? failure "Saída do comando" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1398,9 +1465,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Ops, desta vez a execução falhou! @@ -1451,11 +1518,17 @@ nextflow run main.nf ??? success "Saída do comando" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Eba, desta vez o fluxo de trabalho foi bem-sucedido! @@ -1476,10 +1549,10 @@ Descomente a operação map no fluxo de trabalho e faça as seguintes edições: // Carrega arquivos com channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1496,10 +1569,10 @@ Descomente a operação map no fluxo de trabalho e faça as seguintes edições: ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Comentando o mapeamento por enquanto, voltaremos a ele! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1526,11 +1599,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` E aí está: temos o map de metadados (`[id:patientA, replicate:1, type:normal]`) na primeira posição da tupla de saída, seguido pela tupla de arquivos pareados, como pretendido. @@ -1642,10 +1721,10 @@ No fluxo de trabalho principal, substitua o operador `.view()` por `#!groovy .se // Carrega arquivos com channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1664,10 +1743,10 @@ No fluxo de trabalho principal, substitua o operador `.view()` por `#!groovy .se // Carrega arquivos com channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1686,11 +1765,17 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Isso confirma que agora podemos nos referir ao canal pelo nome. @@ -1714,10 +1799,10 @@ No fluxo de trabalho principal, faça as seguintes alterações no código: // Carrega arquivos com channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1747,10 +1832,10 @@ No fluxo de trabalho principal, faça as seguintes alterações no código: // Carrega arquivos com channel.fromFilePairs ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1784,12 +1869,19 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` As saídas são publicadas em um diretório `results`, então dê uma olhada lá. @@ -1849,12 +1941,26 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` O diretório de resultados agora deve conter resultados para todos os dados disponíveis. @@ -1885,7 +1991,7 @@ Faça a seguinte alteração no bloco `output {}`: === "Depois" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1893,7 +1999,7 @@ Faça a seguinte alteração no bloco `output {}`: === "Antes" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1911,12 +2017,26 @@ nextflow run main.nf ??? success "Saída do comando" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` Verifique o diretório de resultados agora: @@ -2069,7 +2189,7 @@ Aplicar essas técnicas em seu próprio trabalho permitirá que você construa f 5. **Simplificando com channel.fromFilePairs:** Usamos `channel.fromFilePairs()` para emparelhar automaticamente arquivos relacionados e extrair metadados de IDs de arquivos pareados. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Usando operações de arquivo em processos:** Integramos operações de arquivo em processos Nextflow com o tratamento adequado de entradas, usando o bloco `output {}` para organizar saídas com base em metadados. @@ -2079,10 +2199,10 @@ Aplicar essas técnicas em seu próprio trabalho permitirá que você construa f ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], diff --git a/docs/tr/docs/hello_nextflow/01_hello_world.md b/docs/tr/docs/hello_nextflow/01_hello_world.md index a8dcad9988..762af7a156 100644 --- a/docs/tr/docs/hello_nextflow/01_hello_world.md +++ b/docs/tr/docs/hello_nextflow/01_hello_world.md @@ -215,9 +215,9 @@ nextflow run hello-world.nf ??? success "Komut çıktısı" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [65/7be2fa] sayHello | 1 of 1 ✔ @@ -486,17 +486,23 @@ nextflow run hello-world.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [jovial_mayer] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [jovial_mayer] revision: 35bd3425e5 executor > local (1) [9f/48ef97] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: output.txt ``` -Terminal çıktısı tanıdık görünmeli. Dışarıdan hiçbir şey değişmedi. +Terminal çıktısı artık yayınlanan çıktıları ve yazıldıkları dizini listeleyen bir `Outputs:` özeti ile sona erer. -Ancak dosya gezgininizi kontrol edin: bu sefer Nextflow `results/` adında yeni bir dizin oluşturdu. +Dosya gezgininizi kontrol edin: bu sefer Nextflow `results/` adında yeni bir dizin de oluşturdu. ??? abstract "Dizin içeriği" @@ -574,12 +580,18 @@ nextflow run hello-world.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [8c/79499c] process > sayHello [100%] 1 of 1 ✔ + [8c/79499c] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Bu sefer sonuç belirtilen alt dizine yazılır. @@ -653,12 +665,18 @@ nextflow run hello-world.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_shaw] DSL2 - revision: 757723adc1 + Launching `hello-world.nf` [tiny_shaw] revision: 757723adc1 executor > local (1) - [df/521638] process > sayHello [100%] 1 of 1 ✔ + [df/521638] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Bu sefer, sonuçlara bakarsanız, dosya yalnızca bir sembolik bağlantı yerine düzgün bir kopyadır. @@ -767,19 +785,19 @@ Süreç bloğunda aşağıdaki kod değişikliğini yapın: === "Sonra" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo '${greeting}' > output.txt - """ + script: + """ + echo '${greeting}' > output.txt + """ ``` === "Önce" ```groovy title="hello-world.nf" linenums="14" hl_lines="3" - script: - """ - echo 'Hello World!' > output.txt - """ + script: + """ + echo 'Hello World!' > output.txt + """ ``` `$` simgesi ve süslü parantezler (`{ }`) Nextflow'a bunun gerçek girdi değeriyle değiştirilmesi gereken (=enterpolasyon) bir değişken adı olduğunu söyler. @@ -811,15 +829,15 @@ Prensipte bunu herhangi bir yere yazabiliriz; ancak bunu `sayHello()` süreç ç === "Sonra" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // bir selamlama yayınla - sayHello(params.input) + // bir selamlama yayınla + sayHello(params.input) ``` === "Önce" ```groovy title="hello-world.nf" linenums="23" hl_lines="2" - // bir selamlama yayınla - sayHello() + // bir selamlama yayınla + sayHello() ``` Bu, Nextflow'a `sayHello` sürecini `--input` parametresi aracılığıyla sağlanan değer üzerinde çalıştırmasını söyler. @@ -837,12 +855,18 @@ nextflow run hello-world.nf --input 'Bonjour le monde!' ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elated_lavoisier] DSL2 - revision: 7c031b42ea + Launching `hello-world.nf` [elated_lavoisier] revision: 7c031b42ea executor > local (1) [4b/654319] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Tüm bu düzenlemeleri doğru yaptıysanız, başka bir başarılı yürütme elde etmelisiniz. @@ -906,12 +930,18 @@ nextflow run hello-world.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [determined_edison] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [determined_edison] revision: 3539118582 executor > local (1) [72/394147] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` ??? question "İşe yaramadıysa" @@ -936,7 +966,8 @@ nextflow run hello-world.nf Bu kursun başında bahsedilmişti, ama belki kaçırmışsınızdır. [Nextflow sürümleri](../info/nxf_versions.md) yardım materyaline bakın. - Kısacası, Nextflow `25.10` kullanıyorsanız v2 dil ayrıştırıcısını etkinleştirmeniz gerekir: + v2 ayrıştırıcısı Nextflow 26.04 ve sonrasında varsayılan olarak gelir; bu nedenle bu sorunu yalnızca daha eski sürümlerde göreceksiniz. + 26.04 öncesi bir sürümde v2 dil ayrıştırıcısını etkinleştirmeniz gerekir: ```bash export NXF_SYNTAX_PARSER=v2 @@ -965,12 +996,18 @@ nextflow run hello-world.nf --input 'Konnichiwa!' ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [elegant_faraday] DSL2 - revision: 3539118582 + Launching `hello-world.nf` [elegant_faraday] revision: 3539118582 executor > local (1) [6f/a12a91] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Bir kez daha, sonuçlar dizininizde karşılık gelen güncellenmiş çıktıyı bulmalısınız. @@ -1020,17 +1057,23 @@ Bunu yapmanın iki önemli avantajı vardır: Kullanmak için komutunuza `-resume` eklemeniz ve çalıştırmanız yeterlidir: ```bash -nextflow run hello-world.nf -resume +nextflow run hello-world.nf --input 'Konnichiwa!' -resume ``` ??? success "Komut çıktısı" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [golden_cantor] DSL2 - revision: 35bd3425e5 + Launching `hello-world.nf` [golden_cantor] revision: 35bd3425e5 [62/49a1f8] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_world/output.txt ``` Konsol çıktısı tanıdık görünmeli, ancak daha öncesine kıyasla biraz farklı bir şey var. diff --git a/docs/tr/docs/hello_nextflow/02_hello_channels.md b/docs/tr/docs/hello_nextflow/02_hello_channels.md index 7f115cefa0..16c85db856 100644 --- a/docs/tr/docs/hello_nextflow/02_hello_channels.md +++ b/docs/tr/docs/hello_nextflow/02_hello_channels.md @@ -52,12 +52,18 @@ nextflow run hello-channels.nf --input 'Hello Channels!' ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [wise_jennings] DSL2 - revision: b24f4902d6 + Launching `hello-channels.nf` [wise_jennings] revision: b24f4902d6 executor > local (1) - [6f/824bc1] process > sayHello [100%] 1 of 1 ✔ + [6f/824bc1] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: hello_channels/output.txt ``` Daha önce olduğu gibi, çıktı dosyasını `output.txt` adıyla `results/hello_channels` dizininde bulacaksınız (yukarıda gösterilen iş akışı betiğinin `output` bloğunda belirtildiği gibi). @@ -196,12 +202,19 @@ nextflow run hello-channels.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [fabulous_crick] DSL2 - revision: 23e20f76e8 + Launching `hello-channels.nf` [fabulous_crick] revision: 23e20f76e8 executor > local (1) - [c0/4f1872] process > sayHello (1) [100%] 1 of 1 ✔ + [c0/4f1872] sayHello (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Her iki düzenlemeyi de doğru yaptıysanız, başarılı bir yürütme elde etmelisiniz. @@ -271,13 +284,20 @@ nextflow run hello-channels.nf ??? success "Komut çıktısı" ```console hl_lines="7" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [scruffy_shaw] DSL2 - revision: 2ede41e14a + Launching `hello-channels.nf` [scruffy_shaw] revision: 2ede41e14a executor > local (1) - [ef/f7e40a] sayHello (1) [100%] 1 of 1 ✔ + [ef/f7e40a] sayHello (1) | 1 of 1 ✔ Hello Channels! + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt ``` Gördüğünüz gibi, bu kanal içeriklerini konsola çıktı olarak verir. @@ -337,15 +357,24 @@ nextflow run hello-channels.nf ??? success "Komut çıktısı" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [amazing_crick] DSL2 - revision: 59a9a5888a + Launching `hello-channels.nf` [amazing_crick] revision: 59a9a5888a executor > local (3) - [f4/c9962c] process > sayHello (1) [100%] 3 of 3 ✔ + [f4/c9962c] sayHello (1) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Kesinlikle sorunsuz çalışmış görünüyor. @@ -420,14 +449,23 @@ nextflow run hello-channels.nf -ansi-log false ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 - Launching `hello-channels.nf` [desperate_monod] DSL2 - revision: 59a9a5888a + N E X T F L O W ~ version 26.04.4 + Launching `hello-channels.nf` [desperate_monod] - revision: 59a9a5888a Hello Bonjour Hola [23/871c7e] Submitted process > sayHello (2) [7f/21e2c2] Submitted process > sayHello (1) [f4/ea10a6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/output.txt + - hello_channels/output.txt + - hello_channels/output.txt ``` Bu sefer çıktıda listelenen üç süreç çalışmasını ve bunlarla ilişkili work alt dizinlerini görüyoruz. @@ -581,15 +619,24 @@ nextflow run hello-channels.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sharp_minsky] DSL2 - revision: 16a291febe + Launching `hello-channels.nf` [sharp_minsky] revision: 16a291febe executor > local (3) - [e8/33ee64] sayHello (2) [100%] 3 of 3 ✔ + [e8/33ee64] sayHello (2) | 3 of 3 ✔ Hello Bonjour Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Özet görünümüne geri döndüğümüzde, çıktı tekrar bir satırda özetleniyor. @@ -605,8 +652,6 @@ Tüm çıktı selamlamalarının orada olup olmadığını görmek için `result └── output.txt ``` -Evet! Ve her birinin beklenen içerikleri var. - ??? abstract "Dosya içeriği" ```console title="Bonjour-output.txt" @@ -761,9 +806,9 @@ nextflow run hello-channels.nf ??? failure "Komut çıktısı" ```console hl_lines="7 11 16" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [friendly_koch] DSL2 - revision: 97256837a7 + Launching `hello-channels.nf` [friendly_koch] revision: 97256837a7 executor > local (1) [a8/1f6ead] sayHello (1) | 0 of 1 @@ -940,16 +985,25 @@ nextflow run hello-channels.nf ??? success "Komut çıktısı" ```console hl_lines="7-10" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [sleepy_gutenberg] DSL2 - revision: 1db4f760ee + Launching `hello-channels.nf` [sleepy_gutenberg] revision: 1db4f760ee executor > local (3) - [b1/6a1e15] sayHello (2) [100%] 3 of 3 ✔ + [b1/6a1e15] sayHello (2) | 3 of 3 ✔ Before flatten: [Hello, Bonjour, Hola] After flatten: Hello After flatten: Bonjour After flatten: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Bonjour-output.txt + - hello_channels/Hola-output.txt + - hello_channels/Hello-output.txt ``` Bu sefer çalışıyor VE `flatten()` operatörünü çalıştırmadan önce ve sonra kanal içeriklerinin nasıl göründüğüne dair ek bilgi veriyor. @@ -1023,11 +1077,13 @@ Parametre tanımlamasında aşağıdaki düzenlemeyi yapın: === "Önce" - ```groovy title="hello-channels.nf" linenums="20" hl_lines="4" + ```groovy title="hello-channels.nf" linenums="20" hl_lines="5" /* * Pipeline parametreleri */ - input: String = 'Hola mundo!' + params { + input: String = 'Hola mundo!' + } ``` Bu, dosyanın iş akışı koduyla aynı konumda olduğunu varsayar. @@ -1094,9 +1150,9 @@ nextflow run hello-channels.nf ??? failure "Komut çıktısı" ```console hl_lines="5 6 9 15" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [peaceful_poisson] DSL2 - revision: a286c08ad5 + Launching `hello-channels.nf` [peaceful_poisson] revision: a286c08ad5 [- ] sayHello [ 0%] 0 of 1 Before flatten: /workspaces/training/hello-nextflow/data/greetings.csv @@ -1197,12 +1253,12 @@ nextflow run hello-channels.nf ??? failure "Komut çıktısı" ```console hl_lines="7-11 14 19" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [insane_fermat] DSL2 - revision: 8e62fcbeb1 + Launching `hello-channels.nf` [insane_fermat] revision: 8e62fcbeb1 executor > local (3) - [24/76da2f] sayHello (2) [ 0%] 0 of 3 ✘ + [24/76da2f] sayHello (2) | 0 of 3 ✘ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1317,12 +1373,12 @@ nextflow run hello-channels.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-channels.nf` [focused_volhard] DSL2 - revision: de435e45be + Launching `hello-channels.nf` [focused_volhard] revision: de435e45be executor > local (3) - [54/6eebe3] sayHello (3) [100%] 3 of 3 ✔ + [54/6eebe3] sayHello (3) | 3 of 3 ✔ Before splitCsv: /workspaces/training/hello-nextflow/data/greetings.csv After splitCsv: [Hello, English, 123] After splitCsv: [Bonjour, French, 456] @@ -1330,6 +1386,15 @@ nextflow run hello-channels.nf After map: Hello After map: Bonjour After map: Hola + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_channels/Hola-output.txt + - hello_channels/Bonjour-output.txt + - hello_channels/Hello-output.txt ``` Bu sefer hatasız çalışmalı. diff --git a/docs/tr/docs/hello_nextflow/03_hello_workflow.md b/docs/tr/docs/hello_nextflow/03_hello_workflow.md index 576cd192af..8b3995520b 100644 --- a/docs/tr/docs/hello_nextflow/03_hello_workflow.md +++ b/docs/tr/docs/hello_nextflow/03_hello_workflow.md @@ -67,12 +67,21 @@ nextflow run hello-workflow.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [admiring_lamarr] DSL2 - revision: 4d4053520d + Launching `hello-workflow.nf` [admiring_lamarr] revision: 4d4053520d executor > local (3) - [b1/5826b5] process > sayHello (2) [100%] 3 of 3 ✔ + [b1/5826b5] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt ``` Daha önce olduğu gibi, çıktı dosyalarını `output` bloğunda belirtilen konumda bulacaksınız. @@ -311,13 +320,26 @@ nextflow run hello-workflow.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [high_cantor] DSL2 - revision: d746983511 + Launching `hello-workflow.nf` [high_cantor] revision: d746983511 executor > local (3) - [ab/816321] process > sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [e0/ecf81b] process > convertToUpper (3) [100%] 3 of 3 ✔ + [ab/816321] sayHello (3) | 3 of 3, cached: 3 ✔ + [e0/ecf81b] convertToUpper (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + - hello_workflow/Bonjour-output.txt + uppercased: + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + - hello_workflow/UPPER-Bonjour-output.txt ``` Konsol çıktısında, az önce eklediğimiz yeni sürece karşılık gelen fazladan bir satır var. @@ -608,9 +630,9 @@ nextflow run hello-workflow.nf -resume ??? success "Komut çıktısı" ```console hl_lines="8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [mad_gilbert] DSL2 - revision: 6acfd5e28d + Launching `hello-workflow.nf` [mad_gilbert] revision: 6acfd5e28d executor > local (3) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ @@ -618,6 +640,8 @@ nextflow run hello-workflow.nf -resume [47/50fe4a] collectGreetings (1) | 3 of 3 ✔ ``` + Terminal çıktısı artık bir `Outputs:` özet bloğuyla da sona ermektedir. Süreç durum satırlarına odaklanmak için burada bunu atladık. + Üçüncü adım dahil başarıyla çalışıyor. Ancak, son satırdaki `collectGreetings()` için çağrı sayısına bakın. @@ -627,8 +651,8 @@ Yalnızca bir tane bekliyorduk, ama üç tane var. ??? abstract "Dosya içeriği" - ```console title="results/COLLECTED-output.txt" - Hola + ```console title="results/hello_workflow/COLLECTED-output.txt" + HOLA ``` Hay aksi. Toplama adımı her selamlama için ayrı ayrı çalıştırıldı, bu istediğimiz şey DEĞİLDİ. @@ -707,9 +731,9 @@ nextflow run hello-workflow.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `hello-workflow.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -738,7 +762,7 @@ Son olarak, her şeyin doğru çalıştığından emin olmak için çıktı dosy ??? abstract "Dosya içeriği" - ```console title="results/COLLECTED-output.txt" + ```console title="results/hello_workflow/COLLECTED-output.txt" BONJOUR HELLO HOLA @@ -940,21 +964,35 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [confident_rutherford] DSL2 - revision: bc58af409c + Launching `hello-workflow.nf` [confident_rutherford] revision: bc58af409c executor > local (1) [79/33b2f0] sayHello (2) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [b5/f19efe] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt ``` Başarıyla çalışıyor ve istenen çıktıyı üretiyor: ??? abstract "Dosya içeriği" - ```console title="results/COLLECTED-trio-output.txt" + ```console title="results/hello_workflow/COLLECTED-trio-output.txt" HELLO BONJOUR HOLA @@ -1158,14 +1196,29 @@ nextflow run hello-workflow.nf -resume --batch trio ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-workflow.nf` [ecstatic_wilson] DSL2 - revision: c80285f8c8 + Launching `hello-workflow.nf` [ecstatic_wilson] revision: c80285f8c8 executor > local (1) - [c5/4c6ca9] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [0e/6cbc59] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [02/61ead2] collectGreetings [100%] 1 of 1 ✔ + [c5/4c6ca9] sayHello (3) | 3 of 3, cached: 3 ✔ + [0e/6cbc59] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [02/61ead2] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_workflow/Bonjour-output.txt + - hello_workflow/Hello-output.txt + - hello_workflow/Hola-output.txt + uppercased: + - hello_workflow/UPPER-Bonjour-output.txt + - hello_workflow/UPPER-Hola-output.txt + - hello_workflow/UPPER-Hello-output.txt + collected: hello_workflow/COLLECTED-trio-output.txt + batch_report: hello_workflow/trio-report.txt ``` `results/hello_workflow/` dizinine bakarsanız, yeni rapor dosyasını, `trio-report.txt`'yi bulacaksınız. @@ -1275,5 +1328,5 @@ Bir sürece birden fazla girdi sağlarken ne doğru olmalıdır? - [x] Girdilerin sırası girdi bloğunda tanımlanan sırayla eşleşmelidir - [ ] Aynı anda yalnızca iki girdi sağlanabilir -Daha fazla bilgi: [3. Bir sürece ek parametreler iletin](#3-pass-more-than-one-input-to-a-process) +Daha fazla bilgi: [3. Bir sürece ek parametreler iletin](#3-pass-additional-parameters-to-a-process) diff --git a/docs/tr/docs/hello_nextflow/04_hello_modules.md b/docs/tr/docs/hello_nextflow/04_hello_modules.md index 13aeb70ed2..02a8172721 100644 --- a/docs/tr/docs/hello_nextflow/04_hello_modules.md +++ b/docs/tr/docs/hello_nextflow/04_hello_modules.md @@ -69,14 +69,29 @@ nextflow run hello-modules.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [hopeful_avogadro] DSL2 - revision: b09af1237d + Launching `hello-modules.nf` [hopeful_avogadro] revision: b09af1237d executor > local (7) - [0f/8795c9] sayHello (3) [100%] 3 of 3 ✔ - [6a/eb2510] convertToUpper (3) [100%] 3 of 3 ✔ - [af/479117] collectGreetings [100%] 1 of 1 ✔ + [0f/8795c9] sayHello (3) | 3 of 3 ✔ + [6a/eb2510] convertToUpper (3) | 3 of 3 ✔ + [af/479117] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_modules/Hola-output.txt + - hello_modules/Bonjour-output.txt + - hello_modules/Hello-output.txt + uppercased: + - hello_modules/UPPER-Hola-output.txt + - hello_modules/UPPER-Bonjour-output.txt + - hello_modules/UPPER-Hello-output.txt + collected: hello_modules/COLLECTED-batch-output.txt + batch_report: hello_modules/batch-report.txt ``` Daha önce olduğu gibi, çıktı dosyalarını `output` bloğunda belirtilen dizinde bulacaksınız (burada, `results/hello_modules/`). @@ -172,7 +187,7 @@ Bunu `params` bloğunun üstüne ekleyelim ve uygun şekilde dolduralım. * Pipeline parametreleri */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -184,7 +199,7 @@ Bunu `params` bloğunun üstüne ekleyelim ve uygun şekilde dolduralım. * Pipeline parametreleri */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -202,9 +217,9 @@ nextflow run hello-modules.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [romantic_poisson] DSL2 - revision: 96edfa9ad3 + Launching `hello-modules.nf` [romantic_poisson] revision: 96edfa9ad3 [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ @@ -278,7 +293,7 @@ Include tanımını `params` bloğunun üstüne ekleyin ve uygun şekilde doldur * Pipeline parametreleri */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -293,7 +308,7 @@ Include tanımını `params` bloğunun üstüne ekleyin ve uygun şekilde doldur * Pipeline parametreleri */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -311,9 +326,9 @@ nextflow run hello-modules.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [nauseous_heisenberg] DSL2 - revision: a04a9f2da0 + Launching `hello-modules.nf` [nauseous_heisenberg] revision: a04a9f2da0 [c9/763d42] sayHello (3) | 3 of 3, cached: 3 ✔ [60/bc6831] convertToUpper (3) | 3 of 3, cached: 3 ✔ @@ -381,7 +396,7 @@ Include tanımını `params` bloğunun üstüne ekleyin ve uygun şekilde doldur * Pipeline parametreleri */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -397,7 +412,7 @@ Include tanımını `params` bloğunun üstüne ekleyin ve uygun şekilde doldur * Pipeline parametreleri */ params { - greeting: Path = 'data/greetings.csv' + input: Path = 'data/greetings.csv' batch: String = 'batch' } ``` @@ -415,9 +430,9 @@ nextflow run hello-modules.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-modules.nf` [friendly_coulomb] DSL2 - revision: 7aa2b9bc0f + Launching `hello-modules.nf` [friendly_coulomb] revision: 7aa2b9bc0f [f6/cc0107] sayHello (1) | 3 of 3, cached: 3 ✔ [3c/4058ba] convertToUpper (2) | 3 of 3, cached: 3 ✔ diff --git a/docs/tr/docs/hello_nextflow/05_hello_containers.md b/docs/tr/docs/hello_nextflow/05_hello_containers.md index 290484afda..abbfe18541 100644 --- a/docs/tr/docs/hello_nextflow/05_hello_containers.md +++ b/docs/tr/docs/hello_nextflow/05_hello_containers.md @@ -72,15 +72,29 @@ nextflow run hello-containers.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-containers.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [5a/ec1fa1] sayHello (2) [100%] 3 of 3 ✔ - [30/32b5b8] convertToUpper (3) [100%] 3 of 3 ✔ - [d3/be01bc] collectGreetings [100%] 1 of 1 ✔ + executor > local (7) + [5a/ec1fa1] sayHello (2) | 3 of 3 ✔ + [30/32b5b8] convertToUpper (3) | 3 of 3 ✔ + [d3/be01bc] collectGreetings | 1 of 1 ✔ + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/Hola-output.txt + - hello_containers/Bonjour-output.txt + - hello_containers/Hello-output.txt + uppercased: + - hello_containers/UPPER-Bonjour-output.txt + - hello_containers/UPPER-Hola-output.txt + - hello_containers/UPPER-Hello-output.txt + collected: hello_containers/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt ``` Daha önce olduğu gibi, çıktı dosyalarını `output` bloğunda belirtilen dizinde bulacaksınız (`results/hello_containers/`). @@ -259,22 +273,22 @@ Artık konteynerin içinde olduğunuza göre, `cowpy` komutunu doğrudan çalı Örneğin, araç dokümantasyonu karakteri ('cowacter') `-c` ile değiştirebileceğimizi söylüyor. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Komut çıktısı" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -674,15 +688,15 @@ nextflow run hello-containers.nf -resume ??? failure "Komut çıktısı (netlik için düzenlendi)" ```console hl_lines="10 13 20-21 26-27" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [lonely_woese] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [lonely_woese] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [9b/02e776] cowpy [ 0%] 0 of 1 ✘ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [9b/02e776] cowpy | 0 of 1 ✘ ERROR ~ Error executing process > 'cowpy' Caused by: @@ -811,15 +825,31 @@ nextflow run hello-containers.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-containers.nf` [drunk_perlman] DSL2 - revision: abf1dccf7f + Launching `hello-containers.nf` [drunk_perlman] revision: abf1dccf7f executor > local (1) - [c9/f5c686] sayHello (3) [100%] 3 of 3, cached: 3 ✔ - [ef/3135a8] convertToUpper (3) [100%] 3 of 3, cached: 3 ✔ - [7f/f435e3] collectGreetings [100%] 1 of 1, cached: 1 ✔ - [98/656c6c] cowpy [100%] 1 of 1 ✔ + [c9/f5c686] sayHello (3) | 3 of 3, cached: 3 ✔ + [ef/3135a8] convertToUpper (3) | 3 of 3, cached: 3 ✔ + [7f/f435e3] collectGreetings | 1 of 1, cached: 1 ✔ + [98/656c6c] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_containers/intermediates/Bonjour-output.txt + - hello_containers/intermediates/Hola-output.txt + - hello_containers/intermediates/Hello-output.txt + uppercased: + - hello_containers/intermediates/UPPER-Hola-output.txt + - hello_containers/intermediates/UPPER-Bonjour-output.txt + - hello_containers/intermediates/UPPER-Hello-output.txt + collected: hello_containers/intermediates/COLLECTED-batch-output.txt + batch_report: hello_containers/batch-report.txt + cowpy_art: hello_containers/cowpy-COLLECTED-batch-output.txt ``` Bu sefer gerçekten çalışıyor! diff --git a/docs/tr/docs/hello_nextflow/06_hello_config.md b/docs/tr/docs/hello_nextflow/06_hello_config.md index fa23c5a50a..83e165adc6 100644 --- a/docs/tr/docs/hello_nextflow/06_hello_config.md +++ b/docs/tr/docs/hello_nextflow/06_hello_config.md @@ -77,15 +77,31 @@ nextflow run hello-config.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [nice_escher] DSL2 - revision: d5dfdc9872 + Launching `hello-config.nf` [nice_escher] revision: d5dfdc9872 - executor > local (7) - [6a/bc46a6] sayHello (2) [100%] 3 of 3 ✔ - [33/67bc48] convertToUpper (3) [100%] 3 of 3 ✔ - [b5/de03ba] collectGreetings [100%] 1 of 1 ✔ + executor > local (8) + [6a/bc46a6] sayHello (2) | 3 of 3 ✔ + [33/67bc48] convertToUpper (3) | 3 of 3 ✔ + [b5/de03ba] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Daha önce olduğu gibi, çıktı dosyalarını `output` bloğunda belirtilen dizinde (`results/hello_config/`) bulacaksınız. @@ -237,15 +253,31 @@ nextflow run hello-config.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Bu hala daha önce olduğu gibi aynı çıktıyı üretir. @@ -333,15 +365,31 @@ nextflow run ../hello-config.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../hello-config.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../hello-config.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/tux-run/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-experiment-output.txt + batch_report: hello_config/experiment-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-experiment-output.txt ``` Bu, `tux-run/work/` ve `tux-run/results/` dahil olmak üzere `tux-run/` altında yeni bir dizin seti oluşturacaktır. @@ -419,15 +467,31 @@ nextflow run hello-config.nf -params-file test-params.yaml ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `hello-config.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/results + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Bonjour-output.txt + - hello_config/intermediates/Hello-output.txt + uppercased: + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + - hello_config/intermediates/UPPER-Bonjour-output.txt + collected: hello_config/intermediates/COLLECTED-yaml-output.txt + batch_report: hello_config/yaml-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-yaml-output.txt ``` Son çıktı dosyası, selamlamaları söyleyen stegosaurus karakterini içermelidir. @@ -500,15 +564,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-cli/ ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [prickly_kay] DSL2 - revision: 32ecc4fba2 + Launching `hello-config.nf` [prickly_kay] revision: 32ecc4fba2 executor > local (8) - [9f/332636] sayHello (1) [100%] 3 of 3 ✔ - [03/a55991] convertToUpper (3) [100%] 3 of 3 ✔ - [e5/ab7893] collectGreetings [100%] 1 of 1 ✔ - [a8/97338e] cowpy [100%] 1 of 1 ✔ + [9f/332636] sayHello (1) | 3 of 3 ✔ + [03/a55991] convertToUpper (3) | 3 of 3 ✔ + [e5/ab7893] collectGreetings | 1 of 1 ✔ + [a8/97338e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-cli + + first_output: + - hello_config/intermediates/Hola-output.txt + - hello_config/intermediates/Hello-output.txt + - hello_config/intermediates/Bonjour-output.txt + uppercased: + - hello_config/intermediates/UPPER-Bonjour-output.txt + - hello_config/intermediates/UPPER-Hello-output.txt + - hello_config/intermediates/UPPER-Hola-output.txt + collected: hello_config/intermediates/COLLECTED-batch-output.txt + batch_report: hello_config/batch-report.txt + cowpy_art: hello_config/cowpy-COLLECTED-batch-output.txt ``` Bu, çıktıları `results/` yerine `custom-outdir-cli/` dizinine yayınlar: @@ -832,15 +912,31 @@ nextflow run hello-config.nf -output-dir custom-outdir-config-2 --batch rep2 ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [mad_curry] DSL2 - revision: 668a98ccb9 + Launching `hello-config.nf` [mad_curry] revision: 668a98ccb9 executor > local (8) - [9e/6095e0] sayHello (1) [100%] 3 of 3 ✔ - [05/454d52] convertToUpper (3) [100%] 3 of 3 ✔ - [ed/e3ddfb] collectGreetings [100%] 1 of 1 ✔ - [39/5e063a] cowpy [100%] 1 of 1 ✔ + [9e/6095e0] sayHello (1) | 3 of 3 ✔ + [05/454d52] convertToUpper (3) | 3 of 3 ✔ + [ed/e3ddfb] collectGreetings | 1 of 1 ✔ + [39/5e063a] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config-2 + + first_output: + - rep2/intermediates/sayHello/Bonjour-output.txt + - rep2/intermediates/sayHello/Hello-output.txt + - rep2/intermediates/sayHello/Hola-output.txt + uppercased: + - rep2/intermediates/convertToUpper/UPPER-Hello-output.txt + - rep2/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - rep2/intermediates/convertToUpper/UPPER-Hola-output.txt + collected: rep2/intermediates/collectGreetings/COLLECTED-rep2-output.txt + batch_report: rep2/collectGreetings/rep2-report.txt + cowpy_art: rep2/cowpy/cowpy-COLLECTED-rep2-output.txt ``` Bu, çıktıları belirtilen temel yol _ve_ batch adı alt dizini _ve_ sürece göre gruplandırılmış sonuçlarla `custom-outdir-config-2/rep2/` dizinine yayınlar: @@ -962,15 +1058,31 @@ nextflow run hello-config.nf -output-dir config-output-mode ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [small_stone] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [small_stone] revision: 024d6361b5 executor > local (8) - [e8/a0e93e] sayHello (1) [100%] 3 of 3 ✔ - [14/176c9d] convertToUpper (3) [100%] 3 of 3 ✔ - [23/d667ca] collectGreetings [100%] 1 of 1 ✔ - [e6/1dc80e] cowpy [100%] 1 of 1 ✔ + [e8/a0e93e] sayHello (1) | 3 of 3 ✔ + [14/176c9d] convertToUpper (3) | 3 of 3 ✔ + [23/d667ca] collectGreetings | 1 of 1 ✔ + [e6/1dc80e] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/config-output-mode + + first_output: + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Bu, çıktıları `config-output-mode/` dizinine yayınlar ve hepsi hala sembolik bağlantılar değil, uygun kopyalardır. @@ -1094,15 +1206,32 @@ nextflow run hello-config.nf --batch conda ??? success "Komut çıktısı" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [friendly_lamport] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [friendly_lamport] revision: 024d6361b5 executor > local (8) - [e8/91c116] sayHello (2) [100%] 3 of 3 ✔ - [fe/6a70ce] convertToUpper (3) [100%] 3 of 3 ✔ - [99/7cc493] collectGreetings [100%] 1 of 1 ✔ - [3c/09fb59] cowpy [100%] 1 of 1 ✔ + [e8/91c116] sayHello (2) | 3 of 3 ✔ + [fe/6a70ce] convertToUpper (3) | 3 of 3 ✔ + [99/7cc493] collectGreetings | 1 of 1 ✔ + [3c/09fb59] cowpy | 1 of 1 ✔ + Creating env using conda: conda-forge::cowpy==1.1.5 [cache /workspaces/training/hello-nextflow/work/conda/env-898314d566668b6587ad714ae06b8520] + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - conda/intermediates/sayHello/Bonjour-output.txt + - conda/intermediates/sayHello/Hola-output.txt + - conda/intermediates/sayHello/Hello-output.txt + uppercased: + - conda/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - conda/intermediates/convertToUpper/UPPER-Hola-output.txt + - conda/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: conda/intermediates/collectGreetings/COLLECTED-conda-output.txt + batch_report: conda/collectGreetings/conda-report.txt + cowpy_art: conda/cowpy/cowpy-COLLECTED-conda-output.txt ``` Bu sorunsuz çalışmalı ve `custom-outdir-config/conda` altında daha önce olduğu gibi aynı çıktıları üretmelidir. @@ -1488,15 +1617,31 @@ nextflow run hello-config.nf -profile my_laptop ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [hungry_sanger] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [hungry_sanger] revision: 024d6361b5 executor > local (8) - [b0/fb2ec9] sayHello (3) [100%] 3 of 3 ✔ - [4a/e039f0] convertToUpper (3) [100%] 3 of 3 ✔ - [6f/408fa9] collectGreetings [100%] 1 of 1 ✔ - [f1/fd6520] cowpy [100%] 1 of 1 ✔ + [b0/fb2ec9] sayHello (3) | 3 of 3 ✔ + [4a/e039f0] convertToUpper (3) | 3 of 3 ✔ + [6f/408fa9] collectGreetings | 1 of 1 ✔ + [f1/fd6520] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - batch/intermediates/sayHello/Bonjour-output.txt + - batch/intermediates/sayHello/Hola-output.txt + - batch/intermediates/sayHello/Hello-output.txt + uppercased: + - batch/intermediates/convertToUpper/UPPER-Bonjour-output.txt + - batch/intermediates/convertToUpper/UPPER-Hola-output.txt + - batch/intermediates/convertToUpper/UPPER-Hello-output.txt + collected: batch/intermediates/collectGreetings/COLLECTED-batch-output.txt + batch_report: batch/collectGreetings/batch-report.txt + cowpy_art: batch/cowpy/cowpy-COLLECTED-batch-output.txt ``` Gördüğünüz gibi, bu çalışma zamanında yapılandırmalar arasında çok rahat bir şekilde geçiş yapmamızı sağlar. @@ -1572,15 +1717,31 @@ nextflow run hello-config.nf -profile my_laptop,test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `hello-config.nf` [modest_becquerel] DSL2 - revision: 024d6361b5 + Launching `hello-config.nf` [modest_becquerel] revision: 024d6361b5 executor > local (8) - [4c/fe2580] sayHello (1) [100%] 3 of 3 ✔ - [fd/7d9017] convertToUpper (3) [100%] 3 of 3 ✔ - [13/1523bd] collectGreetings [100%] 1 of 1 ✔ - [06/a1ee14] cowpy [100%] 1 of 1 ✔ + [4c/fe2580] sayHello (1) | 3 of 3 ✔ + [fd/7d9017] convertToUpper (3) | 3 of 3 ✔ + [13/1523bd] collectGreetings | 1 of 1 ✔ + [06/a1ee14] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/hello-nextflow/custom-outdir-config + + first_output: + - test/intermediates/sayHello/Hello-output.txt + - test/intermediates/sayHello/Hola-output.txt + - test/intermediates/sayHello/Bonjour-output.txt + uppercased: + - test/intermediates/convertToUpper/UPPER-Hola-output.txt + - test/intermediates/convertToUpper/UPPER-Hello-output.txt + - test/intermediates/convertToUpper/UPPER-Bonjour-output.txt + collected: test/intermediates/collectGreetings/COLLECTED-test-output.txt + batch_report: test/collectGreetings/test-report.txt + cowpy_art: test/cowpy/cowpy-COLLECTED-test-output.txt ``` Bu, mümkün olduğunda Docker kullanacak ve çıktıları `custom-outdir-config/test` altında üretecek; bu sefer karakter komedi ikilisi `dragonandcow`. diff --git a/docs/tr/docs/hello_nf-core/00_orientation.md b/docs/tr/docs/hello_nf-core/00_orientation.md index fabe448b62..68bfa8010f 100644 --- a/docs/tr/docs/hello_nf-core/00_orientation.md +++ b/docs/tr/docs/hello_nf-core/00_orientation.md @@ -22,25 +22,20 @@ Bu kursu kendi başınıza takip ediyorsanız, lütfen daha fazla ayrıntı içi ### Sürüm gereksinimleri -Bu eğitim, **v2 sözdizimi ayrıştırıcısı DEVRE DIŞI** olan **Nextflow 25.10.2** veya sonrası için tasarlanmıştır. +Bu eğitim, varsayılan olarak Nextflow 26.04 sürümünden itibaren etkin olan **v2 sözdizimi ayrıştırıcısıyla** birlikte **Nextflow 25.10.2 veya sonrası** ile çalışmaktadır. +Eğitim ortamımızda herhangi bir şey yapmanıza gerek yoktur: v2 ayrıştırıcısıyla Nextflow 26.04.4 çalıştırılmaktadır. Yerel veya özel bir ortam kullanıyorsanız [sürüm notlarına](../info/nxf_versions.md) bakın. -#### Eğitim ortamımızı kullanıyorsanız: - -Daha ileriye gitmeden önce aşağıdaki komutu çalıştırmanız GEREKMEKTEDİR: - -```bash -export NXF_SYNTAX_PARSER=v1 -``` - -#### Yerel veya özel bir ortam kullanıyorsanız: - -Lütfen [burada](../info/nxf_versions.md) belgelenen doğru ayarları kullandığınızdan emin olun. - -Eğitim ayrıca **nf-core tools 3.5.2** gerektirir. +Eğitim ayrıca **nf-core tools 4.0.2** gerektirir. nf-core araçlarının farklı bir sürümünü kullanırsanız, takip etmekte zorluk yaşayabilirsiniz. Ortamınızda hangi sürümün yüklü olduğunu `nf-core --version` komutunu kullanarak kontrol edebilirsiniz. +!!! warning "v2 ayrıştırıcı uyumluluğu" + + Birçok nf-core pipeline'ı henüz v2 sözdizimi ayrıştırıcısını desteklememektedir. + Bu kursta kullanılanlar dışında bir nf-core pipeline'ı çalıştırır ve hatalarla karşılaşırsanız, `export NXF_SYNTAX_PARSER=v1` ayarını yaparak v1 ayrıştırıcısına geçmeniz gerekebilir. + Ayrıntılar için [sürüm notlarına](../info/nxf_versions.md) bakın. + ## Çalışmaya hazır olun Codespace'iniz çalışmaya başladığında, eğitime dalmadan önce yapmanız gereken iki şey vardır: bu özel kurs için çalışma dizininizi ayarlamak ve sağlanan materyallere göz atmak. @@ -82,7 +77,10 @@ tree . -L 2 ```console . + ├── custom.config ├── greetings.csv + ├── malformed_samplesheet.csv + ├── my_params.yml ├── original-hello │ ├── hello.nf │ ├── modules @@ -101,6 +99,12 @@ Beklenen komut çıktısını özlü bir şekilde dahil etmek için bunun gibi d - **`greetings.csv` dosyası**, test amaçlı kullandığımız bazı minimal sütunsal verileri içeren bir CSV'dir. +- **`custom.config` dosyası**, Bölüm 1'de süreç kaynak geçersiz kılmalarını ve `ext.args` kullanımını göstermek için kullanılan örnek bir Nextflow yapılandırma dosyasıdır. + +- **`malformed_samplesheet.csv` dosyası**, Bölüm 1'de girdi doğrulamasını göstermek amacıyla kasıtlı olarak bozulmuş bir örnek sayfasıdır. + +- **`my_params.yml` dosyası**, Bölüm 1'de bir pipeline'a boolean parametrelerin nasıl aktarılacağını göstermek için kullanılan örnek bir parametre dosyasıdır. + - **`original-hello` dizini**, Hello Nextflow eğitim serisinin tamamı boyunca çalışarak üretilen kaynak kodun bir kopyasını içerir (Docker etkinleştirilmiş olarak). - **`solutions` dizini**, kursun her adımından kaynaklanan tamamlanmış iş akışı betiklerini içerir. @@ -112,7 +116,7 @@ Başlamaya hazır olduğunuzu mu düşünüyorsunuz? - [ ] Bu kursun hedefini ve ön koşullarını anlıyorum - [ ] Ortamım çalışır durumda -- [ ] Sözdizimi ayrıştırıcısının **v1** olarak ayarlandığından emin oldum +- [ ] nf-core tools 4.0.2 kullandığımı doğruladım (`nf-core --version` ile kontrol edin) - [ ] Çalışma dizinini uygun şekilde ayarladım Tüm kutuları işaretleyebiliyorsanız, başlamaya hazırsınız. diff --git a/docs/tr/docs/hello_nf-core/01_run_demo.md b/docs/tr/docs/hello_nf-core/01_run_demo.md index acd206bc6d..9b3585046c 100644 --- a/docs/tr/docs/hello_nf-core/01_run_demo.md +++ b/docs/tr/docs/hello_nf-core/01_run_demo.md @@ -45,9 +45,10 @@ Yeni bir pipeline'ı kullanmayı düşündüğünüzde, ne yaptığını ve çal ![pipeline metro haritası](./img/nf-core-demo-subway-cropped.png) -1. Read QC (FASTQC) -2. Adapter and quality trimming (SEQTK_TRIM) -3. Present QC for raw reads (MULTIQC) +1. Read QC ([FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Adapter and quality trimming ([SEQTK_TRIM](https://github.com/lh3/seqtk)) +3. Present QC for raw reads ([MULTIQC](http://multiqc.info/)) +4. Generate a lighthearted text message from a cow ([COWPY](https://github.com/jeffbuttars/cowpy)) #### 1.1.2. Örnek komut satırı @@ -82,7 +83,7 @@ nextflow pull nf-core/demo ```console Checking nf-core/demo ... - downloaded from https://github.com/nf-core/demo.git - revision: 04060b4644 [master] + downloaded from https://github.com/nf-core/demo.git - revision: 32893afef8 [master] ``` Nextflow, pipeline kodunun bir `pull` işlemini yapar; yani tüm depoyu yerel diskinize indirir. @@ -106,40 +107,73 @@ nextflow list Birden fazla pipeline listelendiğinde nasıl göründüğünü görmek için birkaç pipeline daha indirmeyi deneyebilirsiniz. -#### 1.2.3. Pipeline'larınızı `$NXF_HOME/assets/` dizininde bulma +#### 1.2.3. Pipeline'ın indirildiği konumu bulma Dosyaların mevcut çalışma dizininizde olmadığını fark edeceksiniz. -Varsayılan olarak, Nextflow bunları `$NXF_HOME/assets` dizinine kaydeder. +Varsayılan olarak, Nextflow indirilen pipeline'ları `$NXF_HOME/assets` dizinine kaydeder. + +Belirli bir pipeline'ın nerede bulunduğunu öğrenmek için doğrudan Nextflow'a sorabilirsiniz: ```bash -tree -L 2 $NXF_HOME/assets/ +nextflow info nf-core/demo ``` -```console title="Directory contents" -/workspaces/.nextflow/assets/ -└── nf-core - └── demo +??? success "Komut çıktısı" -2 directories, 0 files -``` + ```console + project name: nf-core/demo + repository : https://github.com/nf-core/demo + local path : /workspaces/.nextflow/assets/.repos/nf-core/demo + main script : main.nf + description : An nf-core demo pipeline + revisions : + TEMPLATE + bumper + dev + fix-nxfversion + manually-merge-3_0_2 + > master (default) + nf-core-template-merge-2.13.2.dev0 + nf-core-template-merge-2.14.0 + nf-core-template-merge-2.14.1 + nf-core-template-merge-3.0.0 + nf-core-template-merge-3.0.1 + nf-core-template-merge-3.0.2 + nf-core-template-merge-3.1.0 + nf-core-template-merge-3.1.2 + nf-core-template-merge-3.2.0 + nf-core-template-merge-3.2.1 + nf-core-template-merge-3.3.1 + nf-core-template-merge-3.3.2 + nf-core-template-merge-4.0.0 + 1.0.0 [t] + 1.0.1 [t] + 1.0.2 [t] + 1.1.0 [t] + > 1.2.0 [t] + ``` -!!! note "Not" +!!! info "Bilgi" Eğitim ortamımızı kullanmıyorsanız, tam yol sisteminizde farklı olabilir. Nextflow, indirilen kaynak kodunu kasıtlı olarak erişimi doğrudan olmayan bir konumda tutar; bu pipeline'ların doğrudan etkileşimde bulunacağınız kod yerine daha çok kütüphaneler gibi kullanılması gerektiği ilkesine dayanır. +Arka planda Nextflow, indirilen her pipeline'ı `$NXF_HOME/assets/.repos/` dizininde bir git deposu olarak saklar ve her revizyonun kodunu `clones//` alt dizinine çıkarır. +`.repos` gizli bir dizin olduğundan, `tree -L 2 $NXF_HOME/assets/` komutu boş görünecektir. + #### 1.2.4. Kaynak koda kolay erişim için sembolik bağlantı oluşturma Koda ayrıntılı olarak bakmayacağız; ancak genel organizasyonun nasıl göründüğüne dair bir fikir edinmek için hızlıca göz atalım. -Pipeline kaynak koduna göz atmayı kolaylaştırmak için assets dizinine sembolik bir bağlantı oluşturun: +Pipeline kaynak koduna göz atmayı kolaylaştırmak için, pipeline'ın çıkarılmış kopyasına işaret eden bir sembolik bağlantı oluşturun: ```bash -ln -s $NXF_HOME/assets pipelines +mkdir -p pipelines/nf-core +ln -s "$(echo $NXF_HOME/assets/.repos/nf-core/demo/clones/*/)" pipelines/nf-core/demo ``` -Bu, `tree -L 2 pipelines` komutuyla kodu keşfetmenizi veya dosyaları doğrudan açmanızı sağlayan bir kısayol oluşturur. +Bu, `tree -L 2 pipelines/nf-core/demo` komutuyla kodu keşfetmenizi veya dosyaları doğrudan açmanızı sağlayan bir kısayol oluşturur. #### 1.2.5. Kod organizasyonuna genel bakış @@ -172,6 +206,8 @@ tree -L 1 pipelines/nf-core/demo ├── tests ├── tower.yml └── workflows + + 7 directories, 12 files ``` Orada çok şey oluyor; ancak bunların büyük çoğunluğu hakkında endişelenmenize gerek yok. @@ -211,7 +247,7 @@ Kolaylık sağlamak için, her nf-core pipeline'ı bir test profiliyle birlikte Bu, [nf-core/test-datasets](https://github.com/nf-core/test-datasets) deposunda barındırılan küçük bir test veri setini kullanarak pipeline'ın çalıştırılması için minimum yapılandırma ayarları kümesidir. Küçük ölçekte bir pipeline'ı hızlıca denemenin harika bir yoludur. -!!! note "Not" +!!! tip "İpucu" Nextflow'un yapılandırma profil sistemi, farklı konteyner motorları veya çalıştırma ortamları arasında kolayca geçiş yapmanızı sağlar. Daha fazla ayrıntı için [Hello Nextflow Bölüm 6: Yapılandırma](../hello_nextflow/06_hello_config.md) bölümüne bakın. @@ -220,10 +256,10 @@ Küçük ölçekte bir pipeline'ı hızlıca denemenin harika bir yoludur. Bir pipeline'ın test profilinin çalıştırmadan önce ne belirttiğini kontrol etmek iyi bir uygulamadır. `nf-core/demo` için `test` profili `conf/test.config` yapılandırma dosyasında bulunur. -`nextflow pull` ile indirilen pipeline kaynağının içinde yerel olarak bulabilirsiniz: +`nextflow pull` ile indirilen pipeline kaynağının içinde, 1.2.4. bölümünde oluşturulan `pipelines` sembolik bağlantısı aracılığıyla yerel olarak bulabilirsiniz: ```bash -code $NXF_HOME/assets/nf-core/demo/conf/test.config +code pipelines/nf-core/demo/conf/test.config ``` Bu dosyanın içeriği aşağıda gösterilmiştir: @@ -245,7 +281,7 @@ process { resourceLimits = [ cpus: 2, memory: '4.GB', - time: '1.h' + time: '1.h', ] } @@ -254,8 +290,7 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Girdi verileri - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' } ``` @@ -287,16 +322,16 @@ SAMPLE3_SE,https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/il ``` Buna samplesheet denir ve nf-core pipeline'larına en yaygın girdi biçimidir. +Veri formatlarına ve türlerine aşina değilseniz endişelenmeyin; takip edenler için önemli değil. -!!! note "Not" - - Veri formatlarına ve türlerine aşina değilseniz endişelenmeyin; takip edenler için önemli değil. - -Bu, pipeline'ı denemek için ihtiyacımız olan her şeye sahip olduğumuzu doğrular. +Artık pipeline'ı denemek için ihtiyacımız olan her şeye sahibiz. ### 2.2. Pipeline'ı çalıştırma -Konteyner sistemi için Docker'ı ve çıktı dizini olarak `demo-results`'ı kullanmaya karar verelim; test komutunu çalıştırmaya hazırız: +Yukarıda belirtildiği gibi, örnek test komutunu neredeyse olduğu gibi kullanabiliriz; yalnızca hangi yazılım paketleme sistemini kullanacağımızı ve çıktı dizinine ne ad vereceğimizi belirtmemiz gerekiyor. +Konteyner sistemi için Docker'ı ve çıktı dizini olarak `demo-results`'ı kullanmaya karar verelim. + +Test komutunu çalıştırmaya hazırız: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results @@ -305,9 +340,10 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] + Downloading plugin nf-schema@2.7.2 + Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ------------------------------------------------------ @@ -316,8 +352,9 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 + nf-core/demo 1.2.0 ------------------------------------------------------ + Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : demo-results @@ -327,21 +364,22 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-57-41 + trace_report_suffix : 2026-07-03_21-31-35 Core Nextflow options revision : master - runName : magical_pauling + runName : cranky_curry containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work - projectDir : /workspaces/.nextflow/assets/nf-core/demo + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 userName : root profile : docker,test - configFiles : /workspaces/.nextflow/assets/nf-core/demo/nextflow.config + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ + * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -351,11 +389,11 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results * Software dependencies https://github.com/nf-core/demo/blob/master/CITATIONS.md - - executor > local (7) - [ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ + [ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` @@ -364,14 +402,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results Temel bir Nextflow pipeline'ı çalıştırdığınızda olduğundan çok daha fazla konsol çıktısı olduğunu fark edeceksiniz. Pipeline'ın sürümünün, girdilerinin ve çıktılarının bir özetini ve birkaç yapılandırma öğesini içeren bir başlık vardır. -!!! note "Not" +!!! info "Bilgi" Çıktınız farklı zaman damgaları, çalıştırma adları ve dosya yolları gösterecektir; ancak genel yapı ve süreç çalıştırması benzer olmalıdır. Çıktının üst kısmındaki şu satıra dikkat edin: ```console -Launching `https://github.com/nf-core/demo` [magical_pauling] DSL2 - revision: 45904cb9d1 [master] +Launching `https://github.com/nf-core/demo` [cranky_curry] revision: 32893afef8 [master] ``` Bu satır, pipeline'ın hangi revizyonunun kullanıldığını gösterir. @@ -379,7 +417,7 @@ Bir sürüm belirtmediğimiz için Nextflow, `master` dalındaki en son commit'i Tekrarlanabilir çalıştırmalar için `-r` bayrağını kullanarak belirli bir sürümü sabitlemelisiniz: ```bash -nextflow run nf-core/demo -r 1.1.0 -profile docker,test --outdir demo-results +nextflow run nf-core/demo -r 1.2.0 -profile docker,test --outdir demo-results ``` Bu, yeni commit'ler veya sürümler yayınlansa da her seferinde aynı pipeline kodunun kullanılmasını sağlar. @@ -388,14 +426,15 @@ Bu eğitimde basitlik adına `-r` bayrağını atlıyoruz; ancak üretim ortamı Çalıştırma çıktısına geçerek, hangi süreçlerin çalıştırıldığını bize söyleyen satırlara bakalım: ```console -executor > local (7) -[ff/a6976b] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ -[39/731ab7] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ -[7c/78d96e] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ +executor > local (8) +[ca/5b0f3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ +[b7/cb6812] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) [100%] 3 of 3 ✔ +[ff/6ebd98] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ +[09/bbd1b4] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Bu bize üç sürecin çalıştırıldığını söyler; bunlar nf-core web sitesindeki pipeline dokümantasyon sayfasında gösterilen üç araca karşılık gelir: FASTQC, SEQTK_TRIM ve MULTIQC. +Bu bize dört sürecin çalıştırıldığını söyler; bunlar nf-core web sitesindeki pipeline dokümantasyon sayfasında gösterilen dört araca karşılık gelir: `FASTQC`, `SEQTK_TRIM`, `MULTIQC` ve `COWPY`. Burada gösterildiği gibi `NFCORE_DEMO:DEMO:MULTIQC` şeklindeki tam süreç adları, tanıtıcı Hello Nextflow materyalinde görmüş olabileceğinizden daha uzundur. Bunlar üst iş akışlarının adlarını içerir ve pipeline kodunun modülerliğini yansıtır. @@ -413,6 +452,8 @@ tree -L 2 demo-results ```console demo-results + ├── cowpy + │ └── cowpy.txt ├── fastqc │ ├── SAMPLE1_PE │ ├── SAMPLE2_PE @@ -423,19 +464,20 @@ tree -L 2 demo-results │ └── SAMPLE3_SE ├── multiqc │ ├── multiqc_data - │ ├── multiqc_plots │ └── multiqc_report.html └── pipeline_info - ├── execution_report_2025-11-21_04-57-41.html - ├── execution_timeline_2025-11-21_04-57-41.html - ├── execution_trace_2025-11-21_04-57-41.txt + ├── execution_report_2026-07-03_21-31-35.html + ├── execution_timeline_2026-07-03_21-31-35.html + ├── execution_trace_2026-07-03_21-31-35.txt ├── nf_core_demo_software_mqc_versions.yml - ├── params_2025-11-21_04-57-46.json - └── pipeline_dag_2025-11-21_04-57-41.html + ├── params_2026-07-03_21-31-43.json + └── pipeline_dag_2026-07-03_21-31-35.html + + 12 directories, 8 files ``` Bu çok fazla görünebilir. -`nf-core/demo` pipeline'ının çıktıları hakkında daha fazla bilgi edinmek için [dokümantasyon sayfasına](https://nf-co.re/demo/1.1.0/docs/output/) bakın. +`nf-core/demo` pipeline'ının çıktıları hakkında daha fazla bilgi edinmek için [dokümantasyon sayfasına](https://nf-co.re/demo/1.2.0/docs/output/) bakın. Bu aşamada, gözlemlenmesi gereken önemli şey, sonuçların modüle göre düzenlenmiş olması ve ek olarak pipeline çalıştırması hakkında çeşitli zaman damgalı raporlar içeren `pipeline_info` adlı bir dizinin bulunmasıdır. @@ -443,7 +485,7 @@ Bu aşamada, gözlemlenmesi gereken önemli şey, sonuçların modüle göre dü ![çalıştırma zaman çizelgesi raporu](./img/execution_timeline.png) -!!! note "Not" +!!! info "Bilgi" Burada görevler paralel olarak çalıştırılmadı; çünkü Github Codespaces'te minimalist bir makine üzerinde çalışıyoruz. Bunların paralel olarak çalıştığını görmek için, codespace'inizin CPU tahsisini ve test yapılandırmasındaki kaynak sınırlarını artırmayı deneyin. @@ -491,42 +533,44 @@ nextflow run nf-core/demo --help ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [adoring_meucci] revision: 32893afef8 [master] - Launching `https://github.com/nf-core/demo` [run_name] DSL2 - revision: 45904cb9d1 [master] - ---------------------------------------------------- + ------------------------------------------------------ ,--./,-. ___ __ __ __ ___ /,-._.--~' |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/demo 1.1.0 - ---------------------------------------------------- + nf-core/demo 1.2.0 + ------------------------------------------------------ Typical pipeline command: nextflow run nf-core/demo -profile --input samplesheet.csv --outdir Input/output options - --input [string] Path to a metadata file containing information about the samples in the experiment. - --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. - --email [string] Email address for completion summary. - --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. + --input [string] Path to a metadata file containing information about the samples in the experiment. + --outdir [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. + + --email [string] Email address for completion summary. + --multiqc_title [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. Reference genome options - --genome [string] Name of iGenomes reference. - --fasta [string] Path to FASTA genome file. + --genome [string] Name of iGenomes reference. + --fasta [string] Path to FASTA genome file. Process skipping options - --skip_trim [boolean] Skip trimming fastq files with seqtk + --skip_trim [boolean] Skip trimming fastq files with seqtk Generic options - --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. - --help [boolean, string] Display the help message. - --help_full [boolean] Display the full detailed help message. - --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). - !! Hiding 20 param(s), use the `--show_hidden` parameter to show them !! - ---------------------------------------------------- + --multiqc_methods_description [string] Custom MultiQC yaml file containing HTML including a methods description. + --help [boolean, string] Display the help message. + --help_full [boolean] Display the full detailed help message. + --show_hidden [boolean] Display hidden parameters in the help message (only works when --help or --help_full are provided). + !! Hiding 19 param(s), use the `--showHidden` parameter to show them !! + ------------------------------------------------------ * The pipeline https://doi.org/10.5281/zenodo.12192442 @@ -552,24 +596,98 @@ Yalın Nextflow pipeline'larında `--help`, yalnızca geliştirici bunu manuel o [Hello Config](../hello_nextflow/06_hello_config.md) bölümünde ele alındığı gibi, parametre değerlerini komut satırında `--param_name` ile ayarlayabilir veya bir dizi parametreyi YAML dosyasında toplayıp `-params-file` ile geçirebilirsiniz. Her iki yaklaşım da nf-core pipeline'larıyla aynı şekilde çalışır. -Örneğin, kırpma adımını atlamak için: +Örneğin, kırpma adımını atlamak için `skip_trim` boolean parametresini `true` olarak ayarlamamız gerekir. +Çalışma dizininizde bu değer önceden ayarlanmış `my_params.yml` adlı bir params dosyası bulunmaktadır: + +```yaml title="my_params.yml" +skip_trim: true +``` + +`-params-file` ile geçirin: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim --skip_trim +nextflow run nf-core/demo -profile docker,test --outdir demo-results-notrim -params-file my_params.yml ``` ??? success "Komut çıktısı" ```console - executor > local (4) - [3f/a82c91] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [7d/c5e014] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + N E X T F L O W ~ version 26.04.4 + + Launching `https://github.com/nf-core/demo` [focused_heisenberg] revision: 32893afef8 [master] + + + ------------------------------------------------------ + ,--./,-. + ___ __ __ __ ___ /,-._.--~' + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + nf-core/demo 1.2.0 + ------------------------------------------------------ + + Input/output options + input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv + outdir : demo-results-notrim + + Process skipping options + skip_trim : true + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + trace_report_suffix : 2026-07-03_22-08-47 + + Core Nextflow options + revision : master + runName : focused_heisenberg + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core + workDir : /workspaces/training/hello-nf-core/work + projectDir : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2 + userName : root + profile : docker,test + configFiles : /workspaces/.nextflow/assets/.repos/nf-core/demo/clones/32893afef8076a03a2767a020b3f0cab2e0b40b2/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + + * The pipeline + https://doi.org/10.5281/zenodo.12192442 + + * The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + + * Software dependencies + https://github.com/nf-core/demo/blob/master/CITATIONS.md + + executor > local (5) + [7a/f3599e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) [100%] 3 of 3 ✔ + [b0/2f0bdc] NFCORE_DEMO:DEMO:COWPY [100%] 1 of 1 ✔ + [c3/3c2278] NFCORE_DEMO:DEMO:MULTIQC (demo) [100%] 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` `SEQTK_TRIM` süreci artık çıktıda görünmüyor. -!!! info "Bilgi" +!!! warning "Parametre girdileriyle ilgili önemli kısıtlamalar" + + **Boolean parametreleri komut satırında ayarlama** + + Nextflow 26.04 sürümünden itibaren, komut satırında sağlanan tüm değerler string olarak yazılır. + `skip_trim` gibi bir boolean parametre için, bunu yalın bayrak olarak (`--skip_trim`) veya `--skip_trim true` şeklinde geçirmek, şema doğrulamasında başarısız olan `"true"` **string**'i olarak değerlendirilir: + + ```console + * --skip_trim (true): Value is [string] but should be [boolean] + ``` + + Bir boolean parametreyi gerçek `true`/`false` değerine ayarlamak için yukarıda gösterildiği gibi `-params-file` kullanın ya da bir yapılandırma dosyasında ayarlayın. + String, integer ve dosya yolu parametreleri bu durumdan etkilenmez ve doğrudan komut satırında ayarlanabilir. + Bu kurs, boolean parametreler için bu kalıbı her yerde kullanmaktadır. + + **Özel yapılandırma dosyaları kullanma** `-c` ile geçirilen özel bir yapılandırma dosyasında pipeline parametrelerini ayarlamak teknik olarak mümkün olsa da, Nextflow'un yapılandırma öncelik kurallarına bağlı olarak bu, pipeline'ın kendi `nextflow.config` dosyasında zaten ayarlanmış varsayılanları geçersiz kılmayabilir. Komut satırında `--param_name` veya `-params-file` kullanmak daha güvenilirdir; çünkü bunlar her zaman öncelik taşır. @@ -603,7 +721,7 @@ WARN: The following invalid input values have been detected: ``` Pipeline çalışmaya devam eder; ancak uyarı, `--foobar`'ın tanınan bir parametre olmadığını hemen bildirir. -Bu, `--outdir` yerine `--outDir` gibi yazım hatalarını, çıktının neden yanlış yere gittiğini merak ederek hesaplama zamanı harcamadan önce yakalar. +Bu, `--outdir` yerine `--outDir` gibi yazım hatalarını dikkatinize çekmek için tasarlanmıştır; böylece zaman ve hesaplama kaynağı harcamadan önce sorunu fark edebilirsiniz. ##### 3.1.3.2. Geçersiz parametre değerleri @@ -617,13 +735,14 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --skip_trim ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --skip_trim (yes): Value is [string] but should be [boolean] ``` Herhangi bir süreç çalışmadan önce pipeline durur; bu sizi başarısız veya hatalı bir çalıştırmadan korur. -Boolean parametreler değer olmadan bayrak olarak (`--skip_trim`) geçirilmeli ya da params dosyasında `true`/`false` olarak ayarlanmalıdır. +3.1.2. bölümünde belirtildiği gibi, boolean parametreler komut satırında string olarak yazıldığından, params dosyasında gerçek `true`/`false` değerine ayarlanmalıdır. #### 3.1.4. Girdi doğrulama @@ -637,7 +756,7 @@ Bunu da [Bölüm 5: Girdi Doğrulama](05_input_validation.md) bölümünde daha `nf-core/demo` pipeline'ı `sample`, `fastq_1` ve `fastq_2` sütunlarına sahip bir CSV dosyası bekler. Bu, beklenen yapıyı, sütun türlerini ve kısıtlamaları belirten bir şema dosyasında (`assets/schema_input.json`) tanımlanmıştır. -??? abstract "assets/schema_input.json" +??? abstract "Girdiler için şema dosyası" ```json title="assets/schema_input.json" { @@ -678,9 +797,7 @@ Bu, beklenen yapıyı, sütun türlerini ve kısıtlamaları belirten bir şema Şema, `sample` ve `fastq_1`'in zorunlu olduğunu; `fastq_2`'nin ise isteğe bağlı olduğunu (hem çift uçlu hem de tek uçlu verileri destekler) belirtir. Dosya yolları, varlık ve uzantı deseni açısından doğrulanır. -##### 3.1.4.1. Geçersiz bir samplesheet oluşturma - -Eksik bir sütun ve var olmayan bir dosya yolu içeren bir samplesheet oluşturun: +Bunu göstermek için, çalışma dizininizde `malformed_samplesheet.csv` adlı hatalı biçimlendirilmiş bir samplesheet bulunmaktadır: ```csv title="malformed_samplesheet.csv" sample,fastq_2 @@ -688,11 +805,8 @@ SAMPLE1,/not/a/real/file.fastq.gz ``` Bu samplesheet, zorunlu `fastq_1` sütununu içermiyor ve `fastq_2`'de var olmayan bir dosya yolu barındırıyor. -Her iki sorun da bir sonraki adımda doğrulama hatası üretecektir. - -##### 3.1.4.2. Demo pipeline'ı geçersiz samplesheet ile çalıştırma -Demo pipeline'ı `malformed_samplesheet.csv` dosyasını girdi olarak kullanarak çalıştırın. +Demo pipeline'ı `malformed_samplesheet.csv` dosyasını girdi olarak kullanarak çalıştırın: ```bash nextflow run nf-core/demo -profile docker,test --outdir demo-results --input malformed_samplesheet.csv @@ -701,6 +815,7 @@ nextflow run nf-core/demo -profile docker,test --outdir demo-results --input mal ```console ERROR ~ Validation of pipeline parameters failed! + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * --input (malformed_samplesheet.csv): Validation of file failed: @@ -725,14 +840,27 @@ nf-core pipeline'ları, `nextflow.config` ve `conf/` dizininde varsayılan yapı Herhangi bir şeyi geçersiz kılmadan önce, varsayılanların nerede bulunduğunu bilmek faydalıdır. 2.1. bölümünde pipeline kaynak kodunun `$NXF_HOME/assets` dizininde bulunduğunu gördünüz. -Mevcut yapılandırma dosyalarını listelemek için: +1.2.4. bölümündeki `pipelines` sembolik bağlantısını kullanarak mevcut yapılandırma dosyalarını listeleyebilirsiniz: ```bash -ls $NXF_HOME/assets/nf-core/demo/conf/ +ls pipelines/nf-core/demo/conf/ ``` ```console -base.config igenomes.config igenomes_ignored.config modules.config test.config test_full.config +base.config +containers_conda_lock_files_amd64.config +containers_conda_lock_files_arm64.config +containers_docker_amd64.config +containers_docker_arm64.config +containers_singularity_https_amd64.config +containers_singularity_https_arm64.config +containers_singularity_oras_amd64.config +containers_singularity_oras_arm64.config +igenomes.config +igenomes_ignored.config +modules.config +test.config +test_full.config ```
@@ -752,56 +880,18 @@ Bu dosyalarda belirtilen ayarlardan herhangi birini değiştirmek isterseniz, bu Bunun yerine kendi yapılandırma dosyanızı oluşturun ve `-c` ile geçirin. Belirttiğiniz değerler, diğer dosyalarda ayarlanan varsayılan değerleri geçersiz kılar. -Bunu pratikte yapmak için birkaç alıştırma üzerinden geçelim. +Bunu pratikte deneyelim. -#### 3.2.1. Bir süreç için kaynak tahsisini değiştirme +#### 3.2.1. Süreç kaynaklarını ve araç argümanlarını özelleştirme -Demo pipeline, `base.config` dosyasında tanımlanan etiketleri kullanarak kaynakları atar. -Örneğin, `FASTQC` süreci 6 CPU ve 36 GB bellek tahsis eden `process_medium` etiketini kullanır. +nf-core modülleri iki yaygın yapılandırma geçersiz kılma türünü destekler: **kaynak tahsisi** (CPU, bellek, zaman) ve `ext.args` aracılığıyla **araç argümanları**. -Test profili kaynakları `resourceLimits` aracılığıyla sınırlar; ancak belirli süreçler için kaynakları da geçersiz kılabilirsiniz. +Birçok komut satırı aracının, pipeline parametresi olarak sunulmayacak kadar az kullanılan isteğe bağlı argümanları vardır. +`ext.args` kuralı, bu argümanları bir yapılandırma dosyası aracılığıyla temel araca geçirmenizi sağlar. -`custom.config` adlı bir dosya oluşturun: +Çalışma dizininizde sağlanan `custom.config` dosyası her iki geçersiz kılmayı da göstermektedir: ```groovy title="custom.config" linenums="1" -process { - withName: 'FASTQC' { - cpus = 2 - memory = 4.GB - } -} -``` - -Pipeline'ı özel yapılandırmanızla çalıştırın: - -```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config -``` - -??? success "Komut çıktısı" - - ```console - executor > local (7) - [2a/f17b3e] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [9c/e4d028] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [5b/a93c71] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ - -[nf-core/demo] Pipeline completed successfully- - ``` - -`-c` bayrağı, yapılandırmanızı pipeline'ın yerleşik yapılandırmasının üzerine ekler. - -#### 3.2.2. `ext.args` ile araç argüman değerlerini ayarlama - -Birçok komut satırı aracının, çok yaygın kullanılmadıkça pipeline parametresi olarak ayarlanmayan isteğe bağlı argümanları vardır. -Bu araç argümanları için nf-core modülleri, argümanları bir yapılandırma dosyası aracılığıyla temel araca geçirmek amacıyla `ext.args` adlı bir Nextflow kuralını kullanır. - -Örneğin, `ext.args` kullanarak `SEQTK_TRIM` modülüne bir kırpma argümanı ekleyelim. - -##### 3.2.2.1. Özel yapılandırmayı güncelleme - -`custom.config` dosyanızı güncelleyin: - -```groovy title="custom.config" linenums="1" hl_lines="6 7 8" process { withName: 'FASTQC' { cpus = 2 @@ -813,64 +903,72 @@ process { } ``` -Bu, `seqtk trimfq`'ya kalite kırpmasına ek olarak her okumanın başından 5 baz kırpmasını söyler. +İlk blok, `FASTQC` kaynak tahsisini geçersiz kılar. +Varsayılan olarak `FASTQC`, `base.config` dosyasındaki `process_medium` etiketini kullanır ve 6 CPU ile 36 GB bellek tahsis eder; burada bunu 2 CPU ve 4 GB ile sınırlandırıyoruz. -##### 3.2.2.2. Pipeline'ı çalıştırma +İkinci blok, `ext.args` aracılığıyla `SEQTK_TRIM`'e ek bir argüman geçirir. +`-b 5` bayrağı, `seqtk trimfq`'ya kalite kırpmasına ek olarak her okumanın başından 5 baz kırpmasını söyler. -Etkisini görmek için pipeline'ı bu yapılandırmayla tekrar çalıştırın: +Pipeline'ı bu yapılandırmayla çalıştırın: ```bash -nextflow run nf-core/demo -profile docker,test --outdir demo-results-extargs -c custom.config +nextflow run nf-core/demo -profile docker,test --outdir demo-results-custom -c custom.config ``` ??? success "Komut çıktısı" ```console - executor > local (7) - [1e/b7a392] NFCORE_DEMO:DEMO:FASTQC (SAMPLE3_SE) | 3 of 3 ✔ - [ab/cd1234] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE3_SE) | 3 of 3 ✔ - [4f/c8d105] NFCORE_DEMO:DEMO:MULTIQC | 1 of 1 ✔ + executor > local (8) + [95/b32876] NFCORE_DEMO:DEMO:FASTQC (SAMPLE1_PE) | 3 of 3 ✔ + [17/428668] NFCORE_DEMO:DEMO:SEQTK_TRIM (SAMPLE1_PE) | 3 of 3 ✔ + [cf/85991a] NFCORE_DEMO:DEMO:COWPY | 1 of 1 ✔ + [3c/94a7a0] NFCORE_DEMO:DEMO:MULTIQC (demo) | 1 of 1 ✔ -[nf-core/demo] Pipeline completed successfully- ``` -Argümanın uygulandığını doğrulamak için, çalıştırma çıktısından `SEQTK_TRIM` work dizini hash'ini bulun (örn. `work/ab/cd1234...`) ve içindeki `.command.sh` dosyasını kontrol edin: +`-c` bayrağı, yapılandırmanızı pipeline'ın yerleşik yapılandırmasının üzerine ekler. + +`ext.args` geçersiz kılmasının etkili olduğunu doğrulamak için, çalıştırma çıktısından `SEQTK_TRIM` work dizini hash'ini bulun (örn. `work/17/428668...`) ve içindeki `.command.sh` dosyasını kontrol edin: ```bash -cat work/ab/cd1234/.command.sh +cat work/17/428668/.command.sh ``` ??? success "Komut çıktısı" ```console - #!/usr/bin/env bash + #!/usr/bin/env bash -e -u -o pipefail + printf "%s\n" sample1_R1.fastq.gz sample1_R2.fastq.gz | while read f; + do + seqtk \ + trimfq \ + -b 5 \ + $f \ + | gzip --no-name > SAMPLE1_PE_$(basename $f) + done ... - seqtk trimfq -b 5 SAMPLE3_SE.fastq.gz | gzip -c > SAMPLE3_SE.trimmed.fastq.gz ``` -`seqtk trimfq` komutunda `-b 5`'i görmelisiniz; bu, `ext.args` geçersiz kılmanızın etkili olduğunu doğrular. +`seqtk trimfq` komutunda `-b 5`'i görmelisiniz. -##### 3.2.2.3. Varsayılan değerleri geçersiz kılma - -Bazı modüllerin `ext.args` değerleri varsayılan olarak zaten ayarlanmıştır. -Örneğin, `FASTQC` modülü varsayılan olarak `ext.args = '--quiet'` ile yapılandırılmıştır (`conf/modules.config` dosyasında tanımlanmıştır). +`ext.args` hakkında bilmeniz gereken önemli bir nokta: bir modülün varsayılan olarak ayarlanmış bir değeri varsa, sizin değeriniz buna **eklenmek yerine tamamen yerini alır**. +Örneğin, `FASTQC` modülü `conf/modules.config` dosyasında varsayılan olarak `ext.args = '--quiet'` ile yapılandırılmıştır: ```groovy title="conf/modules.config" linenums="21" hl_lines="2" withName: FASTQC { - ext.args = '--quiet' + ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ] } ``` -Özel bir yapılandırma dosyası aracılığıyla `ext.args` için bir değer sağlarsanız, bu değer söz konusu süreç için ayarlanan varsayılanın tamamen yerini alır. - -Örneğin, varsayılan `'--quiet'` iken `ext.args = '--kmers 8'` ayarlarsanız, `--quiet` bayrağı artık uygulanmayacaktır. +`FASTQC` için `ext.args = '--kmers 8'` ayarlarsanız, `--quiet` bayrağı artık uygulanmayacaktır. Her ikisini de korumak için `ext.args = '--quiet --kmers 8'` olarak ayarlayın. -Bu, `ext.args` ile argüman değerleri sağlamak istediğiniz araçların varsayılan yapılandırmasını kontrol etmekten sorumlu olduğunuz anlamına gelir. +`ext.args` değerini geçersiz kılmadan önce her zaman modülün varsayılan yapılandırmasını kontrol etmelisiniz. ### Özetle @@ -878,4 +976,6 @@ Bir nf-core pipeline'ından nasıl yardım alacağınızı, parametreleri nasıl ### Sırada ne var? -Bir mola verin! Hazır hissettiğinizde, kendi nf-core uyumlu pipeline'ınızı sıfırdan oluşturacağınız 2. Bölüme geçin. +Yalnızca nf-core pipeline'larını çalıştırmak istiyorsanız, bu kadar! + +nf-core standartlarına göre kendi pipeline'larınızı geliştirmeyi öğrenmek istiyorsanız, bir mola verin ve hazır hissettiğinizde 2. Bölüme geçin. nf-core şablon tabanlı araçları kullanarak kendi nf-core uyumlu pipeline'ınızı nasıl oluşturacağınızı öğreneceksiniz. diff --git a/docs/tr/docs/hello_nf-core/02_rewrite_hello.md b/docs/tr/docs/hello_nf-core/02_rewrite_hello.md index 4f00bfb59a..a0b40a3195 100644 --- a/docs/tr/docs/hello_nf-core/02_rewrite_hello.md +++ b/docs/tr/docs/hello_nf-core/02_rewrite_hello.md @@ -18,10 +18,6 @@ Eğer Hello pipeline'ına aşina değilseniz veya hatırlatmaya ihtiyacınız va - [Workflows of Workflows](../side_quests/workflows_of_workflows/index.md) - [Metadata and meta maps](../side_quests/metadata/index.md) -!!! note "Not" - - Terminalinizde `hello-nf-core` dizininde olduğunuzdan emin olun. - --- ## 1. Pipeline kod yapısını inceleme @@ -30,6 +26,7 @@ nf-core projesi, pipeline'ların nasıl yapılandırılacağı, kodun nasıl org Pipeline oluşturma projemize başlamadan önce bu yapıyı ve organizasyonu anlamamız gerekiyor. O halde, Bölüm 1'de oluşturduğumuz `pipelines` sembolik bağlantısını kullanarak `nf-core/demo` repository'sindeki pipeline kodunun nasıl organize edildiğine bir göz atalım. +Terminalinizde `hello-nf-core` dizininde olduğunuzdan emin olun. Hatırlatma olarak, `nf-core/demo` dizinini bulmak ve açmak için `tree` komutunu ya da dosya gezginini kullanabilirsiniz. @@ -82,7 +79,7 @@ Bu biraz soyut gelebilir, o yüzden `nf-core/demo` pipeline'ında bunun pratikte `main.nf` içindeki adsız iş akışına _giriş noktası_ betiği denir. Bu betik, iki tür iç içe iş akışı için bir sarmalayıcı görevi görür: `workflows/demo.nf` içinde yer alan ve gerçek analiz mantığını içeren `DEMO` iş akışı ve `subworkflows/` altında bulunan bir dizi yardımcı iş akışı. `demo.nf` iş akışı, `modules/` altındaki **modülleri** çağırır; bu modüller, gerçek analiz adımlarını gerçekleştirecek **süreçleri** içerir. -!!! note "Not" +!!! info "Bilgi" Subworkflow'lar yalnızca yardımcı işlevlerle sınırlı değildir ve süreç modüllerini kullanabilirler. @@ -107,7 +104,7 @@ Bu kursta, basit Hello pipeline'ını Hello Nextflow'dan nf-core uyumlu bir form `demo.nf` iş akışı, `modules/` altındaki **modülleri** çağırır; bunları bir sonraki adımda inceleyeceğiz. -!!! note "Not" +!!! info "Bilgi" Bazı nf-core analiz iş akışları, alt düzey subworkflow'ları çağırarak ek iç içe geçme seviyeleri gösterir. Bu, genellikle birlikte sıkça kullanılan iki veya daha fazla modülü kolayca yeniden kullanılabilir pipeline segmentlerine sarmak için kullanılır. @@ -266,13 +263,20 @@ TUI kapandığında, aşağıdaki konsol çıktısını görmelisiniz. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Launching interactive nf-core pipeline creation tool. ``` -Pipeline oluşturmanın çalıştığına dair konsol çıktısında açık bir onay yoktur, ancak `core-hello` adında yeni bir dizin görmelisiniz. +TUI tamamlandığında, araç pipeline'ın oluşturulduğunu ve konteyner yapılandırmasının üretildiğini bildirir: + +```console +INFO Creating new pipeline: 'hello' +INFO Generated container configs for the pipeline successfully. +``` + +Artık `core-hello` adında yeni bir dizin görmelisiniz. Şablonu kullanarak kendinize ne kadar iş kazandırdığınızı görmek için yeni dizinin içeriğini görüntüleyin. @@ -283,8 +287,7 @@ tree core-hello ??? abstract "Dizin içeriği" ```console - core-hello/ - ├── README.md + core-hello ├── assets │ ├── samplesheet.csv │ └── schema_input.json @@ -294,13 +297,15 @@ tree core-hello │ ├── test.config │ └── test_full.config ├── docs - │ ├── README.md + │ ├── CONTRIBUTING.md │ ├── output.md + │ ├── README.md │ └── usage.md ├── main.nf ├── modules.json ├── nextflow.config ├── nextflow_schema.json + ├── README.md ├── subworkflows │ ├── local │ │ └── utils_nfcore_hello_pipeline @@ -320,6 +325,8 @@ tree core-hello │ │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap + │ │ ├── main.nf.test + │ │ ├── main.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ └── nextflow.config @@ -333,7 +340,7 @@ tree core-hello └── workflows └── hello.nf - 15 directories, 34 files + 14 directories, 37 files ``` Bu çok fazla dosya! @@ -352,11 +359,12 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./core-hello/main.nf` [scruffy_marconi] DSL2 - revision: b9e9b3b8de + Launching `./core-hello/main.nf` [cheesy_avogadro] revision: d6bbba9521 - Downloading plugin nf-schema@2.5.1 + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' Input/output options input : https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv outdir : core-hello-results @@ -366,10 +374,10 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results config_profile_description: Minimal test dataset to check pipeline function Generic options - trace_report_suffix : 2025-11-21_04-47-18 + trace_report_suffix : 2026-06-23_16-56-58 Core Nextflow options - runName : scruffy_marconi + runName : cheesy_avogadro containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -383,6 +391,9 @@ nextflow run ./core-hello -profile docker,test --outdir core-hello-results -[core/hello] Pipeline completed successfully- ``` +`WARN: Unrecognized config option 'validation.*'` satırları, yeni oluşturulan şablonda sabitlenmiş nf-schema eklentisinin sürümünden kaynaklanmaktadır. +Bu uyarılar zararsızdır ve çalıştırmayı etkilemez. + Bu, tüm temel bağlantıların yerinde olduğunu gösterir. Peki çıktılar nerede? Var mı? @@ -397,12 +408,12 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_trace_2025-11-21_04-47-18.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_trace_2026-06-23_16-56-58.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-18.json - └── pipeline_dag_2025-11-21_04-47-18.html + ├── params_2026-06-23_16-57-00.json + └── pipeline_dag_2026-06-23_16-56-58.html 1 directory, 6 files ``` @@ -434,7 +445,7 @@ Daha yakından bakalım. Bu, bazı nf-core işlevleri zaten yerinde olan analiz iş akışımız için yer tutucu olarak hizmet eder. -```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 19 53" +```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="15 17 21 53" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -453,14 +464,16 @@ workflow HELLO { take: ch_samplesheet // kanal: --input parametresinden okunan samplesheet + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Yazılım sürümlerini derle ve kaydet // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -477,19 +490,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // kanal: [ path(versions.yml) ] - } /* @@ -502,15 +512,15 @@ workflow HELLO { [Hello Nextflow](../hello_nextflow/index.md)'da geliştirilen temel bir Nextflow iş akışına kıyasla, burada yeni olan birkaç şey fark edeceksiniz (yukarıdaki vurgulanan satırlar): - İş akışı bloğunun bir adı var -- İş akışı girdileri `take:` anahtar kelimesi kullanılarak bildirilir ve kanal oluşturma üst iş akışına taşınır +- İş akışı girdileri `take:` anahtar kelimesi kullanılarak bildirilir (burada bir samplesheet kanalı ve bir çıktı dizini), ve kanal oluşturma üst iş akışına taşınır - İş akışı içeriği bir `main:` bloğunun içine yerleştirilir - Çıktılar `emit:` anahtar kelimesi kullanılarak bildirilir Bunlar, iş akışını **birleştirilebilir** yapan Nextflow'un isteğe bağlı özellikleridir; yani başka bir iş akışı içinden çağrılabilir. -??? note "`Channel.topic` bloğu" +??? note "`channel.topic` bloğu" - 17. satırdan başlayan `def topic_versions = Channel.topic("versions")` bloğunu fark etmiş olabilirsiniz. + 28. satırdan başlayan `def topic_versions = channel.topic("versions")` bloğunu fark etmiş olabilirsiniz. Bu, tüm modüllerden yazılım sürümü bilgilerini otomatik olarak toplayan standart bir temizlik kodudur. nf-core bu mekanizmayı 2026 yılında tüm pipeline'lara yaygınlaştırmaktadır; dolayısıyla ilerleyen süreçte tüm yeni pipeline'larda bunu göreceksiniz. Bu kursun 4. Bölümü nasıl çalıştığını ayrıntılı olarak açıklamaktadır. @@ -574,15 +584,15 @@ nextflow run original-hello/hello.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/hello.nf` [goofy_babbage] DSL2 - revision: e9e72441e9 + Launching `original-hello/hello.nf` [sharp_dijkstra] revision: 319b99ee58 executor > local (8) - [a4/081cec] sayHello (1) | 3 of 3 ✔ - [e7/7e9058] convertToUpper (3) | 3 of 3 ✔ - [0c/17263b] collectGreetings | 1 of 1 ✔ - [94/542280] cowpy | 1 of 1 ✔ + [23/4eb61e] sayHello (3) | 3 of 3 ✔ + [c8/81a076] convertToUpper (1) | 3 of 3 ✔ + [90/ea197e] collectGreetings | 1 of 1 ✔ + [da/3df79a] cowpy | 1 of 1 ✔ ``` Bu sizin için çalışıyorsa, kodu incelemeye hazırsınız. @@ -703,7 +713,7 @@ Bu arada, `params.greeting = 'greetings.csv'` satırını da yorum satırı yapa params.character = 'turkey' ``` -!!! note "Not" +!!! info "Bilgi" Nextflow dil sunucusu uzantısı yüklüyse, sözdizimi denetleyicisi kodunuzu kırmızı dalgalı çizgilerle işaretleyecektir. Bunun nedeni, bir `take:` ifadesi koyarsanız, aynı zamanda bir `main:` de olması gerektiğidir. @@ -850,7 +860,7 @@ Burada yapılacak iki önemli gözlem var: - İçe aktarılan iş akışını çağırma sözdizimi, modülleri çağırma sözdizimi ile esasen aynıdır. - Girdileri iş akışına çekmeyle ilgili her şey (girdi parametresi ve kanal oluşturma) artık bu üst iş akışında bildirilir. -!!! note "Not" +!!! info "Bilgi" Giriş noktası iş akışı dosyasını `main.nf` olarak adlandırmak bir kural, bir gereklilik değildir. @@ -877,19 +887,19 @@ Tüm değişiklikleri doğru yaptıysanız, bu tamamlanana kadar çalışmalıd ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `original-hello/main.nf` [friendly_wright] DSL2 - revision: 1ecd2d9c0a + Launching `original-hello/main.nf` [irreverent_cajal] revision: 619249b1d7 executor > local (8) - [24/c6c0d8] HELLO:sayHello (3) | 3 of 3 ✔ - [dc/721042] HELLO:convertToUpper (3) | 3 of 3 ✔ - [48/5ab2df] HELLO:collectGreetings | 1 of 1 ✔ - [e3/693b7e] HELLO:cowpy | 1 of 1 ✔ - Output: /workspaces/training/hello-nf-core/work/e3/693b7e48dc119d0c54543e0634c2e7/cowpy-COLLECTED-test-batch-output.txt + [50/b02a90] HELLO:sayHello (1) | 3 of 3 ✔ + [c0/3c336a] HELLO:convertToUpper (2) | 3 of 3 ✔ + [5c/47bb4f] HELLO:collectGreetings | 1 of 1 ✔ + [07/bfc706] HELLO:cowpy | 1 of 1 ✔ + Output: /workspaces/training/hello-nf-core/work/07/bfc7061fa521e86f4e1954191ab4c4/cowpy-COLLECTED-test-batch-output.txt ``` -Bu, HELLO iş akışımızı başarıyla birleştirilebilir hale getirdiğimiz anlamına gelir. +Bu, `HELLO` iş akışımızı başarıyla birleştirilebilir hale getirdiğimiz anlamına gelir. ### Özetle @@ -931,14 +941,16 @@ workflow HELLO { take: ch_samplesheet // kanal: --input parametresinden okunan samplesheet + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Yazılım sürümlerini derle ve kaydet // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -955,19 +967,16 @@ workflow HELLO { "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // kanal: [ path(versions.yml) ] - } /* @@ -977,8 +986,8 @@ workflow HELLO { */ ``` -Vurgulanan satırlar birleştirilebilir iş akışı yapısını tanımlar: `workflow HELLO {`, `take:`, `main:` ve `emit:`. -17–34. satırlar arasındaki büyük blok daha önemlidir: nf-core'un 2026 yılında tüm pipeline'lara yaygınlaştırdığı bir mekanizma olan topic kanallarını kullanarak yazılım sürümü yakalamayı yönetir. +Bu, birleştirilebilir iş akışı yapısıdır: `take:`, `main:` ve `emit:` içeren adlandırılmış bir `workflow HELLO {` bloğu. +`// Collate and save software versions` altındaki blok daha önemlidir: nf-core'un 2026 yılında tüm pipeline'lara yaygınlaştırdığı bir mekanizma olan topic kanallarını kullanarak yazılım sürümü yakalamayı yönetir. Bunu 4. Bölümde açıklayacağız; şimdilik dokunmadan bırakabileceğiniz standart bir şablon kodu olarak değerlendirin. 2. bölümde geliştirdiğimiz orijinal iş akışının birleştirilebilir versiyonundan ilgili kodu eklememiz gerekiyor. @@ -990,7 +999,7 @@ Bunu şu aşamalarda ele alacağız: 3. İş akışı mantığını `main` bloğuna ekleme 4. `emit` bloğunu güncelleme -!!! note "Not" +!!! info "Bilgi" Bu ilk geçiş için versiyon yakalama bloğunu görmezden geliyoruz. 4. Bölüm nasıl çalıştığını açıklamaktadır. @@ -1078,9 +1087,10 @@ Burada iki ilginç gözlem daha: nf-core projesinin, tipik olarak sütunsal veri içeren bir CSV dosyası olan samplesheet kavramı etrafında çok sayıda önceden oluşturulmuş işlevselliği vardır. `greetings.csv` dosyamız esasen bu olduğundan, mevcut `take` bildirimini olduğu gibi tutacağız ve bir sonraki adımda sadece girdi kanalının adını güncelleyeceğiz. -```groovy title="core-hello/workflows/hello.nf" linenums="21" +```groovy title="core-hello/workflows/hello.nf" linenums="17" take: ch_samplesheet // kanal: --input parametresinden okunan samplesheet + outdir ``` Girdi işleme bu iş akışının yukarısında yapılacaktır (bu kod dosyasında değil). @@ -1110,20 +1120,21 @@ Hatırlatma olarak, orijinal iş akışındaki ilgili kod şudur; birleştirileb `main:`'den sonra gelen kodu iş akışının yeni versiyonuna kopyalamamız gerekiyor. Orada zaten iş akışı tarafından çalıştırılan araçların sürümlerini yakalamakla ilgili bazı kodlar var. Şimdilik bunu olduğu gibi bırakacağız (araç versiyonlarıyla daha sonra ilgileneceğiz). -`ch_versions = channel.empty()` başlatmasını en üstte tutacağız, ardından iş akışı mantığımızı ekleyeceğiz; versiyon harmanlama kodunu sonda tutacağız. +`def ch_versions = channel.empty()` başlatmasını en üstte tutacağız, ardından iş akışı mantığımızı ekleyeceğiz; versiyon harmanlama kodunu sonda tutacağız. Bu sıralama mantıklıdır çünkü gerçek bir pipeline'da, süreçler iş akışı çalışırken `ch_versions` kanalına eklenecek sürüm bilgisi yayar. === "Sonra" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" hl_lines="10-20" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" hl_lines="11-21" workflow HELLO { take: ch_samplesheet // kanal: --input parametresinden okunan samplesheet + outdir main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // bir selamlama yayınla sayHello(greeting_ch) @@ -1140,7 +1151,7 @@ Bu sıralama mantıklıdır çünkü gerçek bir pipeline'da, süreçler iş ak // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1157,37 +1168,36 @@ Bu sıralama mantıklıdır çünkü gerçek bir pipeline'da, süreçler iş ak "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // kanal: [ path(versions.yml) ] - } ``` === "Önce" - ```groovy title="core-hello/workflows/hello.nf" linenums="19" + ```groovy title="core-hello/workflows/hello.nf" linenums="15" workflow HELLO { take: ch_samplesheet // kanal: --input parametresinden okunan samplesheet + outdir + main: - ch_versions = channel.empty() + def ch_versions = channel.empty() // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -1204,36 +1214,31 @@ Bu sıralama mantıklıdır çünkü gerçek bir pipeline'da, süreçler iş ak "${process}:\n${tool_versions.join('\n')}" } - softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + def ch_collated_versions = softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) .mix(topic_versions_string) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'hello_software_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - + ) emit: versions = ch_versions // kanal: [ path(versions.yml) ] - } ``` -Ayrıca kodu daha okunabilir yapmak için `main:`'den önce boş bir satır eklediğimizi fark edeceksiniz. - Bu harika görünüyor, ancak `sayHello()` sürecine ilettiğimiz kanalın adını aşağıda gösterildiği gibi `greeting_ch`'den `ch_samplesheet`'e, `take:` anahtar kelimesi altında yazılanla eşleşecek şekilde güncellememiz gerekiyor. === "Sonra" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) ``` === "Önce" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" + ```groovy title="core-hello/workflows/hello.nf" linenums="25" // bir selamlama yayınla sayHello(greeting_ch) ``` @@ -1246,7 +1251,7 @@ Son olarak, iş akışının son çıktılarının bildirimini içerecek şekild === "Sonra" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" hl_lines="2" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" hl_lines="2" emit: cowpy_hellos = cowpy.out versions = ch_versions // kanal: [ path(versions.yml) ] @@ -1254,12 +1259,12 @@ Son olarak, iş akışının son çıktılarının bildirimini içerecek şekild === "Önce" - ```groovy title="core-hello/workflows/hello.nf" linenums="69" + ```groovy title="core-hello/workflows/hello.nf" linenums="71" emit: versions = ch_versions // kanal: [ path(versions.yml) ] ``` -Bu, HELLO iş akışının kendisinde yapmamız gereken değişiklikleri tamamlar. +Bu, `HELLO` iş akışının kendisinde yapmamız gereken değişiklikleri tamamlar. Bu noktada, uygulamaya koymayı amaçladığımız genel kod yapısına ulaştık. ### Özetle @@ -1323,7 +1328,8 @@ workflow CORE_HELLO { // WORKFLOW: Run pipeline // HELLO ( - samplesheet + samplesheet, + params.outdir, ) } /* @@ -1360,7 +1366,6 @@ workflow { // SUBWORKFLOW: Run completion tasks // PIPELINE_COMPLETION ( - params.outdir, params.monochrome_logs, ) } @@ -1376,7 +1381,7 @@ nf-core projesi iç içe subworkflow'ları yoğun bir şekilde kullanır; bu yü Burada önemli olan iki iş akışı tanımlanmıştır: -- `CORE_HELLO`, `core-hello/workflows/hello.nf` içinde az önce uyarlamayı bitirdiğimiz HELLO iş akışını çalıştırmak için ince bir sarmalayıcıdır. +- `CORE_HELLO`, `core-hello/workflows/hello.nf` içinde az önce uyarlamayı bitirdiğimiz `HELLO` iş akışını çalıştırmak için ince bir sarmalayıcıdır. - `CORE_HELLO`'yu ve iki diğer subworkflow'u, `PIPELINE_INITIALISATION` ve `PIPELINE_COMPLETION`'ı çağıran adsız bir iş akışı. İşte birbirleriyle nasıl ilişkili olduklarının bir diyagramı: @@ -1421,9 +1426,9 @@ Bu dosyayı açıp aşağı kaydırırsak, bu kod bloğuna geliriz: versions = ch_versions ``` -Bu, samplesheet'i ayrıştıran ve HELLO iş akışı tarafından tüketilmeye hazır bir biçimde ileten kanal fabrikasıdır. +Bu, samplesheet'i ayrıştıran ve `HELLO` iş akışı tarafından tüketilmeye hazır bir biçimde ileten kanal fabrikasıdır. -!!! note "Not" +!!! info "Bilgi" Yukarıdaki sözdizimi daha önce kullandığımızdan biraz farklı, ancak temelde bu: @@ -1532,7 +1537,7 @@ cp greetings.csv core-hello/assets/. === "Sonra" - ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6-10" + ```groovy title="core-hello/conf/test.config" linenums="21" hl_lines="6 8-10" params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' @@ -1594,13 +1599,53 @@ Ve bu arada, bunun çok basit makinelerde (Github Codespaces'teki minimal VM'ler Bu, yapmamız gereken kod değişikliklerini tamamlar. -### 5.4. Pipeline'ı test profiliyle çalıştırma +### 5.4. Parametre doğrulamasını devre dışı bırakma + +Şablonlu samplesheet ayrıştırmasını kendi basit kanal oluşturma kodumuza değiştirdik; ancak şablon, FASTQ tabanlı bir samplesheet'i tanımlayan `nextflow_schema.json` ve `assets/schema_input.json` dosyalarıyla birlikte gelmeye devam ediyor. +Bu şemaları henüz `greetings.csv` formatımıza uyarlamadığımız için, şimdilik parametre doğrulamasını kapatmamız gerekiyor (daha sonra düzgün şekilde kuracağız). + +`core-hello/nextflow.config` dosyasını açın ve `validate_params` değerini `false` olarak ayarlayın: + +=== "Sonra" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = false + ``` + +=== "Önce" + + ```groovy title="core-hello/nextflow.config" linenums="37" + validate_params = true + ``` + +Bunu komut satırı yerine yapılandırma dosyasında ayarlıyoruz; çünkü Nextflow 26.04 sürümünden itibaren komut satırında sağlanan tüm değerler string olarak yazılmaktadır. +Bu nedenle, Boolean parametreler gerçek bir `true`/`false` değeri alabilmek için bir yapılandırma dosyasında veya `-params-file` ile ayarlanmalıdır. + +Örneğin, burada `--validate_params false` kullanmak **string** `"false"` olarak değerlendirilir ve doğrulama açık kalmaya devam eder. + +!!! tip "`nextflow.config` içindeki v2 ayrıştırıcı uyumluluk satırları" + + v2 sözdiziminden bahsetmişken, yapılandırma dosyasındaki `params` bloğunun hemen altında şu iki satırı fark edebilirsiniz: + + ```groovy + outputDir = params.outdir + workflow.output.mode = params.publish_dir_mode + ``` + + Bunlar, v2 sözdizimi ayrıştırıcısıyla uyumluluk için gereklidir. + + - v2 sözdiziminde, `params.*` değişkenleri süreç modüllerindeki `publishDir` yönergelerinde doğrudan referans alınamaz; bu nedenle `outputDir`, bu yönergelerin erişebileceği üst düzey bir yapılandırma değişkeni olarak burada tanımlanır. + + - `workflow.output.mode`, v2 iş akışı çıktı bloğu için varsayılan yayımlama modunu ayarlar. + + Her ikisi de nf-core pipeline şablonu tarafından otomatik olarak oluşturulur ve değiştirilmesi gerekmez. + +### 5.5. Pipeline'ı test profiliyle çalıştırma Bu çok şeydi, ancak sonunda pipeline'ı çalıştırmayı deneyebiliriz! -Henüz doğrulamayı kurmadığımız için komut satırına `--validate_params false` eklememiz gerektiğini unutmayın (bu daha sonra gelecek). ```bash -nextflow run core-hello --outdir core-hello-results -profile test,docker --validate_params false +nextflow run core-hello --outdir core-hello-results -profile test,docker ``` Tüm değişiklikleri doğru yaptıysanız, tamamlanana kadar çalışmalıdır. @@ -1608,9 +1653,9 @@ Tüm değişiklikleri doğru yaptıysanız, tamamlanana kadar çalışmalıdır. ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `core-hello/main.nf` [condescending_allen] DSL2 - revision: b9e9b3b8de + Launching `core-hello/main.nf` [voluminous_caravaggio] revision: d6bbba9521 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1622,10 +1667,10 @@ Tüm değişiklikleri doğru yaptıysanız, tamamlanana kadar çalışmalıdır. Generic options validate_params : false - trace_report_suffix : 2025-11-21_07-29-37 + trace_report_suffix : 2026-06-23_16-58-45 Core Nextflow options - runName : condescending_allen + runName : voluminous_caravaggio containerEngine : docker launchDir : /workspaces/training/hello-nf-core workDir : /workspaces/training/hello-nf-core/work @@ -1636,17 +1681,17 @@ Tüm değişiklikleri doğru yaptıysanız, tamamlanana kadar çalışmalıdır. !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ - executor > local (1) - [ed/727b7e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [45/bb6096] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [81/7e2e34] CORE_HELLO:HELLO:collectGreetings [100%] 1 of 1 ✔ - [96/9442a1] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ + executor > local (8) + [30/fc3bdb] CORE_HELLO:HELLO:sayHello (1) | 3 of 3 ✔ + [55/58b611] CORE_HELLO:HELLO:convertToUpper (1) | 3 of 3 ✔ + [12/83c0bc] CORE_HELLO:HELLO:collectGreetings | 1 of 1 ✔ + [18/4894fd] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` -Gördüğünüz gibi, başlatma alt iş akışı sayesinde başlangıçta tipik nf-core özeti üretildi ve her modül için satırlar artık tam PIPELINE:WORKFLOW:modül adlarını gösteriyor. +Gördüğünüz gibi, başlatma alt iş akışı sayesinde başlangıçta tipik nf-core özeti üretildi ve her modül için satırlar artık tam `PIPELINE:WORKFLOW:modül` adlarını gösteriyor. -### 5.5. Pipeline çıktılarını bulma +### 5.6. Pipeline çıktılarını bulma Şimdi soru şu: pipeline'ın çıktıları nerede? Ve cevap oldukça ilginç: sonuçlara bakmak için artık iki farklı yer var. @@ -1662,17 +1707,17 @@ tree core-hello-results ```console core-hello-results └── pipeline_info - ├── execution_report_2025-11-21_04-47-18.html - ├── execution_report_2025-11-21_07-29-37.html - ├── execution_timeline_2025-11-21_04-47-18.html - ├── execution_timeline_2025-11-21_07-29-37.html - ├── execution_trace_2025-11-21_04-47-18.txt - ├── execution_trace_2025-11-21_07-29-37.txt + ├── execution_report_2026-06-23_16-56-58.html + ├── execution_report_2026-06-23_16-58-45.html + ├── execution_timeline_2026-06-23_16-56-58.html + ├── execution_timeline_2026-06-23_16-58-45.html + ├── execution_trace_2026-06-23_16-56-58.txt + ├── execution_trace_2026-06-23_16-58-45.txt ├── hello_software_versions.yml - ├── params_2025-11-21_04-47-13.json - ├── params_2025-11-21_07-29-41.json - ├── pipeline_dag_2025-11-21_04-47-18.html - └── pipeline_dag_2025-11-21_07-29-37.html + ├── params_2026-06-23_16-57-00.json + ├── params_2026-06-23_16-58-47.json + ├── pipeline_dag_2026-06-23_16-56-58.html + └── pipeline_dag_2026-06-23_16-58-45.html 1 directory, 12 files ``` @@ -1682,7 +1727,7 @@ Bu sefer beklendiği gibi çalıştırılan tüm görevleri görüyorsunuz. ![Hello pipeline'ı için yürütme zaman çizelgesi raporu](./img/execution_timeline_hello.png) -!!! note "Not" +!!! info "Bilgi" Bir kez daha görevler paralel olarak çalıştırılmadı çünkü Github Codespaces'te minimalist bir makinede çalışıyoruz. Bunların paralel çalıştığını görmek için, codespace'inizin CPU tahsisini ve test yapılandırmasındaki kaynak limitlerini artırmayı deneyin. diff --git a/docs/tr/docs/hello_nf-core/03_use_module.md b/docs/tr/docs/hello_nf-core/03_use_module.md index 395ed9c826..da8df0850b 100644 --- a/docs/tr/docs/hello_nf-core/03_use_module.md +++ b/docs/tr/docs/hello_nf-core/03_use_module.md @@ -25,7 +25,7 @@ Bunun nasıl çalıştığını göstermek için, `core-hello` pipeline'ındaki Aşağıdaki komutu çalıştırarak başarıyla çalıştığını test edebilirsiniz: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -50,7 +50,7 @@ Web tarayıcınızda modüller sayfasına gidin ve 'concatenate' aramak için ar Gördüğünüz gibi, birçok sonuç var ve bunların çoğu çok spesifik dosya türlerini birleştirmek için tasarlanmış modüller. Bunlar arasında, genel amaçlı olan `find_concatenate` adlı bir modül görmelisiniz. -!!! note "Modül adlandırma kuralı" +!!! info "Modül adlandırma kuralı" Alt çizgi (`_`) karakteri, modül adlarında eğik çizgi (`/`) karakterinin yerine kullanılır. @@ -120,9 +120,11 @@ Bu, modül hakkında girdileri, çıktıları ve temel kullanım bilgileri dahil | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re + INFO Reinstalling modules found in 'modules.json' but missing from + directory: ╭─ Module: find/concatenate ──────────────────────────────────────────────────╮ │ 🌐 Repository: https://github.com/nf-core/modules.git │ │ 🔧 Tools: find, pigz │ @@ -186,6 +188,8 @@ Bu, modül hakkında girdileri, çıktıları ve temel kullanım bilgileri dahil Bu, web sitesinde bulabileceğiniz bilgilerin tamamen aynısıdır. +`INFO Reinstalling modules found in 'modules.json' but missing from directory` mesajını görmezden gelebilirsiniz; bu mesaj, nf-core/tools 4.0.2 tarafından `info` ile sorguladığınız her modül için, kurulu olup olmadığından bağımsız olarak yayınlanır ve `info` komutu herhangi bir dosya yazmadığından hiçbir etkisi yoktur. + ### 1.4. find/concatenate modülünü kurma Artık istediğimiz modülü bulduğumuza göre, onu pipeline'ımızın kaynak koduna eklememiz gerekiyor. @@ -193,15 +197,13 @@ Artık istediğimiz modülü bulduğumuza göre, onu pipeline'ımızın kaynak k İyi haber şu ki nf-core projesi bunu kolaylaştıran bazı araçlar içeriyor. Özellikle, `nf-core modules install` komutu, kodu almayı ve projenizde kullanılabilir hale getirmeyi tek adımda otomatikleştirmeyi mümkün kılar. -Pipeline dizininize gidin ve kurulum komutunu çalıştırın: +Geçerli çalışma dizininizin `core-hello` pipeline projesinin kök dizini olduğundan emin olun ve ardından kurulum komutunu çalıştırın: ```bash cd core-hello nf-core modules install find/concatenate ``` -Araç modülü kurmaya devam edecektir. - ??? success "Komut çıktısı" ```console @@ -212,26 +214,20 @@ Araç modülü kurmaya devam edecektir. | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO Installing 'find/concatenate' - INFO Use the following statement to include this module: - - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' + NotADirectoryError: [Errno 20] Not a directory: + 'modules/local/cowpy.nf/meta.yml' ``` -Komut otomatik olarak: - -- Modül dosyalarını `modules/nf-core/find/concatenate/` dizinine indirir -- Kurulu modülü izlemek için `modules.json` dosyasını günceller -- Workflow'unuzda kullanmak için doğru `include` ifadesini size sağlar - -!!! tip "İpucu" - - Modül kurulum komutunu çalıştırmadan önce geçerli çalışma dizininizin pipeline projenizin kök dizini olduğundan emin olun. +Komut, modül dosyalarını `modules/nf-core/find/concatenate/` dizinine indirir ve kurulu modülü izlemek için `modules.json` dosyasını günceller. +Sondaki `NotADirectoryError` hatasını görmezden gelebilirsiniz; bu hata, nf-core/tools 4.0.2'nin her yerel modülün kendi dizininde (`modules/local//main.nf`) bulunmasını beklemesinden kaynaklanır; oysa `core-hello` bu aşamada hâlâ tek dosyalı yerel modüller kullanmaktadır. +Bununla birlikte, `find/concatenate` modülü doğru şekilde kurulur ve `modules.json` beklendiği gibi güncellenir. +`cowpy`'yi dizin düzenine Bölüm 4'te dönüştüreceğiz. -Modülün doğru şekilde kurulduğunu kontrol edelim: +Modül dosyalarının yerinde olduğunu kontrol edelim: ```bash tree -L 4 modules @@ -257,7 +253,61 @@ tree -L 4 modules 5 directories, 7 files ``` -Ayrıca nf-core yardımcı programına yerel olarak kurulu modülleri listelemesini söyleyerek kurulumu doğrulayabilirsiniz: +Kurulumu, artık nf-core/modules deposu altında `find/concatenate`'i listeleyen `modules.json` dosyasını inceleyerek de doğrulayabilirsiniz. + +??? abstract "Dosya içeriği" + + ```json title="modules.json" + { + "name": "core/hello", + "homePage": "https://github.com/core/hello", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "find/concatenate": { + "branch": "master", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "a3fb7351b1fdb2b1de282b765816bbea190e86a8", + "installed_by": [ + "subworkflows" + ] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] + } + } + } + } + } + } + ``` + +Bu, `find/concatenate` modülünün artık projenizin kaynak kodunun bir parçası olduğunu doğrular. +Ancak, yeni modülü gerçekten kullanmak için onu pipeline'ımıza aktarmamız gerekiyor. + +Son olarak, pipeline'ınızda şu anda hangi modüllerin izlendiğini kontrol etmek için `nf-core modules list local` komutunu da kullanabilirsiniz. ```bash nf-core modules list local @@ -266,25 +316,27 @@ nf-core modules list local ??? success "Komut çıktısı" ```console + + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' + + nf-core/tools version 4.0.2 - https://nf-co.re + + INFO Repository type: pipeline INFO Modules installed in '.': - ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ - ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ - ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ - │ find/concaten… │ nf-core/modules │ 6d46786 │ Support for │ 2026-04-23 │ - │ │ │ │ apptainer as │ │ - │ │ │ │ well as │ │ - │ │ │ │ singularity │ │ - │ │ │ │ for .sif in │ │ - │ │ │ │ `container` │ │ - │ │ │ │ (#11260) │ │ - └────────────────┴─────────────────┴─────────────┴────────────────┴────────────┘ + ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ + ┃ Module Name ┃ Repository ┃ Version SHA ┃ Message ┃ Date ┃ + ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ + │ find/concatenate │ nf-core/modules │ 6d46786 │ Support for apptainer as well as singularity for .sif in `container` (#11260) │ 2026-04-23 │ + └──────────────────┴─────────────────┴─────────────┴───────────────────────────────────────────────────────────────────────────────┴────────────┘ ``` -Bu, `find/concatenate` modülünün artık projenizin kaynak kodunun bir parçası olduğunu doğrular. - -Ancak, yeni modülü gerçekten kullanmak için onu pipeline'ımıza aktarmamız gerekiyor. +Bu tablo, `find/concatenate` modülünü deposu, sürüm SHA'sı, mesajı ve tarihi ile birlikte gösterir. ### 1.5. Modül içe aktarmalarını güncelleme @@ -302,7 +354,7 @@ nf-core kuralının modülleri içe aktarırken büyük harf kullanmak olduğunu === "Sonra" - ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="11" + ```groovy title="core-hello/workflows/hello.nf" linenums="1" hl_lines="10" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS @@ -312,8 +364,8 @@ nf-core kuralının modülleri içe aktarırken büyük harf kullanmak olduğunu include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { sayHello } from '../modules/local/sayHello.nf' include { convertToUpper } from '../modules/local/convertToUpper.nf' + include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' include { cowpy } from '../modules/local/cowpy.nf' - include { FIND_CONCATENATE } from '../modules/nf-core/find/concatenate/main' ``` === "Önce" @@ -345,7 +397,7 @@ Bu noktada, koda dalıp düzenlemeye başlamak cazip gelebilir; ancak yeni modü Bunu ayrı bir bölüm olarak ele alacağız çünkü henüz ele almadığımız yeni bir mekanizma içeriyor: metadata map'leri (metamap'ler). -!!! note "Not" +!!! info "Bilgi" İsteğe bağlı olarak `collectGreetings.nf` dosyasını silebilirsiniz: @@ -355,7 +407,7 @@ Bunu ayrı bir bölüm olarak ele alacağız çünkü henüz ele almadığımız Ancak, yerel ve nf-core modülleri arasındaki farkları anlamak için referans olarak saklamak isteyebilirsiniz. -### Özet +### Özetle Bir nf-core modülünü nasıl bulacağınızı ve projenizde kullanılabilir hale getireceğinizi biliyorsunuz. @@ -373,7 +425,7 @@ Bu, yeni modülü doğrudan yerine geçecek bir modül olarak kullanıp kullanam İdeal olarak bu, modülü kurmadan _önce_ yapmanız gereken bir şeydir; ama hiç olmamasından iyidir. (Değeri bilinsin ki, artık istemediğinize karar verdiğiniz modüllerden kurtulmak için bir `uninstall` komutu vardır.) -!!! note "Not" +!!! info "Bilgi" FIND_CONCATENATE süreci, farklı sıkıştırma türleri, dosya uzantıları ve benzerleri ile ilgili oldukça akıllı bir işleme içerir; bunlar burada size göstermeye çalıştığımız şeyle doğrudan alakalı değil, bu yüzden çoğunu görmezden geleceğiz ve yalnızca önemli olan kısımlara odaklanacağız. @@ -512,7 +564,7 @@ Daha önce de belirtildiği gibi, `tuple val(meta), path(files_in)` girdi kurulu Umarım bunun ne kadar yararlı olabileceğini görmeye başlıyorsunuzdur. Sadece metadata'ya göre çıktıları adlandırmanıza izin vermekle kalmaz; aynı zamanda farklı parametre değerlerini uygulamak gibi şeyler de yapabilirsiniz ve belirli operatörlerle kombinasyon halinde, pipeline üzerinden akarken verileri gruplayabilir, sıralayabilir veya filtreleyebilirsiniz. -!!! note "Metadata hakkında daha fazla bilgi" +!!! info "Metadata hakkında daha fazla bilgi" Nextflow workflow'larında metadata ile çalışma hakkında, samplesheet'lerden metadata okuma ve işlemeyi özelleştirmek için nasıl kullanılacağı dahil olmak üzere kapsamlı bir giriş için [Workflow'larda metadata](../side_quests/metadata/index.md) yan görevine bakın. @@ -527,7 +579,7 @@ Sadece metadata'ya göre çıktıları adlandırmanıza izin vermekle kalmaz; ay Bu işe yaramalı! Artık bir planımız olduğuna göre, dalmaya hazırız. -### Özet +### Özetle Yeni bir modülün girdi ve çıktı arayüzünü gereksinimlerini belirlemek için nasıl değerlendireceğinizi biliyorsunuz; ayrıca metamap'lerin nf-core pipeline'ları tarafından metadata'yı pipeline üzerinden akarken verilerle yakından ilişkili tutmak için nasıl kullanıldığını öğrendiniz. @@ -543,7 +595,7 @@ Artık metamap'ler hakkında her şeyi bildiğinize göre (veya en azından bu k Netlik adına, bunu parçalara ayıracağız ve her adımı ayrı ayrı ele alacağız. -!!! note "Not" +!!! info "Bilgi" Aşağıda gösterilen tüm değişiklikler `core-hello/workflows/hello.nf` workflow dosyasındaki `main` bloğundaki workflow mantığına yapılır. @@ -570,8 +622,8 @@ Bu satırları `convertToUpper` çağrısından sonra ekleyelim ve `collectGreet === "Sonra" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // bir selamlama yayınla + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) // selamlamayı büyük harfe dönüştür @@ -586,8 +638,8 @@ Bu satırları `convertToUpper` çağrısından sonra ekleyelim ve `collectGreet === "Önce" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="7-8" - // bir selamlama yayınla + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="7-8" + // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) // selamlamayı büyük harfe dönüştür @@ -608,8 +660,8 @@ Ardından, dosya kanalını metadata ve dosyalar içeren demet kanalına dönü === "Sonra" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="10-11" - // bir selamlama yayınla + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="10-11" + // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) // selamlamayı büyük harfe dönüştür @@ -627,8 +679,8 @@ Ardından, dosya kanalını metadata ve dosyalar içeren demet kanalına dönü === "Önce" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // bir selamlama yayınla + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) // selamlamayı büyük harfe dönüştür @@ -654,8 +706,8 @@ Eklediğimiz satır iki şey başarır: === "Sonra" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="13-14" - // bir selamlama yayınla + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="13-14" + // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) // selamlamayı büyük harfe dönüştür @@ -676,8 +728,8 @@ Eklediğimiz satır iki şey başarır: === "Önce" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" - // bir selamlama yayınla + ```groovy title="core-hello/workflows/hello.nf" linenums="29" + // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) // selamlamayı büyük harfe dönüştür @@ -704,8 +756,8 @@ Ancak, `FIND_CONCATENATE` süreci çıktı dosyasına ek olarak metamap'i de iç === "Sonra" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="16-17 20" - // bir selamlama yayınla + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="16-17 20" + // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) // selamlamayı büyük harfe dönüştür @@ -729,8 +781,8 @@ Ancak, `FIND_CONCATENATE` süreci çıktı dosyasına ek olarak metamap'i de iç === "Önce" - ```groovy title="core-hello/workflows/hello.nf" linenums="26" hl_lines="17" - // bir selamlama yayınla + ```groovy title="core-hello/workflows/hello.nf" linenums="29" hl_lines="17" + // bir selamlama yayınla (samplesheet'ler için nf-core kuralını kullanacak şekilde güncellendi) sayHello(ch_samplesheet) // selamlamayı büyük harfe dönüştür @@ -753,7 +805,7 @@ Ancak, `FIND_CONCATENATE` süreci çıktı dosyasına ek olarak metamap'i de iç Ardından o son satırda `collectGreetings.out.outfile` yerine `ch_for_cowpy`'yi `cowpy`'ye iletmek yeterlidir. -!!! note "Not" +!!! info "Bilgi" Kursun sonraki bölümünde, `cowpy`'yi doğrudan metadata demetleriyle çalışacak şekilde güncelleyeceğiz; böylece bu çıkarma adımı artık gerekli olmayacak. @@ -762,7 +814,7 @@ Ardından o son satırda `collectGreetings.out.outfile` yerine `ch_for_cowpy`'yi Workflow'un yeni entegre edilen `find/concatenate` modülüyle çalıştığını test edelim: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` Bu makul bir hızda çalışmalıdır. @@ -770,47 +822,47 @@ Bu makul bir hızda çalışmalıdır. ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 - - Launching `./main.nf` [evil_pike] DSL2 - revision: b9e9b3b8de - - Input/output options - input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv - outdir : core-hello-results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function - - Generic options - validate_params : false - trace_report_suffix : 2025-10-30_18-50-58 - - Core Nextflow options - runName : evil_pike - containerEngine : docker - launchDir : /workspaces/training/hello-nf-core/core-hello - workDir : /workspaces/training/hello-nf-core/core-hello/work - projectDir : /workspaces/training/hello-nf-core/core-hello - userName : root - profile : test,docker - configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config - - !! Only displaying parameters that differ from the pipeline defaults !! - ------------------------------------------------------ - executor > local (8) - [b3/f005fd] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [08/f923d0] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [34/3729a9] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [24/df918a] CORE_HELLO:HELLO:cowpy [100%] 1 of 1 ✔ - -[core/hello] Pipeline completed successfully- + N E X T F L O W ~ version 26.04.4 + + Launching `./main.nf` [cheesy_bhabha] revision: d6bbba9521 + + Input/output options + input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv + outdir : core-hello-results + + Institutional config options + config_profile_name : Test profile + config_profile_description: Minimal test dataset to check pipeline function + + Generic options + validate_params : false + trace_report_suffix : 2026-06-23_16-55-02 + + Core Nextflow options + runName : cheesy_bhabha + containerEngine : docker + launchDir : /workspaces/training/hello-nf-core/core-hello + workDir : /workspaces/training/hello-nf-core/core-hello/work + projectDir : /workspaces/training/hello-nf-core/core-hello + userName : root + profile : test,docker + configFiles : /workspaces/training/hello-nf-core/core-hello/nextflow.config + + !! Only displaying parameters that differ from the pipeline defaults !! + ------------------------------------------------------ + executor > local (8) + [bf/aa86d7] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [0a/df448e] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [82/ded72f] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [9d/0130bf] CORE_HELLO:HELLO:cowpy | 1 of 1 ✔ + -[core/hello] Pipeline completed successfully- ``` Süreç yürütme listesinde `collectGreetings` yerine artık `FIND_CONCATENATE`'in göründüğünü fark edin. Ve hepsi bu kadar! Artık pipeline'daki bu adım için özel prototip düzeyinde kod yerine sağlam, topluluk tarafından düzenlenen bir modül kullanıyoruz. -### Özet +### Özetle Artık nasıl yapılacağını biliyorsunuz: diff --git a/docs/tr/docs/hello_nf-core/04_make_module.md b/docs/tr/docs/hello_nf-core/04_make_module.md index b1800b537a..8ff340140f 100644 --- a/docs/tr/docs/hello_nf-core/04_make_module.md +++ b/docs/tr/docs/hello_nf-core/04_make_module.md @@ -24,7 +24,7 @@ Bundan sonra, gelecekte daha verimli çalışmak için şablon tabanlı modül o Başarıyla çalıştığını test etmek için aşağıdaki komutu çalıştırabilirsiniz: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -94,14 +94,14 @@ Başlayalım! === "Sonra" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Generate ASCII art with cowpy (https://github.com/jeffbuttars/cowpy) process COWPY { ``` === "Önce" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="3" hl_lines="2" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="1" hl_lines="2" // Generate ASCII art with cowpy (https://github.com/jeffbuttars/cowpy) process cowpy { ``` @@ -164,7 +164,7 @@ Süreç çağrılarını güncellemek zorunda kalmamak için import ifadesinde b // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -208,7 +208,7 @@ Süreç çağrılarını güncellemek zorunda kalmamak için import ifadesinde b // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -247,15 +247,15 @@ Süreç çağrılarını güncellemek zorunda kalmamak için import ifadesinde b Bu değişikliklerden sonra her şeyin doğru çalıştığını test etmek için iş akışını çalıştıralım. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [elegant_plateau] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [elegant_plateau] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -315,7 +315,7 @@ Tüm bunları yaptıktan sonra, her şeyin daha önce olduğu gibi çalıştığ === "Sonra" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: tuple val(meta), path(input_file) val character @@ -326,7 +326,7 @@ Tüm bunları yaptıktan sonra, her şeyin daha önce olduğu gibi çalıştığ === "Önce" - ```groovy title="core-hello/modules/local/cowpy.nf" linenums="11" hl_lines="2 6" + ```groovy title="core-hello/modules/local/cowpy.nf" linenums="9" hl_lines="2 6" input: path input_file val character @@ -395,17 +395,17 @@ Bu teknik olarak zorunlu değil; ancak mümkün olduğunda adlandırılmış ç Bu değişikliklerden sonra her şeyin doğru çalıştığını test etmek için iş akışını çalıştıralım. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [modest_saha] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [modest_saha] revision: b9e9b3b8de - Downloading plugin nf-schema@2.5.1 + Downloading plugin nf-schema@2.7.2 Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv outdir : core-hello-results @@ -431,10 +431,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [a8/447993] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [b7/092f2b] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [a8/447993] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [00/1fc59c] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [57/ac800d] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [b7/092f2b] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -533,7 +533,7 @@ Hadi yapalım. Sonuç olarak, modül arayüzü artık daha basit: yalnızca temel metadata ve dosya girdilerini bekliyor. -!!! note "Not" +!!! info "Bilgi" `?:` operatörü genellikle "Elvis operatörü" olarak adlandırılır; çünkü yanal olarak Elvis Presley yüzüne benzer; `?` karakteri saçındaki dalgayı simgeler. @@ -623,15 +623,15 @@ Modül arayüzü minimal tutularak daha taşınabilir hale getirilirken, iş hat Daha... gizemli seçeneklerden biri olan `kosh` kullanarak bu komutu çalıştırın: ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false --character kosh +nextflow run . --outdir core-hello-results -profile test,docker --character kosh ``` ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [exotic_planck] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [exotic_planck] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -658,10 +658,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [38/eb29ea] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [13/9e3c0e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [e2/5b0ee5] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b6/4fb569] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [38/eb29ea] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -677,16 +677,16 @@ cat work/38/eb29ea*/cowpy-test.txt ??? success "Komut çıktısı" ```console - _________ - / HELLO \ - | HOLA | - \ BONJOUR / - --------- - \ + _________ + / BONJOUR \ + | HELLO | + \ HOLA / + --------- \ + \ \ ___ _____ ___ - / \ / /| / \ + / \ / /| / \ | | / / | | | | | /____/ | | | | | | | | | | @@ -731,7 +731,7 @@ Bu yaklaşımın faydalarını özetlemek gerekirse: - **Taşınabilirlik**: Modüller sabit kodlanmış araç seçenekleri olmadan yeniden kullanılabilir - **İş akışı değişikliği yok**: Araç seçeneklerini eklemek veya değiştirmek iş akışı kodunu güncellemeyi gerektirmez -!!! note "Not" +!!! info "Bilgi" `ext.args` sistemi, burada ele alınmayan, metadata'ya göre argüman değerlerini dinamik olarak değiştirme dahil olmak üzere güçlü ek yeteneklere sahiptir. Daha fazla ayrıntı için [nf-core modül spesifikasyonlarına](https://nf-co.re/docs/guidelines/components/modules) bakın. @@ -841,15 +841,15 @@ Merak ediyorsanız, `ext.prefix` closure'ı doğru metadata parçasına erişime İş akışının hâlâ beklendiği gibi çalıştığını test edelim. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [admiring_turing] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [admiring_turing] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -876,10 +876,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [b2/e08524] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [a3/c6cbe9] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [b2/e08524] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [13/88939f] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [23/4554e1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [a3/c6cbe9] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -978,15 +978,15 @@ Bu kadar! Şimdi iş hattını çalıştırırsak ne olacağına bakalım. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_caravaggio] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_caravaggio] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1013,10 +1013,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [db/39978e] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [46/5839d6] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [db/39978e] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [b5/bf6a8d] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [b7/c61842] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [46/5839d6] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1057,7 +1057,7 @@ Mevcut çalışma dizininize bir göz atın. Nextflow'un iş akışı ve modül adlarına göre bu dizin hiyerarşisini oluşturduğunu görebilirsiniz. -!!! note "Not" +!!! info "Bilgi" `pipeline_info/` dizininde `hello_software_versions.yml` dosyasını fark edebilirsiniz. Şu anda yalnızca `FIND_CONCATENATE`'ten gelen sürüm bilgilerini içeriyor; çünkü `COWPY` henüz kendi sürümünü raporlamıyor. @@ -1100,7 +1100,7 @@ Varsayılan `publishDir` yönergesini geçersiz kılmak için, `conf/modules.con Örneğin, `withName:` seçicisini kullanarak tek bir süreç için varsayılanı geçersiz kılabilirsiniz; bu örnekte `COWPY` süreci için özel bir `publishDir` yönergesi ekliyoruz. -```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="8-10" +```groovy title="core-hello/conf/modules.config" linenums="13" hl_lines="10-12" process { publishDir = [ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, @@ -1162,23 +1162,23 @@ Script bloğunda herhangi bir değişiklik gerekmez — sürüm, output bloğund #### 1.6.2. İş hattını çalıştırma ve sürüm raporunu inceleme ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [silly_fermat] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [silly_fermat] revision: b9e9b3b8de ... executor > local (8) - [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [3c/f20b54] CORE_HELLO:HELLO:COWPY [100%] 1 of 1 ✔ + [8d/f3a091] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [2e/b5c742] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [6a/d9e183] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [3c/f20b54] CORE_HELLO:HELLO:COWPY | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -1191,11 +1191,14 @@ FIND_CONCATENATE: coreutils: 9.4 find: 4.6.0 pigz: 2.8 +Workflow: + core/hello: v1.0.0dev + Nextflow: 26.04.4 ``` -İş akışı tarafındaki koleksiyon — Bölüm 2'deki yer tutucu iş akışında gördüğünüz `Channel.topic("versions")` bloğu — topic'e abone olur ve bu birleşik raporu otomatik olarak yazar. +İş akışı tarafındaki koleksiyon — Bölüm 2'deki yer tutucu iş akışında gördüğünüz `channel.topic("versions")` bloğu — topic'e abone olur ve bu birleşik raporu otomatik olarak yazar. -!!! note "Geriye dönük uyumluluk" +!!! info "Geriye dönük uyumluluk" İş akışının topic channel bloğundaki `versions_file` dalı, henüz `topic: versions` kullanacak şekilde güncellenmemiş ve hâlâ script bloğunda `emit: versions` ile bir `versions.yml` dosyası yazan modülleri işlemek için mevcuttur. Her iki stil de geçiş sürecinde eş zamanlı olarak desteklenmektedir. @@ -1285,16 +1288,16 @@ process COWPY { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: tuple val(meta), path(input) // Desen 1: Metadata demetleri ✓ output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions, emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions, emit: versions_cowpy when: task.ext.when == null || task.ext.when @@ -1363,20 +1366,20 @@ Varsayılan kod Docker ve Singularity arasında geçiş yapmayı sunar; ancak bu === "Önce" - ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6" + ```groovy title="modules/local/cowpy/main.nf" linenums="3" hl_lines="6-8" process COWPY { tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'biocontainers/YOUR-TOOL-HERE' }" + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" ``` #### 2.2.2. Conda ortamı -Conda ortamı için, modül kodu `conda "${moduleDir}/environment.yml"` belirtir; bu da `environment.yml` dosyasında yapılandırılması gerektiği anlamına gelir. +Conda ortamı için, modül kodu `#!groovy conda "${moduleDir}/environment.yml"` belirtir; bu da `environment.yml` dosyasında yapılandırılması gerektiği anlamına gelir. Modül oluşturma aracı, Bioconda'da (biyoinformatik araçları için birincil kanal) `cowpy` paketini bulamadığını bize bildirdi. Ancak `cowpy` conda-forge'da mevcuttur; bu yüzden `environment.yml` dosyasını şu şekilde tamamlayabilirsiniz: @@ -1428,7 +1431,7 @@ Girdi ve çıktı bloklarını güncelleyin: === "Sonra" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input_file) @@ -1439,13 +1442,13 @@ Girdi ve çıktı bloklarını güncelleyin: === "Önce" - ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5" + ```groovy title="modules/local/cowpy/main.nf" linenums="8" hl_lines="2 5 6" input: tuple val(meta), path(input) output: tuple val(meta), path("*"), emit: output - tuple val("${task.process}"), val('cowpy'), val("1.1.5"), topic: versions , emit: versions_cowpy + tuple val("${task.process}"), val('cowpy'), eval("cowpy --version"), topic: versions , emit: versions_cowpy ``` Bu şunları belirtir: @@ -1453,6 +1456,7 @@ Bu şunları belirtir: - Girdi dosyası parametre adı (genel `input` yerine `input_file`) - Yapılandırılabilir önek desenini kullanan çıktı dosya adı (joker `*` yerine `#!groovy ${prefix}.txt`) - Açıklayıcı bir emit adı (genel `output` yerine `cowpy_output`) +- Şablonun `#!groovy eval("cowpy --version")` ifadesi yerine statik bir sürüm string'i (`#!groovy val("1.1.5")`); bu, Bölüm 1.6'daki manuel modülle eşleşir (`cowpy` aracı `--version` bayrağını desteklememektedir) Sözdizimini doğrulamak için Nextflow dil sunucusu kullanıyorsanız, `#!groovy ${prefix}` kısmı bu aşamada hata olarak işaretlenecektir; çünkü henüz script bloğuna eklemedik. Şimdi buna geçelim. @@ -1517,7 +1521,7 @@ Bu gizemli görünüyorsa çok endişelenmeyin; bunu bütünlük açısından da === "Önce" - ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3" + ```groovy title="modules/local/cowpy/main.nf" linenums="27" hl_lines="3 6" stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -1576,15 +1580,15 @@ Ortam kurulumunu (bölüm 2.2), girdiler/çıktılar (bölüm 2.3.1), script blo Test etmek için iş hattını çalıştıralım. ```bash -nextflow run . --outdir core-hello-results -profile test,docker --validate_params false +nextflow run . --outdir core-hello-results -profile test,docker ``` ??? success "Komut çıktısı" ```console hl_lines="33" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [prickly_neumann] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [prickly_neumann] revision: b9e9b3b8de Input/output options input : /workspaces/training/hello-nf-core/core-hello/assets/greetings.csv @@ -1611,10 +1615,10 @@ nextflow run . --outdir core-hello-results -profile test,docker --validate_param !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ executor > local (8) - [e9/008ede] CORE_HELLO:HELLO:sayHello (3) [100%] 3 of 3 ✔ - [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) [100%] 3 of 3 ✔ - [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) [100%] 1 of 1 ✔ - [11/8e082f] CORE_HELLO:HELLO:COWPY (test) [100%] 1 of 1 ✔ + [e9/008ede] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [f0/d70cfe] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [be/0ecc58] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ + [11/8e082f] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` diff --git a/docs/tr/docs/hello_nf-core/05_input_validation.md b/docs/tr/docs/hello_nf-core/05_input_validation.md index 3911e16179..42bfdccaea 100644 --- a/docs/tr/docs/hello_nf-core/05_input_validation.md +++ b/docs/tr/docs/hello_nf-core/05_input_validation.md @@ -20,7 +20,7 @@ Bu Hello nf-core eğitim kursunun beşinci bölümünde, pipeline girdi ve param Başarılı bir şekilde çalıştığını aşağıdaki komutu çalıştırarak test edebilirsiniz: ```bash - nextflow run . --outdir core-hello-results -profile test,docker --validate_params false + nextflow run . --outdir core-hello-results -profile test,docker ``` --- @@ -84,7 +84,7 @@ nf-schema, kullanımdan kaldırılmış nf-validation eklentisinin halefidir ve ```groovy plugins { - id 'nf-schema@2.1.1' + id 'nf-schema@2.7.2' } ``` @@ -142,23 +142,40 @@ Doğrulama, herhangi bir pipeline süreci çalışmadan **önce** gerçekleşmel Pipeline'ımıza parametre doğrulaması ekleyerek başlayalım. Bu, `--input`, `--outdir` ve `--batch` gibi komut satırı bayraklarını doğrular. -### 1.1. Doğrulamayı girdi dosyası doğrulamasını atlayacak şekilde yapılandırın +### 1.1. Doğrulamayı etkinleştirin ve girdi dosyası doğrulamasını atlayın nf-core pipeline şablonu nf-schema ile birlikte gelir ve zaten kurulmuş ve yapılandırılmıştır: - nf-schema eklentisi `nextflow.config` içindeki `plugins{}` bloğu aracılığıyla kurulur -- Parametre doğrulaması varsayılan olarak `params.validate_params = true` aracılığıyla etkinleştirilir +- Parametre doğrulaması `params.validate_params` tarafından kontrol edilir - Doğrulama, pipeline başlatma sırasında `UTILS_NFSCHEMA_PLUGIN` alt iş akışı tarafından gerçekleştirilir -Doğrulama davranışı `nextflow.config` içindeki `validation{}` kapsamı aracılığıyla kontrol edilir. +Bölüm 3 ve 4'te herhangi bir şema yapılandırmadan önce pipeline'ın çalışabilmesi için `validate_params = false` olarak ayarladık. +Artık doğrulama eklemeye hazır olduğumuza göre, ilk adım bunu açmaktır. -İlk olarak parametre doğrulaması üzerinde çalışacağımız (bu bölüm) ve girdi verisi şemasını bölüm 2'ye kadar yapılandırmayacağımız için, geçici olarak nf-schema'ya `input` parametresinin dosya içeriğini doğrulamayı atlamasını söylememiz gerekiyor. +`nextflow.config` dosyasını açın ve `validate_params` parametresini bulun (yaklaşık 37. satır), ardından `true` olarak ayarlayın: -`nextflow.config` dosyasını açın ve `validation` bloğunu bulun (yaklaşık 247. satır). Girdi dosyası doğrulamasını atlamak için `ignoreParams` ekleyin: +=== "Sonra" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = true + ``` + +=== "Önce" + + ```groovy title="nextflow.config" hl_lines="1" linenums="37" + validate_params = false + ``` + +Doğrulama davranışının kendisi `nextflow.config` içindeki `validation{}` kapsamı aracılığıyla kontrol edilir. + +İlk olarak parametre doğrulaması üzerinde çalışacağımız (bu bölüm) ve girdi verisi şemasını bölüm 2'ye kadar yapılandırmayacağımız için, geçici olarak nf-schema'ya `input` parametresinin dosya içeriğini doğrulamayı atlamasını da söylememiz gerekiyor. + +`validation` bloğunu bulun (yaklaşık 252. satır) ve girdi dosyası doğrulamasını atlamak için `ignoreParams` ekleyin: === "Sonra" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -168,7 +185,7 @@ Doğrulama davranışı `nextflow.config` içindeki `validation{}` kapsamı arac === "Önce" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -181,7 +198,7 @@ Bu yapılandırma nf-schema'ya şunları söyler: - **`ignoreParams`**: `input` parametresinin dosya içeriğinin doğrulamasını atla (geçici; bunu bölüm 2'de yeniden etkinleştireceğiz) - **`monochromeLogs`**: `true` olarak ayarlandığında doğrulama mesajlarında renkli çıktıyı devre dışı bırak (`params.monochrome_logs` tarafından kontrol edilir) -!!! note "Input parametresi neden yok sayılıyor?" +!!! info "Input parametresi neden yok sayılıyor?" `nextflow_schema.json` içindeki `input` parametresi, `"schema": "assets/schema_input.json"` içerir; bu da nf-schema'ya girdi CSV dosyasının *içeriğini* bu şemaya karşı doğrulamasını söyler. Bu şemayı henüz yapılandırmadığımız için, bu doğrulamayı geçici olarak yok sayıyoruz. @@ -263,7 +280,7 @@ nf-core pipelines schema build | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 3.5.2 - https://nf-co.re + nf-core/tools version 4.0.2 - https://nf-co.re INFO [✓] Default parameters match schema validation INFO [✓] Pipeline schema looks valid (found 17 params) @@ -310,32 +327,32 @@ grep -A 25 '"input_output_options"' nextflow_schema.json ``` ```json title="core-hello/nextflow_schema.json (excerpt)" linenums="8" hl_lines="19-23" - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir", "batch"], - "properties": { - "input": { - "type": "string", - "format": "file-path", - "exists": true, - "schema": "assets/schema_input.json", - "mimetype": "text/csv", - "pattern": "^\\S+\\.csv$", - "description": "Path to comma-separated file containing information about the samples in the experiment.", - "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", - "fa_icon": "fas fa-file-csv" - }, - "batch": { - "type": "string", - "description": "Name for this batch of greetings", - "fa_icon": "fas fa-layer-group" - }, + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir", "batch"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "batch": { + "type": "string", + "description": "Name for this batch of greetings", + "fa_icon": "fas fa-layer-group" + }, ``` -`batch` parametresinin şemaya eklendiğini ve "required" alanının artık `["input", "outdir", "batch"]` gösterdiğini görmelisiniz. +`batch` parametresinin şemaya eklendiğini ve `required` alanının artık `["input", "outdir", "batch"]` gösterdiğini görmelisiniz. ### 1.5. Parametre doğrulamasını test edin @@ -352,7 +369,7 @@ nextflow run . --outdir test-results -profile docker ```console ERROR ~ Validation of pipeline parameters failed! - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details The following invalid input values have been detected: * Missing required parameter(s): input, batch @@ -369,15 +386,15 @@ nextflow run . --input assets/greetings.csv --outdir results --batch my-batch -p ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [peaceful_wozniak] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [peaceful_wozniak] revision: b9e9b3b8de executor > local (8) - [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ - [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ - [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (test) | 1 of 1 ✔ - [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (test) | 1 of 1 ✔ + [de/a1b2c3] CORE_HELLO:HELLO:sayHello (3) | 3 of 3 ✔ + [4f/d5e6f7] CORE_HELLO:HELLO:convertToUpper (3) | 3 of 3 ✔ + [8a/b9c0d1] CORE_HELLO:HELLO:FIND_CONCATENATE (my-batch) | 1 of 1 ✔ + [e2/f3a4b5] CORE_HELLO:HELLO:COWPY (my-batch) | 1 of 1 ✔ -[core/hello] Pipeline completed successfully- ``` @@ -640,7 +657,7 @@ Artık girdi verisi şemasını yapılandırdığımıza göre, daha önce ekled === "Sonra" - ```groovy title="nextflow.config" linenums="247" + ```groovy title="nextflow.config" linenums="252" validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs @@ -649,7 +666,7 @@ Artık girdi verisi şemasını yapılandırdığımıza göre, daha önce ekled === "Önce" - ```groovy title="nextflow.config" hl_lines="3" linenums="247" + ```groovy title="nextflow.config" hl_lines="3" linenums="252" validation { defaultIgnoreParams = ["genomes"] ignoreParams = ['input'] @@ -666,7 +683,7 @@ Doğrulamanın hem geçerli hem de geçersiz girdilerle çalıştığını test #### 2.7.1. Geçerli girdi ile test edin İlk olarak, pipeline'ın geçerli girdi ile başarıyla çalıştığını onaylayın. -Doğrulama çalıştığı için artık `--validate_params false` kullanmamıza gerek olmadığını unutmayın! +`validate_params = true` olarak ayarlandığında ve girdi şeması yerinde olduğunda, hem parametre hem de girdi verisi doğrulaması artık gerçek anlamda çalışır. ```bash nextflow run . --outdir core-hello-results -profile test,docker @@ -734,9 +751,9 @@ nextflow run . --input assets/invalid_greetings.csv --outdir test-results -profi ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [trusting_ochoa] DSL2 - revision: b9e9b3b8de + Launching `./main.nf` [trusting_ochoa] revision: b9e9b3b8de Input/output options input : assets/invalid_greetings.csv diff --git a/docs/tr/docs/info/nxf_versions.md b/docs/tr/docs/info/nxf_versions.md index 1710ec1b7e..f31ec1ea7d 100644 --- a/docs/tr/docs/info/nxf_versions.md +++ b/docs/tr/docs/info/nxf_versions.md @@ -13,11 +13,12 @@ hide: Eğitim portalının 3.0 sürümü itibarıyla, kurs indeks sayfasında aksi belirtilmedikçe tüm eğitim kurslarımız Nextflow 25.10.2 veya daha yeni bir sürümle uyumludur. (Sürüm bildirimi içermeyebilecek kullanımdan kaldırılmış veya arşivlenmiş materyaller bu kapsam dışındadır.) -Eğitim ortamımızda varsayılan olarak yüklenen Nextflow sürümü **Nextflow 25.10.4**'tür. +Eğitim ortamımızda varsayılan olarak yüklenen Nextflow sürümü **Nextflow 26.04.4**'tür. Kurslar artık iş akışı düzeyinde tiplendirilmiş girdiler ve iş akışı düzeyinde çıktı yönergeleri kullandığından, **aksi belirtilmedikçe** V2 sözdizimi ayrıştırıcısının kullanılması gerekmektedir. +V2 ayrıştırıcısı, Nextflow 26.04 sürümünden itibaren varsayılan olarak etkindir; dolayısıyla yüklediğimiz sürümde bunu manuel olarak etkinleştirmenize gerek yoktur. [Github Codespaces](../envsetup/01_setup.md) veya [yerel devcontainer'lar](../envsetup/03_devcontainer.md) aracılığıyla sağladığımız ortamı kullanmayı planlıyorsanız, kurs talimatlarında özellikle belirtilmedikçe herhangi bir işlem yapmanıza gerek yoktur. -Ancak eğitimleri kendi ortamınızda ([Manuel kurulum](../envsetup/02_local.md)) tamamlamayı planlıyorsanız, v2 sözdizimi ayrıştırıcısı etkinleştirilmiş şekilde Nextflow 25.10.2 veya daha yeni bir sürümü kullandığınızdan emin olmanız gerekmektedir. +Ancak eğitimleri kendi ortamınızda ([Manuel kurulum](../envsetup/02_local.md)) tamamlamayı planlıyorsanız, Nextflow 25.10.2 veya daha yeni bir sürümü kullandığınızdan ve 26.04 öncesi bir sürümdeyseniz v2 sözdizimi ayrıştırıcısını etkinleştirdiğinizden emin olmanız gerekmektedir. ## Eğitim materyallerinin eski sürümleri @@ -40,7 +41,7 @@ Tüm modern Nextflow kodları DSL2 kullanmaktadır. v1 ayrıştırıcısı, özgün ve daha esnek ayrıştırıcıdır. v2 ayrıştırıcısı daha katıdır ve statik tipleme (tiplendirilmiş girdiler ve çıktılar) ile iş akışı düzeyinde çıktı yönergeleri gibi yeni dil özelliklerini etkinleştirir. v2 ayrıştırıcısı aynı zamanda daha iyi hata mesajları sağlar ve daha fazla hatayı çalışma zamanı yerine ayrıştırma aşamasında yakalar. -v2 ayrıştırıcısı, Nextflow 26.04'te varsayılan hale gelecektir. +v2 ayrıştırıcısı, Nextflow 26.04 ve sonrasında varsayılan hale gelmiştir. Özetle: DSL2 yazdığınız dildir; sözdizimi ayrıştırıcı sürümü ise bu dilin ne kadar katı yorumlandığını ve hangi gelişmiş özelliklerin kullanılabilir olduğunu belirler. @@ -52,21 +53,22 @@ Nextflow sürümünüzü nasıl güncelleyeceğiniz hakkında daha fazla bilgi i ### v2 sözdizimi ayrıştırıcısını etkinleştirme +Nextflow 26.04 ve sonrasında v2 ayrıştırıcısı varsayılan olduğundan, aşağıdaki adımlar yalnızca 26.04 öncesi sürümler için gereklidir. + Mevcut oturumunuz için v2 sözdizimi ayrıştırıcısını **etkinleştirmek** üzere terminalinizde aşağıdaki komutu çalıştırın: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Bunu kalıcı hale getirmek için (v2'nin Nextflow 26.04'te varsayılan olmasını beklerken), export komutunu kabuk profilinize ekleyin (`~/.bashrc`, `~/.zshrc` vb.): +Bunu kalıcı hale getirmek için export komutunu kabuk profilinize ekleyin (`~/.bashrc`, `~/.zshrc` vb.): ```bash echo 'export NXF_SYNTAX_PARSER=v2' >> ~/.bashrc source ~/.bashrc ``` -`NXF_SYNTAX_PARSER=v2` ortam değişkeninin geçici bir gereksinim olduğunu unutmayın. -Nextflow 26.04 ve sonrasında v2 ayrıştırıcısı varsayılan hale gelecek ve bu ayar artık gerekli olmayacaktır. +26.04 öncesi Nextflow sürümlerinde bu kurslarda kullanılan v2 özelliklerine erişmek için `NXF_SYNTAX_PARSER=v2` ortam değişkeninin gerekli olduğunu unutmayın. ### v2 sözdizimi ayrıştırıcısını devre dışı bırakma diff --git a/docs/tr/docs/nextflow_run/01_basics.md b/docs/tr/docs/nextflow_run/01_basics.md index 3bbd3453d5..e8bc28b2b6 100644 --- a/docs/tr/docs/nextflow_run/01_basics.md +++ b/docs/tr/docs/nextflow_run/01_basics.md @@ -91,12 +91,18 @@ nextflow run 1-hello.nf --input 'Hello World!' ??? success "Komut çıktısı" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [goofy_torvalds] revision: c33d41f479 executor > local (1) [a3/7be2fa] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Konsol çıktınız buna benzer görünüyorsa, tebrikler, ilk Nextflow workflow'unuzu çalıştırdınız! @@ -115,13 +121,14 @@ Konsol çıktınız buna benzer görünüyorsa, tebrikler, ilk Nextflow workflow Bu kursun başında bahsedilmişti, ama belki kaçırmışsınızdır. [Nextflow sürümleri](../info/nxf_versions.md) yardım materyalini kontrol edin. - Kısacası, Nextflow `25.10` kullanıyorsanız v2 dil ayrıştırıcısını etkinleştirmeniz gerekir: + v2 ayrıştırıcısı Nextflow 26.04 itibarıyla varsayılan olarak gelir; bu nedenle bu hatayı yalnızca daha eski sürümlerde görebilirsiniz. + 26.04 öncesi bir sürümde v2 dil ayrıştırıcısını etkinleştirmeniz gerekir: ```bash export NXF_SYNTAX_PARSER=v2 ``` -Buradaki en önemli çıktı, yukarıdaki çıktıda vurgulanan son satırdır: +Buradaki en önemli çıktı, yukarıdaki çıktıda vurgulanan satırdır: ```console [a3/7be2fa] sayHello | 1 of 1 ✔ @@ -168,12 +175,18 @@ nextflow run 1-hello.nf --input 'Hello World!' -output-dir hello_results ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [hungry_celsius] DSL2 - revision: f048d6ea78 + Launching `1-hello.nf` [hungry_celsius] revision: f048d6ea78 executor > local (1) - [a3/1e1535] sayHello [100%] 1 of 1 ✔ + [a3/1e1535] sayHello | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/hello_results + + first_output: 1-hello/output.txt ``` Artık çıktılarınızın `results` yerine `hello_results` adlı bir dizine yayınlandığını görmelisiniz: @@ -206,7 +219,7 @@ Bu karmaşık gelebilir, bu yüzden pratikte nasıl göründüğüne bakalım. Daha önce çalıştırdığımız workflow için konsol çıktısına geri dönersek, şu satır vardı: ```console -[a3/1e1535] sayHello [100%] 1 of 1 ✔ +[a3/1e1535] sayHello | 1 of 1 ✔ ``` Satırın `[a3/1e1535]` ile nasıl başladığını görüyor musunuz? @@ -623,11 +636,17 @@ nextflow run 1-hello.nf --input 'Hello World!' -resume ??? success "Komut çıktısı" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `1-hello.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `1-hello.nf` [tiny_noyce] revision: c33d41f479 [a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: 1-hello/output.txt ``` Konsol çıktısı tanıdık görünmeli, ancak öncekine kıyasla biraz farklı olan bir şey var. @@ -767,7 +786,7 @@ Bu eğitimin bir sonraki bölümünde, Nextflow'un birden fazla girdiyi verimli - [x] Görevin çalışma dizinine kısaltılmış yol - [ ] Çıktı dosyasının sağlama toplamı -Daha fazla bilgi: [2.4. Orijinal çıktıyı ve logları `work/` dizininde bulun](#23-find-the-original-output-and-logs-in-the-work-directory) +Daha fazla bilgi: [2.3. Orijinal çıktıyı ve logları `work/` dizininde bulun](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -777,7 +796,7 @@ Görev dizinindeki `.command.sh` dosyasının amacı nedir? - [ ] Başarısız görevlerden hata mesajlarını içerir - [ ] Görev için hazırlanan girdi dosyalarını listeler -Daha fazla bilgi: [2.4. Orijinal çıktıyı ve logları `work/` dizininde bulun](#23-find-the-original-output-and-logs-in-the-work-directory) +Daha fazla bilgi: [2.3. Orijinal çıktıyı ve logları `work/` dizininde bulun](#23-find-the-original-output-and-logs-in-the-work-directory) @@ -787,14 +806,14 @@ Daha fazla bilgi: [2.4. Orijinal çıktıyı ve logları `work/` dizininde bulun - [ ] Nextflow üzerine yazmayı engeller ve başarısız olur - [ ] Otomatik olarak yedeklenirler -Daha fazla bilgi: [2.5. Workflow'u farklı selamlamalarla yeniden çalıştırın](#24-re-run-the-workflow-with-different-greetings) +Daha fazla bilgi: [2.4. Workflow'u farklı selamlamalarla yeniden çalıştırın](#24-re-run-the-workflow-with-different-greetings) Bu konsol çıktısı neyi gösterir? ```console -[skipped ] process > sayHello (1) [100%] 1 of 1, cached: 1 ✔ +[a3/7be2fa] sayHello | 1 of 1, cached: 1 ✔ ``` - [ ] Görev başarısız oldu ve atlandı diff --git a/docs/tr/docs/nextflow_run/02_pipeline.md b/docs/tr/docs/nextflow_run/02_pipeline.md index bc73b2e3c3..c1f9e6e5c7 100644 --- a/docs/tr/docs/nextflow_run/02_pipeline.md +++ b/docs/tr/docs/nextflow_run/02_pipeline.md @@ -42,12 +42,21 @@ nextflow run 2a-inputs.nf --input data/greetings.csv ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2a-inputs.nf` [mighty_sammet] DSL2 - revision: 29fb5352b3 + Launching `2a-inputs.nf` [mighty_sammet] revision: 29fb5352b3 executor > local (3) - [8e/0eb066] sayHello (2) [100%] 3 of 3 ✔ + [8e/0eb066] sayHello (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Heyecan verici bir şekilde, bu process için '3 of 3' çağrının yapıldığını gösteriyor; girdi olarak sağladığımız CSV'de üç veri satırı olduğunu düşünürsek bu cesaret verici. @@ -124,11 +133,20 @@ nextflow run 2a-inputs.nf --input data/greetings.csv -ansi-log false ??? success "Komut çıktısı" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 - Launching `2a-inputs.nf` [pedantic_hamilton] DSL2 - revision: 6bbc42e49f + N E X T F L O W ~ version 26.04.4 + Launching `2a-inputs.nf` [pedantic_hamilton] - revision: 6bbc42e49f [ab/1a8ece] Submitted process > sayHello (1) [0d/2cae24] Submitted process > sayHello (2) [b5/0df1d6] Submitted process > sayHello (3) + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2a-inputs/Hello-output.txt + - 2a-inputs/Bonjour-output.txt + - 2a-inputs/Hola-output.txt ``` Bu sefer çıktıda üç process çalıştırmasını ve ilişkili çalışma alt dizinlerini görüyoruz. @@ -362,13 +380,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv ??? success "Komut çıktısı" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3 ✔ [1e/83586c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hello-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hola-output.txt + + collected: 2b-multistep/COLLECTED-batch-output.txt + + batch_report: 2b-multistep/batch-report.txt ``` Gördüğünüz gibi, vaat edildiği gibi workflow'un bir parçası olarak birden fazla adım çalıştırıldı; ilk ikisi (`sayHello` ve `convertToUpper`) muhtemelen her bir selamlamada çalıştırıldı ve üçüncüsü (`collectGreetings`) yalnızca bir kez, üç `convertToUpper` çağrısının çıktılarında çalıştırıldı. @@ -671,13 +707,31 @@ nextflow run 2b-multistep.nf --input data/greetings.csv --batch test ??? success "Komut çıktısı" ```console linenums="1" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2b-multistep.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2b-multistep.nf` [soggy_franklin] revision: bc8e1b2726 [a5/cdff26] sayHello (1) | 3 of 3 ✔ [c5/78794f] convertToUpper (2) | 3 of 3 ✔ [d3/b4d86c] collectGreetings | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2b-multistep/intermediates/Bonjour-output.txt + - 2b-multistep/intermediates/Hello-output.txt + - 2b-multistep/intermediates/Hola-output.txt + + uppercased: + - 2b-multistep/intermediates/UPPER-Hola-output.txt + - 2b-multistep/intermediates/UPPER-Bonjour-output.txt + - 2b-multistep/intermediates/UPPER-Hello-output.txt + + collected: 2b-multistep/COLLECTED-test-output.txt + + batch_report: 2b-multistep/test-report.txt ``` Özel batch adınızla adlandırılmış yeni nihai çıktılar görmelisiniz. @@ -922,13 +976,31 @@ nextflow run 2c-modules.nf --input data/greetings.csv -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2c-modules.nf` [soggy_franklin] DSL2 - revision: bc8e1b2726 + Launching `2c-modules.nf` [soggy_franklin] revision: bc8e1b2726 [d6/cdf466] sayHello (1) | 3 of 3, cached: 3 ✔ [99/79394f] convertToUpper (2) | 3 of 3, cached: 3 ✔ [1e/83586c] collectGreetings | 1 of 1, cached: 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2c-modules/intermediates/Hello-output.txt + - 2c-modules/intermediates/Bonjour-output.txt + - 2c-modules/intermediates/Hola-output.txt + + uppercased: + - 2c-modules/intermediates/UPPER-Hello-output.txt + - 2c-modules/intermediates/UPPER-Bonjour-output.txt + - 2c-modules/intermediates/UPPER-Hola-output.txt + + collected: 2c-modules/COLLECTED-batch-output.txt + + batch_report: 2c-modules/batch-report.txt ``` Process çalıştırmalarının hepsinin başarıyla önbelleğe alındığını fark edeceksiniz; yani Nextflow istenen işi zaten yaptığını tanıdı, kod bölünmüş ve ana workflow dosyası yeniden adlandırılmış olsa bile. @@ -1076,20 +1148,20 @@ Konteynerin içindeki dosya sisteminin ana sisteminizden farklı olduğunu gör Konteynerin içinden `cowpy` komutunu doğrudan çalıştırabilirsiniz. ```bash -cowpy "Hello Containers" +echo "Hello Containers" | cowpy ``` ??? success "Komut çıktısı" ```console - ______________________________________________________ + __________________ < Hello Containers > - ------------------------------------------------------ - \ ^__^ + ------------------ + \ ^__^ \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || + (__)\ )\/\ + ||----w | + || || ``` Bu, belirttiğimiz metni içeren bir konuşma balonuyla varsayılan inek karakterinin (veya 'cowacter') ASCII art'ını üretir. @@ -1098,22 +1170,22 @@ Temel kullanımı test ettiğinize göre, ona bazı parametreler vermeyi deneyeb Örneğin, araç belgeleri karakteri `-c` ile ayarlayabileceğimizi söylüyor. ```bash -cowpy "Hello Containers" -c tux +echo "Hello Containers" | cowpy -c tux ``` ??? success "Komut çıktısı" ```console - __________________ + __________________ < Hello Containers > - ------------------ - \ + ------------------ + \ \ .--. - |o_o | - |:_/ | + |o_o | + |:_/ | // \ \ - (| | ) + (| | ) /'\_ _/`\ \___)=(___/ ``` @@ -1224,7 +1296,7 @@ Workflow, öncekine çok benzer; artı `cowpy` çalıştırmak için ekstra adı } ``` -Bu workflow'un bir modül dosyasından bir `cowpy` process'i içe aktardığını ve bunu `collectGreetings()` çağrısının çıktısında, artı `params.character` adlı bir girdi parametresinde çağırdığını görüyorsunuz. +Bu workflow'un bir modül dosyasından bir `cowpy` process'i içe aktardığını ve bunu `collectGreetings()` çağrısının çıktısunda, artı `params.character` adlı bir girdi parametresinde çağırdığını görüyorsunuz. ```groovy title="2d-container.nf" linenums="31" // cowpy ile ASCII sanatı oluştur @@ -1299,15 +1371,35 @@ nextflow run 2d-container.nf --input data/greetings.csv --character turkey -resu ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `2d-container.nf` [elegant_brattain] DSL2 - revision: 028a841db1 + Launching `2d-container.nf` [elegant_brattain] revision: 028a841db1 executor > local (1) [95/fa0bac] sayHello (3) | 3 of 3, cached: 3 ✔ [92/32533f] convertToUpper (3) | 3 of 3, cached: 3 ✔ [aa/e697a2] collectGreetings | 1 of 1, cached: 1 ✔ [7f/caf718] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 2d-container/intermediates/Bonjour-output.txt + - 2d-container/intermediates/Hola-output.txt + - 2d-container/intermediates/Hello-output.txt + + uppercased: + - 2d-container/intermediates/UPPER-Hola-output.txt + - 2d-container/intermediates/UPPER-Hello-output.txt + - 2d-container/intermediates/UPPER-Bonjour-output.txt + + collected: 2d-container/intermediates/COLLECTED-batch-output.txt + + batch_report: 2d-container/batch-report.txt + + cowpy_art: 2d-container/cowpy-COLLECTED-batch-output.txt ``` İlk üç adım daha önce çalıştırdığımız için önbelleğe alındı; ancak `cowpy` process'i yeni olduğu için gerçekten çalıştırılıyor. diff --git a/docs/tr/docs/nextflow_run/03_config.md b/docs/tr/docs/nextflow_run/03_config.md index 1f9c766f8d..7d99ba90ac 100644 --- a/docs/tr/docs/nextflow_run/03_config.md +++ b/docs/tr/docs/nextflow_run/03_config.md @@ -118,15 +118,35 @@ nextflow run 3-main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_einstein] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_einstein] revision: ede9037d02 executor > local (8) [f0/35723c] sayHello (2) | 3 of 3 ✔ [40/3efd1a] convertToUpper (3) | 3 of 3 ✔ [17/e97d32] collectGreetings | 1 of 1 ✔ [98/c6b57b] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hola-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-batch-output.txt + + batch_report: 3-main/batch-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-batch-output.txt ``` Bu hala daha önce olduğu gibi aynı çıktıyı üretiyor. @@ -217,15 +237,35 @@ nextflow run ../3-main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `../3-main.nf` [trusting_escher] DSL2 - revision: 356df0818d + Launching `../3-main.nf` [trusting_escher] revision: 356df0818d executor > local (8) - [59/b66913] sayHello (2) [100%] 3 of 3 ✔ - [ad/f06364] convertToUpper (3) [100%] 3 of 3 ✔ - [10/714895] collectGreetings [100%] 1 of 1 ✔ - [88/3ece98] cowpy [100%] 1 of 1 ✔ + [59/b66913] sayHello (2) | 3 of 3 ✔ + [ad/f06364] convertToUpper (3) | 3 of 3 ✔ + [10/714895] collectGreetings | 1 of 1 ✔ + [88/3ece98] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/tux-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Bonjour-output.txt + - 3-main/intermediates/Hello-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Bonjour-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Hola-output.txt + + collected: 3-main/intermediates/COLLECTED-experiment-output.txt + + batch_report: 3-main/experiment-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-experiment-output.txt ``` Bu, `tux-run/` altında `tux-run/work/` ve `tux-run/results/` dahil yeni dizinler oluşturacaktır. @@ -307,15 +347,35 @@ nextflow run 3-main.nf -params-file test-params.yaml ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [disturbed_sammet] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [disturbed_sammet] revision: ede9037d02 executor > local (8) [2b/9a7d1e] sayHello (2) | 3 of 3 ✔ [5c/8f3b2a] convertToUpper (3) | 3 of 3 ✔ [a3/29d8fb] collectGreetings | 1 of 1 ✔ [b7/83ef12] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results + + first_output: + - 3-main/intermediates/Hola-output.txt + - 3-main/intermediates/Hello-output.txt + - 3-main/intermediates/Bonjour-output.txt + + uppercased: + - 3-main/intermediates/UPPER-Hola-output.txt + - 3-main/intermediates/UPPER-Hello-output.txt + - 3-main/intermediates/UPPER-Bonjour-output.txt + + collected: 3-main/intermediates/COLLECTED-yaml-output.txt + + batch_report: 3-main/yaml-report.txt + + cowpy_art: 3-main/cowpy-COLLECTED-yaml-output.txt ``` Nihai çıktı dosyası, selamlamaları söyleyen stegosaurus karakterini içermelidir. @@ -494,15 +554,35 @@ nextflow run 3-main.nf --batch outdir ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [amazing_church] DSL2 - revision: 6e18cd130e + Launching `3-main.nf` [amazing_church] revision: 6e18cd130e executor > local (8) - [9c/6a03ea] sayHello (2) [100%] 3 of 3 ✔ - [11/9e58a6] convertToUpper (3) [100%] 3 of 3 ✔ - [c8/1977e5] collectGreetings [100%] 1 of 1 ✔ - [38/f01eda] cowpy [100%] 1 of 1 ✔ + [9c/6a03ea] sayHello (2) | 3 of 3 ✔ + [11/9e58a6] convertToUpper (3) | 3 of 3 ✔ + [c8/1977e5] collectGreetings | 1 of 1 ✔ + [38/f01eda] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outdir + + first_output: + - intermediates/Bonjour-output.txt + - intermediates/Hello-output.txt + - intermediates/Hola-output.txt + + uppercased: + - intermediates/UPPER-Bonjour-output.txt + - intermediates/UPPER-Hola-output.txt + - intermediates/UPPER-Hello-output.txt + + collected: intermediates/COLLECTED-outdir-output.txt + + batch_report: outdir-report.txt + + cowpy_art: cowpy-COLLECTED-outdir-output.txt ``` Bu hala öncekiyle aynı çıktıyı üretiyor, ancak bu sefer çıktılarımızı `results_config/outdir/` altında buluyoruz. @@ -602,15 +682,35 @@ nextflow run 3-main.nf --batch pnames ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_mcclintock] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [jovial_mcclintock] revision: ede9037d02 executor > local (8) [4a/c2e6b8] sayHello (2) | 3 of 3 ✔ [6f/d4a172] convertToUpper (3) | 3 of 3 ✔ [e8/4f19d7] collectGreetings | 1 of 1 ✔ [f2/a85c36] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/pnames + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-pnames-output.txt + + batch_report: collectGreetings/pnames-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-pnames-output.txt ``` Bu hala öncekiyle aynı çıktıyı üretiyor, ancak bu sefer çıktılarımızı `results_config/pnames/` altında buluyoruz ve süreçlere göre gruplandırılmışlar. @@ -734,15 +834,35 @@ nextflow run 3-main.nf --batch outmode ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [rowdy_sagan] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [rowdy_sagan] revision: ede9037d02 executor > local (8) [5b/d91e3c] sayHello (2) | 3 of 3 ✔ [8a/f6c241] convertToUpper (3) | 3 of 3 ✔ [89/cd3a48] collectGreetings | 1 of 1 ✔ [9e/71fb52] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/outmode + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-outmode-output.txt + + batch_report: collectGreetings/outmode-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-outmode-output.txt ``` Bu hala öncekiyle aynı çıktıyı üretiyor, ancak bu sefer çıktılarımızı `results_config/outmode/` altında buluyoruz. @@ -868,15 +988,35 @@ nextflow run 3-main.nf --batch conda ??? success "Komut çıktısı" ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [trusting_lovelace] DSL2 - revision: 028a841db1 + Launching `3-main.nf` [trusting_lovelace] revision: 028a841db1 executor > local (8) [ee/4ca1f2] sayHello (3) | 3 of 3 ✔ [20/2596a7] convertToUpper (1) | 3 of 3 ✔ [b3/e15de5] collectGreetings | 1 of 1 ✔ [c5/af5f88] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/conda + + first_output: + - sayHello/Bonjour-output.txt + - sayHello/Hola-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + + collected: collectGreetings/COLLECTED-conda-output.txt + + batch_report: collectGreetings/conda-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-conda-output.txt ``` Bu sorunsuz çalışmalı ve `results_config/conda` altında öncekiyle aynı çıktıları üretmelidir. @@ -1215,15 +1355,35 @@ nextflow run 3-main.nf -profile my_laptop ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [gigantic_brazil] DSL2 - revision: ede9037d02 + Launching `3-main.nf` [gigantic_brazil] revision: ede9037d02 executor > local (8) [58/da9437] sayHello (3) | 3 of 3 ✔ [35/9cbe77] convertToUpper (2) | 3 of 3 ✔ [67/857d05] collectGreetings | 1 of 1 ✔ [37/7b51b5] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/batch + + first_output: + - sayHello/Hello-output.txt + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + + uppercased: + - convertToUpper/UPPER-Hello-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Bonjour-output.txt + + collected: collectGreetings/COLLECTED-batch-output.txt + + batch_report: collectGreetings/batch-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-batch-output.txt ``` Gördüğünüz gibi, bu bize çalışma zamanında yapılandırmalar arasında çok rahatça geçiş yapma imkanı veriyor. @@ -1303,15 +1463,35 @@ nextflow run 3-main.nf -profile my_laptop,test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `3-main.nf` [jovial_coulomb] DSL2 - revision: 46a6763141 + Launching `3-main.nf` [jovial_coulomb] revision: 46a6763141 executor > local (8) [9b/687cdc] sayHello (2) | 3 of 3 ✔ [ca/552187] convertToUpper (3) | 3 of 3 ✔ [e8/83e306] collectGreetings | 1 of 1 ✔ [fd/e84fa9] cowpy | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nextflow-run/results_config/test + + first_output: + - sayHello/Hola-output.txt + - sayHello/Bonjour-output.txt + - sayHello/Hello-output.txt + + uppercased: + - convertToUpper/UPPER-Bonjour-output.txt + - convertToUpper/UPPER-Hola-output.txt + - convertToUpper/UPPER-Hello-output.txt + + collected: collectGreetings/COLLECTED-test-output.txt + + batch_report: collectGreetings/test-report.txt + + cowpy_art: cowpy/cowpy-COLLECTED-test-output.txt ``` Bu, mümkün olduğunda Docker kullanacak ve `results_config/test` altında çıktılar üretecek; bu sefer karakter komik ikili `dragonandcow`. @@ -1488,14 +1668,14 @@ nextflow run nextflow-io/hello ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 Pulling nextflow-io/hello ... downloaded from https://github.com/nextflow-io/hello.git - Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] DSL2 - revision: 2ce0b0e294 [master] + Launching `https://github.com/nextflow-io/hello` [sleepy_swanson] revision: 3c2cdc9823 [master] executor > local (4) - [ba/08236d] sayHello (4) [100%] 4 of 4 ✔ + [ba/08236d] sayHello (4) | 4 of 4 ✔ Ciao world! Hello world! @@ -1520,12 +1700,12 @@ nextflow run nextflow-io/hello -r v1.3 ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `https://github.com/nextflow-io/hello` [sick_carson] DSL2 - revision: 2ce0b0e294 [v1.3] + Launching `https://github.com/nextflow-io/hello` [sick_carson] revision: 2ce0b0e294 [v1.3] executor > local (4) - [61/e11f77] sayHello (4) [100%] 4 of 4 ✔ + [61/e11f77] sayHello (4) | 4 of 4 ✔ Ciao world! Bonjour world! diff --git a/docs/tr/docs/nf4_science/_template/02_single_sample.md b/docs/tr/docs/nf4_science/_template/02_single_sample.md index 780886a32c..4df5d14b57 100644 --- a/docs/tr/docs/nf4_science/_template/02_single_sample.md +++ b/docs/tr/docs/nf4_science/_template/02_single_sample.md @@ -143,12 +143,19 @@ nextflow run {DOMAIN_DIR}.nf -profile test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] DSL2 - revision: {HASH} + Launching `{DOMAIN_DIR}.nf` [{RUN_NAME}] revision: {HASH} executor > local (1) [{HASH}] {PROCESS_A_NAME} (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/{DOMAIN_DIR}/results + + {OUTPUT_NAME}: + - {OUTPUT_SUBDIR}/{OUTPUT_FILE} ``` {VERIFY_OUTPUT_INSTRUCTIONS} diff --git a/docs/tr/docs/nf4_science/genomics/02_per_sample_variant_calling.md b/docs/tr/docs/nf4_science/genomics/02_per_sample_variant_calling.md index 3f94bad128..a0d6468d99 100644 --- a/docs/tr/docs/nf4_science/genomics/02_per_sample_variant_calling.md +++ b/docs/tr/docs/nf4_science/genomics/02_per_sample_variant_calling.md @@ -402,12 +402,19 @@ nextflow run genomics.nf -profile test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [reverent_sinoussi] DSL2 - revision: 41d43ad7fe + Launching `genomics.nf` [reverent_sinoussi] revision: 41d43ad7fe executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai ``` Dizin dosyasının doğru şekilde oluşturulduğunu çalışma dizinine veya sonuçlar dizinine bakarak kontrol edebilirsiniz. @@ -769,13 +776,26 @@ nextflow run genomics.nf -profile test -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [grave_volta] DSL2 - revision: 4790abc96a + Launching `genomics.nf` [grave_volta] revision: 4790abc96a executor > local (1) [2a/e69536] SAMTOOLS_INDEX (1) | 1 of 1, cached: 1 ✔ [53/e18e98] GATK_HAPLOTYPECALLER (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx ``` Şimdi konsol çıktısına bakarsak, iki sürecin listelendiğini görüyoruz. @@ -891,13 +911,32 @@ Komik olan şu: bu _çalışabilir_ VEYA _başarısız olabilir_. Örneğin, iş ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [peaceful_yalow] DSL2 - revision: a256d113ad + Launching `genomics.nf` [peaceful_yalow] revision: a256d113ad executor > local (6) [4f/7071b0] SAMTOOLS_INDEX (3) | 3 of 3, cached: 1 ✔ [7a/89bc43] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + bam_index: + - bam/reads_mother.bam.bai + - bam/reads_father.bam.bai + - bam/reads_son.bam.bai + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` İş akışı çalıştırmanız başarılı olduysa, şuna benzer bir hata alana kadar tekrar çalıştırın: @@ -905,9 +944,9 @@ Komik olan şu: bu _çalışabilir_ VEYA _başarısız olabilir_. Örneğin, iş ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [loving_pasteur] DSL2 - revision: d2a8e63076 + Launching `genomics.nf` [loving_pasteur] revision: d2a8e63076 executor > local (4) [01/eea165] SAMTOOLS_INDEX (2) | 3 of 3, cached: 1 ✔ @@ -1164,13 +1203,32 @@ Bu sefer (ve her seferinde) her şey doğru şekilde çalışmalıdır: ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [special_goldstine] DSL2 - revision: 4cbbf6ea3e + Launching `genomics.nf` [special_goldstine] revision: 4cbbf6ea3e executor > local (6) [d6/10c2c4] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [88/1783aa] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Sonuçlar dizini artık her örnek için hem BAM hem de BAI dosyalarını (demetten) ve VCF çıktılarını içerir: @@ -1327,13 +1385,32 @@ nextflow run genomics.nf -profile test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [sick_albattani] DSL2 - revision: 46d84642f6 + Launching `genomics.nf` [sick_albattani] revision: 46d84642f6 executor > local (6) [18/23b4bb] SAMTOOLS_INDEX (1) | 3 of 3 ✔ [12/f727bb] GATK_HAPLOTYPECALLER (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [bam/reads_mother.bam, bam/reads_mother.bam.bai] + - [bam/reads_father.bam, bam/reads_father.bam.bai] + - [bam/reads_son.bam, bam/reads_son.bam.bai] + + vcf: + - vcf/reads_mother.bam.vcf + - vcf/reads_father.bam.vcf + - vcf/reads_son.bam.vcf + + vcf_idx: + - vcf/reads_mother.bam.vcf.idx + - vcf/reads_father.bam.vcf.idx + - vcf/reads_son.bam.vcf.idx ``` Bu, daha öncekiyle aynı sonucu üretmelidir. Basit varyant çağırma iş akışımız artık istediğimiz tüm temel özelliklere sahip. diff --git a/docs/tr/docs/nf4_science/genomics/03_joint_calling.md b/docs/tr/docs/nf4_science/genomics/03_joint_calling.md index fc6309d687..30668da80e 100644 --- a/docs/tr/docs/nf4_science/genomics/03_joint_calling.md +++ b/docs/tr/docs/nf4_science/genomics/03_joint_calling.md @@ -207,13 +207,32 @@ nextflow run genomics.nf -profile test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [nostalgic_franklin] DSL2 - revision: f2c0a93c6a + Launching `genomics.nf` [nostalgic_franklin] revision: f2c0a93c6a executor > local (6) [cc/fbc705] SAMTOOLS_INDEX (3) | 3 of 3 ✔ [27/0d7eb9] GATK_HAPLOTYPECALLER (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx ``` Nextflow çıktısı öncekiyle aynı görünüyor, ancak `.g.vcf` dosyaları ve dizin dosyaları artık alt dizinlerde düzenlenmiş durumda. @@ -649,14 +668,37 @@ nextflow run genomics.nf -profile test -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - ┃ Launching `genomics.nf` [crazy_marconi] DSL2 - revision: 5da9afc841 + Launching `genomics.nf` [crazy_marconi] revision: 5da9afc841 executor > local (1) [9a/c7a873] SAMTOOLS_INDEX (2) | 3 of 3, cached: 3 ✔ [e4/4ed55e] GATK_HAPLOTYPECALLER (2) | 3 of 3, cached: 3 ✔ [a6/7cc8ed] GATK_JOINTGENOTYPING | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/genomics/results + + indexed_bam: + - [indexed_bam/reads_mother.bam, indexed_bam/reads_mother.bam.bai] + - [indexed_bam/reads_father.bam, indexed_bam/reads_father.bam.bai] + - [indexed_bam/reads_son.bam, indexed_bam/reads_son.bam.bai] + + gvcf: + - gvcf/reads_mother.bam.g.vcf + - gvcf/reads_father.bam.g.vcf + - gvcf/reads_son.bam.g.vcf + + gvcf_idx: + - gvcf/reads_mother.bam.g.vcf.idx + - gvcf/reads_father.bam.g.vcf.idx + - gvcf/reads_son.bam.g.vcf.idx + + joint_vcf: family_trio.joint.vcf + + joint_vcf_idx: family_trio.joint.vcf.idx ``` İlk iki adım önceki çalıştırmadan önbelleğe alınmış ve yeni `GATK_JOINTGENOTYPING` adımı üç örnekten toplanan girdiler üzerinde bir kez çalışıyor. diff --git a/docs/tr/docs/nf4_science/imaging/01_basics.md b/docs/tr/docs/nf4_science/imaging/01_basics.md index c3856e6930..0c0d4044ca 100644 --- a/docs/tr/docs/nf4_science/imaging/01_basics.md +++ b/docs/tr/docs/nf4_science/imaging/01_basics.md @@ -20,12 +20,12 @@ nextflow run hello-world.nf --greeting 'Hello World!' Konsol çıktınız şuna benzer görünmelidir: ```console title="Output" linenums="1" - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 -Launching `hello-world.nf` [goofy_torvalds] DSL2 - revision: c33d41f479 +Launching `hello-world.nf` [small_swirles] revision: 0fb8dbb23d executor > local (1) -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Tebrikler, ilk Nextflow workflow'unuzu çalıştırdınız! @@ -33,7 +33,7 @@ Tebrikler, ilk Nextflow workflow'unuzu çalıştırdınız! Buradaki en önemli çıktı son satırdır (satır 6): ```console title="Output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` Bu bize `sayHello` sürecinin bir kez başarıyla çalıştırıldığını söylüyor (`1 of 1 ✔`). @@ -84,19 +84,19 @@ Bu kafa karıştırıcı gelebilir, o yüzden pratikte bunun nasıl göründüğ Daha önce çalıştırdığımız workflow'un konsol çıktısına geri dönersek, şu satırımız vardı: ```console title="Excerpt of command output" linenums="6" -[a3/7be2fa] sayHello | 1 of 1 ✔ +[71/8143bd] sayHello | 1 of 1 ✔ ``` -Satırın `[a3/7be2fa]` ile nasıl başladığını görüyor musunuz? +Satırın `[71/8143bd]` ile nasıl başladığını görüyor musunuz? Bu, o süreç çağrısı için görev dizini yolunun kısaltılmış bir biçimidir ve `sayHello` süreç çağrısının çıktısını `work/` dizin yolu içinde nerede bulacağınızı söyler. -Tam yolu aşağıdaki komutu yazarak (kendi terminalinizde gördüğünüzle `a3/7be2fa` yerine koyarak) ve tab tuşuna basarak yolu otomatik tamamlayarak veya bir yıldız işareti ekleyerek bulabilirsiniz: +Tam yolu aşağıdaki komutu yazarak (kendi terminalinizde gördüğünüzle `71/8143bd` yerine koyarak) ve tab tuşuna basarak yolu otomatik tamamlayarak veya bir yıldız işareti ekleyerek bulabilirsiniz: ```bash -tree work/a3/7be2fa* +tree work/71/8143bd* ``` -Bu, tam dizin yolunu vermelidir: `work/a3/7be2fa7be2fad5e71e5f49998f795677fd68` +Bu, tam dizin yolunu vermelidir: `work/71/8143bd5ed3420e23c5f0dc1a05056d` Orada ne olduğuna bir göz atalım. @@ -116,8 +116,8 @@ Tam alt dizin adları sisteminizde farklı olacaktır. ```console title="work/" work -└── a3 - └── 7be2fad5e71e5f49998f795677fd68 +└── 71 + └── 8143bd5ed3420e23c5f0dc1a05056d ├── .command.begin ├── .command.err ├── .command.log @@ -136,7 +136,7 @@ Açarsanız, yine `Hello World!` selamlamasını bulacaksınız.
output.txt dosyasının içeriği -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/output.txt" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/output.txt" linenums="1" Hello World! ``` @@ -159,10 +159,9 @@ Bunlar, Nextflow'un görev yürütmenin bir parçası olarak yazdığı yardımc
Dosya içeriği -```console title="work/a3/7be2fa7be2fad5e71e5f49998f795677fd68/.command.sh" linenums="1" +```console title="work/71/8143bd5ed3420e23c5f0dc1a05056d/.command.sh" linenums="1" #!/bin/bash -ue echo 'Hello World!' > output.txt - ```
@@ -357,14 +356,14 @@ nextflow run hello-world.nf --greeting 'Hello World!' -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.04.3 + N E X T F L O W ~ version 26.04.4 - Launching `hello-world.nf` [tiny_noyce] DSL2 - revision: c33d41f479 + Launching `hello-world.nf` [maniac_pasteur] revision: 0fb8dbb23d - [a3/7be2fa] process > sayHello [100%] 1 of 1, cached: 1 ✔ + [71/8143bd] sayHello | 1 of 1, cached: 1 ✔ ``` -Süreç durum satırına eklenmiş olan `cached:` kısmına bakın (satır 5); bu, Nextflow'un bu çalışmayı zaten yaptığını tanıdığı ve önceki başarılı çalıştırmadan sonucu yeniden kullandığı anlamına gelir. +Süreç durum satırına eklenmiş olan `cached:` kısmına bakın; bu, Nextflow'un bu çalışmayı zaten yaptığını tanıdığı ve önceki başarılı çalıştırmadan sonucu yeniden kullandığı anlamına gelir. Ayrıca çalışma alt dizini hash'inin önceki çalıştırmayla aynı olduğunu görebilirsiniz. Nextflow tam anlamıyla size önceki çalıştırmayı gösteriyor ve "Bunu zaten orada yaptım" diyor. diff --git a/docs/tr/docs/nf4_science/imaging/02_run_molkart.md b/docs/tr/docs/nf4_science/imaging/02_run_molkart.md index 747950bd6c..df4629efce 100644 --- a/docs/tr/docs/nf4_science/imaging/02_run_molkart.md +++ b/docs/tr/docs/nf4_science/imaging/02_run_molkart.md @@ -70,26 +70,34 @@ Bu, tam pipeline kaynak kodunu içeren bir `molkart/` dizini oluşturur. Tam pipeline'ı çalıştırmadan önce, konteynerların neden nf-core pipeline'ları için gerekli olduğunu öğrenelim. -Pipeline'ı molkart test yapılandırmasından test veri seti ve parametrelerini kullanarak çalıştırmayı deneyelim: - -```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "mesmer,cellpose,stardist" \ - --outdir results +Pipeline'ın parametrelerini bir parametre dosyası kullanarak sağlayacağız. +Parametre dosyası, her parametreyi ve değerini listeleyen bir YAML dosyasıdır; bu sayede yazılan değerler (tam sayılar gibi) bozulmadan korunur ve komut satırı kısa tutulur. + +Çalışma dizininde zaten bir `params.yaml` dosyası bulunmaktadır: + +```yaml title="params.yaml" +input: "data/samplesheet.csv" +outdir: "results" +mindagap_tilesize: 90 +mindagap_boxsize: 7 +mindagap_loopnum: 100 +clahe_pyramid_tile: 368 +segmentation_method: "cellpose" ``` Bu parametreleri açıklayalım: -- `--input`: Örnek meta verilerini içeren samplesheet'in yolu -- `--mindagap_tilesize`, `--mindagap_boxsize`, `--mindagap_loopnum`: Izgara deseni doldurma için parametreler -- `--clahe_pyramid_tile`: Kontrast iyileştirme için çekirdek boyutu -- `--segmentation_method`: Hücre segmentasyonu için hangi algoritma(lar)ın kullanılacağı -- `--outdir`: Sonuçların nereye kaydedileceği +- `input`: Örnek meta verilerini içeren samplesheet'in yolu +- `mindagap_tilesize`, `mindagap_boxsize`, `mindagap_loopnum`: Izgara deseni doldurma için parametreler +- `clahe_pyramid_tile`: Kontrast iyileştirme için çekirdek boyutu +- `segmentation_method`: Hücre segmentasyonu için hangi algoritma(lar)ın kullanılacağı +- `outdir`: Sonuçların nereye kaydedileceği + +Bu parametreleri kullanarak pipeline'ı çalıştırmayı deneyelim: + +```bash +nextflow run ./molkart -params-file params.yaml +``` !!! Warning "Bu komut başarısız olacak - bu kasıtlı!" @@ -172,17 +180,10 @@ process { } ``` -Şimdi pipeline'ı aynı komutla tekrar çalıştırın: +Şimdi pipeline'ı tekrar çalıştırın; bu sefer daha sonra karşılaştırabilmek için üç segmentasyon yönteminin tamamını çalıştırın: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose,mesmer,stardist" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` Bu sefer Nextflow: @@ -209,12 +210,13 @@ Pipeline çalışırken, buna benzer bir çıktı göreceksiniz: ??? success "Komut çıktısı" ```console - Nextflow 25.04.8 is available - Please consider updating your version to it + N E X T F L O W ~ version 26.04.4 - N E X T F L O W ~ version 25.04.3 - - Launching `https://github.com/nf-core/molkart` [soggy_kalam] DSL2 - revision: 5e54b29cb3 [dev] + Launching `./molkart/main.nf` [exotic_banach] revision: e4152308ec + WARN: Unrecognized config option 'validation.help.enabled' + WARN: Unrecognized config option 'validation.defaultIgnoreParams' + WARN: Unrecognized config option 'validation.monochromeLogs' ------------------------------------------------------ ,--./,-. @@ -222,39 +224,34 @@ Pipeline çalışırken, buna benzer bir çıktı göreceksiniz: |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/molkart 1.2.0dev + nf-core/molkart 1.2.0 ------------------------------------------------------ Segmentation methods and options - segmentation_method : mesmer,cellpose,stardist + segmentation_method: mesmer,cellpose,stardist Image preprocessing - mindagap_boxsize : 7 - mindagap_loopnum : 100 - clahe_kernel : 25 - mindagap_tilesize : 90 - clahe_pyramid_tile : 368 + mindagap_boxsize : 7 + mindagap_loopnum : 100 + clahe_kernel : 25 + mindagap_tilesize : 90 + clahe_pyramid_tile : 368 Input/output options - input : https://raw.githubusercontent.com/nf-core/test-datasets/molkart/test_data/samplesheets/samplesheet_membrane.csv - outdir : results - - Institutional config options - config_profile_name : Test profile - config_profile_description: Minimal test dataset to check pipeline function + input : data/samplesheet.csv + outdir : results Generic options - trace_report_suffix : 2025-10-18_22-22-21 + trace_report_suffix: 2026-06-23_16-25-30 Core Nextflow options - revision : dev - runName : soggy_kalam - containerEngine : docker - launchDir : /workspaces/training/nf4-science/imaging - workDir : /workspaces/training/nf4-science/imaging/work - projectDir : /workspaces/.nextflow/assets/nf-core/molkart - userName : root - profile : docker,test - configFiles : + runName : exotic_banach + containerEngine : docker + launchDir : /workspaces/training/nf4-science/imaging + workDir : /workspaces/training/nf4-science/imaging/work + projectDir : /workspaces/training/nf4-science/imaging/molkart + userName : root + profile : standard + configFiles : /workspaces/training/nf4-science/imaging/molkart/nextflow.config, /workspaces/training/nf4-science/imaging/nextflow.config !! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ @@ -268,22 +265,22 @@ Pipeline çalışırken, buna benzer bir çıktı göreceksiniz: https://github.com/nf-core/molkart/blob/master/CITATIONS.md executor > local (22) - [c1/da5009] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2 ✔ - [73/8f5e8a] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2 ✔ - [ec/8f84d5] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1 ✔ - [a2/99349b] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1 ✔ - [95/c9b4b1] NFCORE_MOLKART:MOLKART:DEEPCELL_MESMER (mem_only) [100%] 1 of 1 ✔ - [d4/1ebd1e] NFCORE_MOLKART:MOLKART:STARDIST (mem_only) [100%] 1 of 1 ✔ - [3e/3c0736] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1 ✔ - [a0/415c6a] NFCORE_MOLKART:MOLKART:MASKFILTER (mem_only) [100%] 3 of 3 ✔ - [14/a830c9] NFCORE_MOLKART:MOLKART:SPOT2CELL (mem_only) [100%] 3 of 3 ✔ - [b5/391836] NFCORE_MOLKART:MOLKART:CREATE_ANNDATA (mem_only) [100%] 3 of 3 ✔ - [77/aed558] NFCORE_MOLKART:MOLKART:MOLKARTQC (mem_only) [100%] 3 of 3 ✔ - [e6/b81475] NFCORE_MOLKART:MOLKART:MULTIQC [100%] 1 of 1 ✔ + [b4/e57ff1] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2 ✔ + [2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2 ✔ + [94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1 ✔ + [58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1 ✔ + [c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1 ✔ + [4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1 ✔ + [8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1 ✔ + [08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3 ✔ + [56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3 ✔ + [b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3 ✔ + [5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3 ✔ + [8e/8bd365] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- - Completed at: 19-Oct-2025 22:23:01 - Duration : 2m 52s - CPU hours : 0.1 + Completed at: 23-Jun-2026 16:31:40 + Duration : 6m 9s + CPU hours : (a few seconds) Succeeded : 22 ``` @@ -303,10 +300,10 @@ Bu çıktının, pipeline'ın takip ettiği nf-core kuralları nedeniyle Hello W Her işlem satırı şunları gösterir: -- **Hash** (`[1a/2b3c4d]`): Çalışma dizini tanımlayıcısı (önceki gibi) +- **Hash** (`[b4/e57ff1]`): Çalışma dizini tanımlayıcısı (önceki gibi) - **İşlem adı**: Tam modül yolu ve işlem adı - **Girdi tanımlayıcısı**: Parantez içinde örnek adı -- **İlerleme**: Tamamlanma yüzdesi ve sayısı (örneğin, `1 of 1 ✔`) +- **İlerleme**: Görev sayısı ve tamamlanma durumu (örneğin, `1 of 1 ✔`) ### Özetle @@ -447,7 +444,7 @@ Hello World örneğimizde olduğu gibi, tüm gerçek çalışma `work/` dizinind ### 4.1. Çalışma dizini yapısını anlama Çalışma dizini, çalıştırılan her görev için bir alt dizin içerir. -12 göreve sahip bu pipeline için 12 çalışma alt dizini olacaktır. +22 göreve sahip bu pipeline çalıştırması için 22 çalışma alt dizini olacaktır. Çalışma dizinini listeleyin: @@ -479,7 +476,7 @@ Hello World'den temel fark: !!! Tip "İpucu" - Bir işlem başarısız olursa, çalışma dizinine gidebilir, hata mesajları için `.command.err` dosyasını inceleyebilir ve hatta sorunu ayıklamak için `.command.sh` dosyasını manuel olarak yeniden çalıştırabilirsiniz. + Bir süreç başarısız olursa, çalışma dizinine gidebilir, hata mesajları için `.command.err` dosyasını inceleyebilir ve hatta sorunu ayıklamak için `.command.sh` dosyasını manuel olarak yeniden çalıştırabilirsiniz. ### 4.3. Çalışma dizini temizliği @@ -517,30 +514,29 @@ Bu, çalıştırmanın geç aşamalarında hataların oluşabileceği uzun süre Aynı komutu tekrar çalıştırın, ancak `-resume` ekleyin: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results \ - -resume +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" -resume ``` -Şuna benzer bir çıktı görmelisiniz: +Şuna benzer bir çıktı görmelisiniz: ```console -executor > local (0) -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ -[7f/8g9h0i] NFCORE_MOLKART:MOLKART:CREATE_STACK (mem_only) [100%] 1 of 1, cached: 1 ✔ -[9h/0i1j2k] NFCORE_MOLKART:MOLKART:MINDAGAP_DUPLICATEFINDER (mem_only) [100%] 1 of 1, cached: 1 ✔ -[2k/3l4m5n] NFCORE_MOLKART:MOLKART:CELLPOSE (mem_only) [100%] 1 of 1, cached: 1 ✔ -... +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ +[94/b1ef70] NFC…RT:CREATE_STACK (mem_only) | 1 of 1, cached: 1 ✔ +[58/4b6426] NFC…DUPLICATEFINDER (mem_only) | 1 of 1, cached: 1 ✔ +[c2/ef7002] NFC…DEEPCELL_MESMER (mem_only) | 1 of 1, cached: 1 ✔ +[4f/ddd328] NFC…OLKART:STARDIST (mem_only) | 1 of 1, cached: 1 ✔ +[8c/dd0362] NFC…OLKART:CELLPOSE (mem_only) | 1 of 1, cached: 1 ✔ +[08/2ddcb5] NFC…KART:MASKFILTER (mem_only) | 3 of 3, cached: 3 ✔ +[56/e30de0] NFC…LKART:SPOT2CELL (mem_only) | 3 of 3, cached: 3 ✔ +[b0/5aa635] NFC…:CREATE_ANNDATA (mem_only) | 3 of 3, cached: 3 ✔ +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[73/239f45] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ +-[nf-core/molkart] Pipeline completed successfully- ``` -Her işlem için `cached: 2` veya `cached: 1` ifadesine dikkat edin - hiçbir şey yeniden çalıştırılmadı! +Her ön işleme ve segmentasyon sürecindeki `cached: N` ek açıklamasına dikkat edin; bu görevler yeniden çalıştırılmak yerine önbellekten kullanıldı. ### 5.3. Resume ne zaman yararlıdır diff --git a/docs/tr/docs/nf4_science/imaging/03_inputs.md b/docs/tr/docs/nf4_science/imaging/03_inputs.md index dd98b30774..76be14c43b 100644 --- a/docs/tr/docs/nf4_science/imaging/03_inputs.md +++ b/docs/tr/docs/nf4_science/imaging/03_inputs.md @@ -9,26 +9,20 @@ Bölüm 2'de molkart'ı komut satırında birden fazla parametre ile çalıştı ### 1.1. Uzun komut satırlarıyla ilgili sorun -Bölüm 2'deki komutumuzu hatırlayın: +Bölüm 2'de komutu kısa tutmak ve yazılan değerleri (ön işleme için kullanılan tam sayı parametreleri gibi) olduğu gibi korumak amacıyla zaten bir parametre dosyası kullandık: ```bash -nextflow run ./molkart \ - --input 'data/samplesheet.csv' \ - --mindagap_tilesize 90 \ - --mindagap_boxsize 7 \ - --mindagap_loopnum 100 \ - --clahe_pyramid_tile 368 \ - --segmentation_method "cellpose" \ - --outdir results +nextflow run ./molkart -params-file params.yaml --segmentation_method "mesmer,cellpose,stardist" ``` -Bu işe yarar, ancak tekrar üretmek, paylaşmak veya değiştirmek zordur. +Birçok parametreyi komut satırında tek tek geçirmek, tekrar üretmeyi, paylaşmayı veya değiştirmeyi zorlaştırır. Aynı analizi önümüzdeki ay tekrar çalıştırmanız gerekirse ne olur? Bir iş arkadaşınız tam ayarlarınızı kullanmak isterse ne olur? +Bir parametre dosyası bu sorunu çözer. -### 1.2. Çözüm: Parametre dosyası kullanın +### 1.2. Parametre dosyası -`params.yaml` adında bir dosya oluşturun: +Kullandığımız `params.yaml` dosyası şu şekildedir: ```yaml title="params.yaml" input: "data/samplesheet.csv" @@ -40,13 +34,16 @@ clahe_pyramid_tile: 368 segmentation_method: "cellpose" ``` -Artık komutunuz şu hale gelir: +Her parametre `anahtar: değer` çifti olarak yazılır. +Tam sayıları tırnak işareti olmadan yazmak (örneğin `mindagap_tilesize: 90`), bu değerlerin tam sayı türünü korur; pipeline'ın parametre doğrulaması bunu gerektirir. + +Komutunuz şu hale gelir: ```bash nextflow run ./molkart -params-file params.yaml -resume ``` -Bu kadar! Parametre dosyası tam yapılandırmanızı belgeler ve tekrar çalıştırmayı ya da paylaşmayı kolaylaştırır. +Parametre dosyası tam yapılandırmanızı belgeler ve tekrar çalıştırmayı ya da paylaşmayı kolaylaştırır. ### 1.3. Parametreleri geçersiz kılma diff --git a/docs/tr/docs/nf4_science/imaging/04_config.md b/docs/tr/docs/nf4_science/imaging/04_config.md index a949066811..9e553f5c6d 100644 --- a/docs/tr/docs/nf4_science/imaging/04_config.md +++ b/docs/tr/docs/nf4_science/imaging/04_config.md @@ -131,15 +131,16 @@ Her bayrağın ne yaptığını inceleyelim: Parametreler, girdiler ve kod aynıysa, tüm görevler önbellekten alınacak ve pipeline neredeyse anında tamamlanacaktır. ```console title="Output (excerpt)" -executor > local (12) -... -[1a/2b3c4d] NFCORE_MOLKART:MOLKART:MINDAGAP_MINDAGAP (mem_only) [100%] 2 of 2, cached: 2 ✔ -[5e/6f7g8h] NFCORE_MOLKART:MOLKART:CLAHE (mem_only) [100%] 2 of 2, cached: 2 ✔ +executor > local (1) +[43/e03702] NFC…NDAGAP_MINDAGAP (mem_only) | 2 of 2, cached: 2 ✔ +[2e/cf8910] NFC…T:MOLKART:CLAHE (mem_only) | 2 of 2, cached: 2 ✔ ... +[5e/39d5d0] NFC…LKART:MOLKARTQC (mem_only) | 3 of 3, cached: 3 ✔ +[ef/d7b294] NFCORE_MOLKART:MOLKART:MULTIQC | 1 of 1 ✔ -[nf-core/molkart] Pipeline completed successfully- ``` -Tüm süreçlerin `cached: 2` veya `cached: 1` gösterdiğine dikkat edin; hiçbir şey yeniden yürütülmedi! +Her süreçteki `cached: N` açıklamasına dikkat edin; önbelleğe alınmış ön işleme ve segmentasyon görevleri yeniden yürütülmedi. ### 2.4. Test profilleri diff --git a/docs/tr/docs/nf4_science/rnaseq/02_single-sample.md b/docs/tr/docs/nf4_science/rnaseq/02_single-sample.md index fab6afb7a9..6bb045e6ce 100644 --- a/docs/tr/docs/nf4_science/rnaseq/02_single-sample.md +++ b/docs/tr/docs/nf4_science/rnaseq/02_single-sample.md @@ -477,12 +477,22 @@ nextflow run rnaseq.nf -profile test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [mad_lorenz] DSL2 - revision: 5846a164d2 + Launching `rnaseq.nf` [mad_lorenz] revision: 5846a164d2 executor > local (1) [7b/8ee79e] FASTQC (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html ``` Bölüm 1'de çalıştıysanız ve konteyneri zaten çektiyseniz bu çok hızlı çalışmalıdır. @@ -738,13 +748,32 @@ nextflow run rnaseq.nf -profile test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [gloomy_becquerel] DSL2 - revision: bb11055736 + Launching `rnaseq.nf` [gloomy_becquerel] revision: bb11055736 executor > local (2) [f6/c8ef2e] FASTQC (1) | 1 of 1 ✔ [58/c58d8a] TRIM_GALORE (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] ``` Bu da çok hızlı çalışmalıdır, çünkü çok küçük bir girdi dosyası üzerinde çalışıyoruz. @@ -1085,14 +1114,39 @@ nextflow run rnaseq.nf -profile test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [elated_stonebraker] DSL2 - revision: e8e57d0cdd + Launching `rnaseq.nf` [elated_stonebraker] revision: e8e57d0cdd executor > local (3) [e8/fa29d6] FASTQC (1) | 1 of 1 ✔ [ca/ffdde2] TRIM_GALORE (1) | 1 of 1 ✔ [b6/1c6ca3] HISAT2_ALIGN (1) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log ``` Hizalama çıktılarını sonuçlar dizininde bulabilirsiniz. diff --git a/docs/tr/docs/nf4_science/rnaseq/03_multi-sample.md b/docs/tr/docs/nf4_science/rnaseq/03_multi-sample.md index 7cc4feed83..2c19aeaf48 100644 --- a/docs/tr/docs/nf4_science/rnaseq/03_multi-sample.md +++ b/docs/tr/docs/nf4_science/rnaseq/03_multi-sample.md @@ -163,14 +163,74 @@ nextflow run rnaseq.nf -profile test ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [golden_curry] DSL2 - revision: 2a5ba5be1e + Launching `rnaseq.nf` [golden_curry] revision: 2a5ba5be1e executor > local (18) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6 ✔ - [cc/16859f] TRIM_GALORE (6) [100%] 6 of 6 ✔ - [68/4c27b5] HISAT2_ALIGN (6) [100%] 6 of 6 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6 ✔ + [cc/16859f] TRIM_GALORE (6) | 6 of 6 ✔ + [68/4c27b5] HISAT2_ALIGN (6) | 6 of 6 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log ``` Bu sefer her adım 6 kez çalıştırılıyor, CSV dosyasındaki her örnek için bir kez. @@ -509,15 +569,79 @@ nextflow run rnaseq.nf -profile test -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq.nf` [modest_pare] DSL2 - revision: fc724d3b49 + Launching `rnaseq.nf` [modest_pare] revision: fc724d3b49 executor > local (1) - [07/3ff9c5] FASTQC (6) [100%] 6 of 6, cached: 6 ✔ - [2c/8d8e1e] TRIM_GALORE (5) [100%] 6 of 6, cached: 6 ✔ - [a4/7f9c44] HISAT2_ALIGN (6) [100%] 6 of 6, cached: 6 ✔ - [56/e1f102] MULTIQC [100%] 1 of 1 ✔ + [07/3ff9c5] FASTQC (6) | 6 of 6, cached: 6 ✔ + [2c/8d8e1e] TRIM_GALORE (5) | 6 of 6, cached: 6 ✔ + [a4/7f9c44] HISAT2_ALIGN (6) | 6 of 6, cached: 6 ✔ + [56/e1f102] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - fastqc/ENCSR000COQ1_1_fastqc.zip + - fastqc/ENCSR000COQ2_1_fastqc.zip + - fastqc/ENCSR000COR1_1_fastqc.zip + - fastqc/ENCSR000COR2_1_fastqc.zip + - fastqc/ENCSR000CPO1_1_fastqc.zip + - fastqc/ENCSR000CPO2_1_fastqc.zip + + fastqc_html: + - fastqc/ENCSR000COQ1_1_fastqc.html + - fastqc/ENCSR000COQ2_1_fastqc.html + - fastqc/ENCSR000COR1_1_fastqc.html + - fastqc/ENCSR000COR2_1_fastqc.html + - fastqc/ENCSR000CPO1_1_fastqc.html + - fastqc/ENCSR000CPO2_1_fastqc.html + + trimmed_reads: + - trimming/ENCSR000COQ1_1_trimmed.fq.gz + - trimming/ENCSR000COQ2_1_trimmed.fq.gz + - trimming/ENCSR000COR1_1_trimmed.fq.gz + - trimming/ENCSR000COR2_1_trimmed.fq.gz + - trimming/ENCSR000CPO1_1_trimmed.fq.gz + - trimming/ENCSR000CPO2_1_trimmed.fq.gz + + trimming_reports: + - trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt + - trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt + + trimming_fastqc: + - [trimming/ENCSR000COQ1_1_trimmed_fastqc.html, trimming/ENCSR000COQ1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COQ2_1_trimmed_fastqc.html, trimming/ENCSR000COQ2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR1_1_trimmed_fastqc.html, trimming/ENCSR000COR1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000COR2_1_trimmed_fastqc.html, trimming/ENCSR000COR2_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO1_1_trimmed_fastqc.html, trimming/ENCSR000CPO1_1_trimmed_fastqc.zip] + - [trimming/ENCSR000CPO2_1_trimmed_fastqc.html, trimming/ENCSR000CPO2_1_trimmed_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_trimmed.bam + - align/ENCSR000COQ2_1_trimmed.bam + - align/ENCSR000COR1_1_trimmed.bam + - align/ENCSR000COR2_1_trimmed.bam + - align/ENCSR000CPO1_1_trimmed.bam + - align/ENCSR000CPO2_1_trimmed.bam + + align_log: + - align/ENCSR000COQ1_1_trimmed.hisat2.log + - align/ENCSR000COQ2_1_trimmed.hisat2.log + - align/ENCSR000COR1_1_trimmed.hisat2.log + - align/ENCSR000COR2_1_trimmed.hisat2.log + - align/ENCSR000CPO1_1_trimmed.hisat2.log + - align/ENCSR000CPO2_1_trimmed.hisat2.log + + multiqc_report: multiqc/all_single-end.html + + multiqc_data: multiqc/all_single-end_data ``` Önbelleğe alınmış süreç çağrılarından sonra MULTIQC'ye tek bir çağrı eklenmiştir. @@ -536,6 +660,7 @@ tree -L 2 results/multiqc │ ├── cutadapt_filtered_reads_plot.txt │ ├── cutadapt_trimmed_sequences_plot_3_Counts.txt │ ├── cutadapt_trimmed_sequences_plot_3_Obs_Exp.txt + │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_adapter_content_plot.txt │ ├── fastqc_overrepresented_sequences_plot.txt │ ├── fastqc_per_base_n_content_plot.txt @@ -546,16 +671,17 @@ tree -L 2 results/multiqc │ ├── fastqc_sequence_counts_plot.txt │ ├── fastqc_sequence_duplication_levels_plot.txt │ ├── fastqc_sequence_length_distribution_plot.txt - │ ├── fastqc-status-check-heatmap.txt │ ├── fastqc_top_overrepresented_sequences_table.txt │ ├── hisat2_se_plot.txt + │ ├── llms-full.txt + │ ├── multiqc.log + │ ├── multiqc.parquet │ ├── multiqc_citations.txt │ ├── multiqc_cutadapt.txt │ ├── multiqc_data.json │ ├── multiqc_fastqc.txt │ ├── multiqc_general_stats.txt │ ├── multiqc_hisat2.txt - │ ├── multiqc.log │ ├── multiqc_software_versions.txt │ └── multiqc_sources.txt └── all_single-end.html @@ -698,7 +824,7 @@ Gereken tek değişiklik çıktı bloğundadır: artık örnek başına iki Fast Bu, süreci single-end veya paired-end verilerden birini işleyebilecek şekilde genelleştirir. -Paired-end versiyonunu kullanmak için `rnaseq_pe.nf` dosyasındaki içe aktarmayı güncelleyin: +Paired-end versiyonu kullanmak için `rnaseq_pe.nf` dosyasındaki içe aktarmayı güncelleyin: === "Sonra" @@ -966,15 +1092,87 @@ nextflow run rnaseq_pe.nf -profile test_pe ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 24.10.0 + N E X T F L O W ~ version 26.04.4 - Launching `rnaseq_pe.nf` [reverent_kare] DSL2 - revision: 9c376cc219 + Launching `rnaseq_pe.nf` [reverent_kare] revision: 9c376cc219 executor > local (19) - [c5/cbde15] FASTQC (5) [100%] 6 of 6 ✔ - [e4/fa2784] TRIM_GALORE (5) [100%] 6 of 6 ✔ - [3a/e23049] HISAT2_ALIGN (5) [100%] 6 of 6 ✔ - [e6/a3ccd9] MULTIQC [100%] 1 of 1 ✔ + [c5/cbde15] FASTQC (5) | 6 of 6 ✔ + [e4/fa2784] TRIM_GALORE (5) | 6 of 6 ✔ + [3a/e23049] HISAT2_ALIGN (5) | 6 of 6 ✔ + [e6/a3ccd9] MULTIQC | 1 of 1 ✔ + + Outputs: + + /workspaces/training/nf4-science/rnaseq/results + + fastqc_zip: + - [fastqc/ENCSR000COQ1_1_fastqc.zip, fastqc/ENCSR000COQ1_2_fastqc.zip] + - [fastqc/ENCSR000COQ2_1_fastqc.zip, fastqc/ENCSR000COQ2_2_fastqc.zip] + - [fastqc/ENCSR000COR1_1_fastqc.zip, fastqc/ENCSR000COR1_2_fastqc.zip] + - [fastqc/ENCSR000COR2_1_fastqc.zip, fastqc/ENCSR000COR2_2_fastqc.zip] + - [fastqc/ENCSR000CPO1_1_fastqc.zip, fastqc/ENCSR000CPO1_2_fastqc.zip] + - [fastqc/ENCSR000CPO2_1_fastqc.zip, fastqc/ENCSR000CPO2_2_fastqc.zip] + + fastqc_html: + - [fastqc/ENCSR000COQ1_1_fastqc.html, fastqc/ENCSR000COQ1_2_fastqc.html] + - [fastqc/ENCSR000COQ2_1_fastqc.html, fastqc/ENCSR000COQ2_2_fastqc.html] + - [fastqc/ENCSR000COR1_1_fastqc.html, fastqc/ENCSR000COR1_2_fastqc.html] + - [fastqc/ENCSR000COR2_1_fastqc.html, fastqc/ENCSR000COR2_2_fastqc.html] + - [fastqc/ENCSR000CPO1_1_fastqc.html, fastqc/ENCSR000CPO1_2_fastqc.html] + - [fastqc/ENCSR000CPO2_1_fastqc.html, fastqc/ENCSR000CPO2_2_fastqc.html] + + trimmed_reads: + - [trimming/ENCSR000COQ1_1_val_1.fq.gz, trimming/ENCSR000COQ1_2_val_2.fq.gz] + - [trimming/ENCSR000COQ2_1_val_1.fq.gz, trimming/ENCSR000COQ2_2_val_2.fq.gz] + - [trimming/ENCSR000COR1_1_val_1.fq.gz, trimming/ENCSR000COR1_2_val_2.fq.gz] + - [trimming/ENCSR000COR2_1_val_1.fq.gz, trimming/ENCSR000COR2_2_val_2.fq.gz] + - [trimming/ENCSR000CPO1_1_val_1.fq.gz, trimming/ENCSR000CPO1_2_val_2.fq.gz] + - [trimming/ENCSR000CPO2_1_val_1.fq.gz, trimming/ENCSR000CPO2_2_val_2.fq.gz] + + trimming_reports: + - [trimming/ENCSR000COQ1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COQ2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COQ2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000COR2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000COR2_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO1_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO1_2.fastq.gz_trimming_report.txt] + - [trimming/ENCSR000CPO2_1.fastq.gz_trimming_report.txt, trimming/ENCSR000CPO2_2.fastq.gz_trimming_report.txt] + + trimming_fastqc_1: + - [trimming/ENCSR000COQ1_1_val_1_fastqc.html, trimming/ENCSR000COQ1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COQ2_1_val_1_fastqc.html, trimming/ENCSR000COQ2_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR1_1_val_1_fastqc.html, trimming/ENCSR000COR1_1_val_1_fastqc.zip] + - [trimming/ENCSR000COR2_1_val_1_fastqc.html, trimming/ENCSR000COR2_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO1_1_val_1_fastqc.html, trimming/ENCSR000CPO1_1_val_1_fastqc.zip] + - [trimming/ENCSR000CPO2_1_val_1_fastqc.html, trimming/ENCSR000CPO2_1_val_1_fastqc.zip] + + trimming_fastqc_2: + - [trimming/ENCSR000COQ1_2_val_2_fastqc.html, trimming/ENCSR000COQ1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COQ2_2_val_2_fastqc.html, trimming/ENCSR000COQ2_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR1_2_val_2_fastqc.html, trimming/ENCSR000COR1_2_val_2_fastqc.zip] + - [trimming/ENCSR000COR2_2_val_2_fastqc.html, trimming/ENCSR000COR2_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO1_2_val_2_fastqc.html, trimming/ENCSR000CPO1_2_val_2_fastqc.zip] + - [trimming/ENCSR000CPO2_2_val_2_fastqc.html, trimming/ENCSR000CPO2_2_val_2_fastqc.zip] + + bam: + - align/ENCSR000COQ1_1_val_1.bam + - align/ENCSR000COQ2_1_val_1.bam + - align/ENCSR000COR1_1_val_1.bam + - align/ENCSR000COR2_1_val_1.bam + - align/ENCSR000CPO1_1_val_1.bam + - align/ENCSR000CPO2_1_val_1.bam + + align_log: + - align/ENCSR000COQ1_1_val_1.hisat2.log + - align/ENCSR000COQ2_1_val_1.hisat2.log + - align/ENCSR000COR1_1_val_1.hisat2.log + - align/ENCSR000COR2_1_val_1.hisat2.log + - align/ENCSR000CPO1_1_val_1.hisat2.log + - align/ENCSR000CPO2_1_val_1.hisat2.log + + multiqc_report: multiqc/all_paired-end.html + + multiqc_data: multiqc/all_paired-end_data ``` Şimdi iş akışımızın biri single-end okuma verileri için, diğeri paired-end veriler için olmak üzere biraz farklılaşan iki versiyonuna sahibiz. diff --git a/docs/tr/docs/side_quests/debugging/index.md b/docs/tr/docs/side_quests/debugging/index.md index 016b6eb0e7..682f0c8ae6 100644 --- a/docs/tr/docs/side_quests/debugging/index.md +++ b/docs/tr/docs/side_quests/debugging/index.md @@ -132,9 +132,9 @@ nextflow run bad_syntax.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [stupefied_bhabha] DSL2 - revision: ca6327fad2 + Launching `bad_syntax.nf` [nice_kalam] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -260,12 +260,12 @@ nextflow run bad_syntax.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [insane_faggin] DSL2 - revision: 961938ee2b + Launching `bad_syntax.nf` [small_morse] revision: 961938ee2b executor > local (3) - [48/cd7f54] PROCESS_FILES (1) | 3 of 3 ✔ + [f5/dd6f46] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.2. Yanlış süreç anahtar sözcükleri veya yönergeleri kullanma @@ -281,9 +281,9 @@ nextflow run invalid_process.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [nasty_jepsen] DSL2 - revision: da9758d614 + Launching `invalid_process.nf` [astonishing_pesquet] revision: f42559404a Error invalid_process.nf:3:1: Invalid process definition -- check for missing or out-of-order section labels │ 3 | process PROCESS_FILES { @@ -403,12 +403,12 @@ nextflow run invalid_process.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `invalid_process.nf` [silly_fermi] DSL2 - revision: 961938ee2b + Launching `invalid_process.nf` [confident_banach] revision: 961938ee2b executor > local (3) - [b7/76cd9d] PROCESS_FILES (2) | 3 of 3 ✔ + [29/87d6b8] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 1.3. Hatalı değişken adları kullanma @@ -424,9 +424,9 @@ nextflow run no_such_var.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [gloomy_meninsky] DSL2 - revision: 0c4d3bc28c + Launching `no_such_var.nf` [spontaneous_pasteur] revision: 0c4d3bc28c Error no_such_var.nf:17:39: `undefined_var` is not defined │ 17 | echo "Using undefined variable: ${undefined_var}" >> ${output_pref @@ -514,7 +514,7 @@ Hata mesajı, değişkenin betik şablonunda tanınmadığını belirtir; betik val sample_name output: - path "${sample_name}_output.txt" + path "${sample_name}_processed.txt" script: // Betikten önce Groovy kodunda değişkenleri tanımla @@ -544,12 +544,12 @@ nextflow run no_such_var.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `no_such_var.nf` [suspicious_venter] DSL2 - revision: 6ba490f7c5 + Launching `no_such_var.nf` [suspicious_venter] revision: 6ba490f7c5 executor > local (3) - [21/237300] PROCESS_FILES (2) | 3 of 3 ✔ + [26/b4370c] PROCESS_FILES (3) | 3 of 3 ✔ ``` ### 1.4. Bash değişkenlerinin hatalı kullanımı @@ -565,9 +565,9 @@ nextflow run bad_bash_var.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [infallible_mandelbrot] DSL2 - revision: 0853c11080 + Launching `bad_bash_var.nf` [hopeful_koch] revision: 0853c11080 Error bad_bash_var.nf:13:42: `prefix` is not defined │ 13 | echo "Processing ${sample_name}" > ${prefix}.txt @@ -664,12 +664,12 @@ nextflow run bad_bash_var.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_bash_var.nf` [naughty_franklin] DSL2 - revision: 58c1c83709 + Launching `bad_bash_var.nf` [naughty_franklin] revision: 58c1c83709 executor > local (3) - [4e/560285] PROCESS_FILES (2) | 3 of 3 ✔ + [cf/19a490] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! tip "Groovy ve Bash Değişkenleri" @@ -700,11 +700,11 @@ nextflow run badpractice_syntax.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [intergalactic_colden] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [fervent_miescher] revision: 5e4b291bde - Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process or workflow + Error badpractice_syntax.nf:3:1: Statements cannot be mixed with script declarations -- move statements into a process, workflow, or function │ 3 | input_ch = channel.of('sample1', 'sample2', 'sample3') ╰ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,12 +822,12 @@ nextflow run badpractice_syntax.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `badpractice_syntax.nf` [naughty_ochoa] DSL2 - revision: 5e4b291bde + Launching `badpractice_syntax.nf` [naughty_ochoa] revision: 5e4b291bde executor > local (3) - [6a/84a608] PROCESS_FILES (2) | 3 of 3 ✔ + [f0/350ff4] PROCESS_FILES (2) | 3 of 3 ✔ ``` Girdi kanallarınızı iş akışı bloğu içinde tanımlayın ve genel olarak eklentinin yaptığı diğer önerilere uyun. @@ -867,9 +867,9 @@ nextflow run bad_number_inputs.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [happy_swartz] DSL2 - revision: d83e58dcd3 + Launching `bad_number_inputs.nf` [desperate_carson] revision: d83e58dcd3 Error bad_number_inputs.nf:23:5: Incorrect number of call arguments, expected 1 but received 2 │ 23 | PROCESS_FILES(samples_ch, files_ch) @@ -986,12 +986,12 @@ nextflow run bad_number_inputs.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_number_inputs.nf` [big_euler] DSL2 - revision: e302bd87be + Launching `bad_number_inputs.nf` [big_euler] revision: e302bd87be executor > local (3) - [48/497f7b] PROCESS_FILES (3) | 3 of 3 ✔ + [47/1d039f] PROCESS_FILES (3) | 3 of 3 ✔ ``` Bu örnekten daha yaygın olarak, bir sürece ek girdiler ekleyip iş akışı çağrısını buna göre güncellemeyi unutabilirsiniz; bu da bu tür bir hataya yol açabilir. Neyse ki bu, anlaşılması ve düzeltilmesi en kolay hatalardan biridir; çünkü hata mesajı uyuşmazlık hakkında oldukça açıktır. @@ -1008,14 +1008,14 @@ nextflow run exhausted.nf ??? success "Komut çıktısı" -```console title="Exhausted channel output" - N E X T F L O W ~ version 25.10.4 + ```console title="Exhausted channel output" + N E X T F L O W ~ version 26.04.4 -Launching `exhausted.nf` [extravagant_gauss] DSL2 - revision: 08cff7ba2a + Launching `exhausted.nf` [romantic_liskov] revision: 31a6ae1494 -executor > local (1) -[bd/f61fff] PROCESS_FILES (1) [100%] 1 of 1 ✔ -``` + executor > local (1) + [10/82e235] PROCESS_FILES (1) | 1 of 1 ✔ + ``` Bu iş akışı hatasız tamamlanır; ancak yalnızca tek bir örneği işler! @@ -1133,12 +1133,12 @@ nextflow run exhausted.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `exhausted.nf` [maniac_leavitt] DSL2 - revision: f372a56a7d + Launching `exhausted.nf` [maniac_leavitt] revision: f372a56a7d executor > local (3) - [80/0779e9] PROCESS_FILES (3) | 3 of 3 ✔ + [d9/886888] PROCESS_FILES (2) | 3 of 3 ✔ ``` Artık yalnızca bir örnek yerine üç örneğin de işlendiğini görmelisiniz. @@ -1156,11 +1156,12 @@ nextflow run bad_channel_shape.nf ??? failure "Komut çıktısı" ```console - Launching `bad_channel_shape.nf` [hopeful_pare] DSL2 - revision: ffd66071a1 + N E X T F L O W ~ version 26.04.4 + + Launching `bad_channel_shape.nf` [disturbed_hilbert] revision: 3046f86036 executor > local (3) - executor > local (3) - [3f/c2dcb3] PROCESS_FILES (3) [ 0%] 0 of 3 ✘ + [13/2d7cf7] PROCESS_FILES (2) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: @@ -1178,7 +1179,7 @@ nextflow run bad_channel_shape.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/d6/1fb69d1d93300bbc9d42f1875b981e + /workspaces/training/side-quests/debugging/work/fc/20d7bd091eb9f7f63b76ab3a802cac Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line @@ -1328,12 +1329,12 @@ nextflow run bad_channel_shape.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape.nf` [clever_thompson] DSL2 - revision: 8cbcae3746 + Launching `bad_channel_shape.nf` [clever_thompson] revision: 8cbcae3746 executor > local (3) - [bb/80a958] PROCESS_FILES (2) | 3 of 3 ✔ + [81/d0f3ea] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 2.4. Kanal Hata Ayıklama Teknikleri @@ -1353,12 +1354,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [maniac_poisson] DSL2 - revision: b4f24dc9da + Launching `bad_channel_shape_viewed.nf` [sleepy_cajal] revision: 03e79cdbad executor > local (3) - [c0/db76b3] PROCESS_FILES (3) [100%] 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1418,12 +1419,12 @@ nextflow run bad_channel_shape_viewed.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed.nf` [marvelous_koch] DSL2 - revision: 03e79cdbad + Launching `bad_channel_shape_viewed.nf` [marvelous_koch] revision: 03e79cdbad executor > local (3) - [ff/d67cec] PROCESS_FILES (2) | 3 of 3 ✔ + [dc/6e5c24] PROCESS_FILES (2) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] @@ -1459,13 +1460,12 @@ nextflow run missing_output.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [zen_stone] DSL2 - revision: 37ff61f926 + Launching `missing_output.nf` [evil_gilbert] revision: 3d5117f7e2 executor > local (3) - executor > local (3) - [fd/2642e9] process > PROCESS_FILES (2) [ 66%] 2 of 3, failed: 2 + [45/146e39] PROCESS_FILES (1) | 0 of 3 ✘ ERROR ~ Error executing process > 'PROCESS_FILES (3)' Caused by: @@ -1483,9 +1483,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/02/9604d49fb8200a74d737c72a6c98ed + /workspaces/training/side-quests/debugging/work/2b/85afc51ff8d820df3b97b8a7154a30 - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1567,12 +1567,12 @@ nextflow run missing_output.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [elated_hamilton] DSL2 - revision: 961938ee2b + Launching `missing_output.nf` [elated_hamilton] revision: 961938ee2b executor > local (3) - [16/1c437c] PROCESS_FILES (3) | 3 of 3 ✔ + [70/6d4479] PROCESS_FILES (1) | 3 of 3 ✔ ``` ### 3.2. Eksik yazılım @@ -1588,15 +1588,15 @@ nextflow run missing_software.nf ??? failure "Komut çıktısı" ```console hl_lines="12 18" - ERROR ~ Error executing process > 'PROCESS_FILES (3)' + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Process `PROCESS_FILES (3)` terminated with an error exit status (127) + Process `PROCESS_FILES (2)` terminated with an error exit status (127) Command executed: - cowpy sample3 > sample3_output.txt + cowpy sample2 > sample2_output.txt Command exit status: 127 @@ -1608,9 +1608,9 @@ nextflow run missing_software.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/2f/bcf8fad6fd101c76950c92062ce299 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line -- Check '.nextflow.log' file for details ``` @@ -1654,12 +1654,12 @@ nextflow run missing_software.nf -profile docker ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software.nf` [awesome_stonebraker] DSL2 - revision: 0296d12839 + Launching `missing_software.nf` [awesome_stonebraker] revision: 0296d12839 executor > local (3) - [38/ab20d1] PROCESS_FILES (1) | 3 of 3 ✔ + [33/bf8d3e] PROCESS_FILES (3) | 3 of 3 ✔ ``` !!! note "Not" @@ -1681,34 +1681,19 @@ nextflow run bad_resources.nf -profile docker ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [disturbed_elion] DSL2 - revision: 27d2066e86 + Launching `bad_resources.nf` [curious_escher] revision: e6e544e786 executor > local (3) - [c0/ded8e1] PROCESS_FILES (3) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (2)' + [83/c8c4af] PROCESS_FILES (2) | 0 of 3 + WARN: Killing running tasks (2) + ERROR ~ Error executing process > 'PROCESS_FILES (1)' Caused by: - Process exceeded running time limit (1ms) - - Command executed: - - cowpy sample2 > sample2_output.txt + process hasn't exited - Command exit status: - - - Command output: - (empty) - - Work dir: - /workspaces/training/side-quests/debugging/work/53/f0a4cc56d6b3dc2a6754ff326f1349 - - Container: - community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 - - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -1717,9 +1702,11 @@ nextflow run bad_resources.nf -profile docker `bad_resources.nf` dosyasını inceleyelim: -```groovy title="bad_resources.nf" linenums="3" hl_lines="3" +```groovy title="bad_resources.nf" linenums="3" hl_lines="5" process PROCESS_FILES { + container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273' + time '1 ms' // HATA: Gerçekçi olmayan zaman sınırı input: @@ -1793,15 +1780,15 @@ nextflow run bad_resources.nf -profile docker ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_resources.nf` [friendly_mcclintock] DSL2 - revision: 381567d2c1 + Launching `bad_resources.nf` [friendly_mcclintock] revision: 381567d2c1 executor > local (3) - [c2/9b4c41] PROCESS_FILES (3) | 3 of 3 ✔ + [96/b70b83] PROCESS_FILES (3) | 3 of 3 ✔ ``` -Hata mesajlarınızı dikkatle okuduğunuzda bu tür hatalar sizi uzun süre şaşırtmamalıdır. Ancak kaynak yönergelerinizi uygun şekilde yapılandırabilmek için çalıştırdığınız komutların kaynak gereksinimlerini anladığınızdan emin olun. +`local` yürütücüde hata, bir zamanlayıcıda olduğundan daha az açıklayıcıdır: zaman sınırını açıkça belirten bir mesaj yerine `process hasn't exited` ve `WARN: Killing running tasks` mesajlarını alırsınız. Kurulacak bağlantı şudur: Nextflow, bir görev kendisine ayrılan kaynakları aştığında o görevi sonlandırır; dolayısıyla bir süreç betik düzeyinde bir hata olmaksızın sonlandırıldığında kaynak yönergelerini kontrol edin. Burada sorunun kaynağı, sürecin yaptığı iş için çok düşük olan `time` yönergesidir. Kaynak yönergelerinizi uygun şekilde yapılandırabilmek için çalıştırdığınız komutların kaynak gereksinimlerini anladığınızdan emin olun. ### 3.4. Süreç Hata Ayıklama Teknikleri @@ -1822,20 +1809,21 @@ nextflow run missing_output.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_output.nf` [irreverent_payne] DSL2 - revision: 3d5117f7e2 + Launching `missing_output.nf` [irreverent_payne] revision: 3d5117f7e2 executor > local (3) - [5d/d544a4] PROCESS_FILES (2) | 0 of 3 ✘ - ERROR ~ Error executing process > 'PROCESS_FILES (1)' + [f0/42f283] PROCESS_FILES (2) | 0 of 3 ✘ + ERROR ~ Error executing process > 'PROCESS_FILES (2)' Caused by: - Missing output file(s) `sample1.txt` expected by process `PROCESS_FILES (1)` + Missing output file(s) `sample2.txt` expected by process `PROCESS_FILES (2)` + Command executed: - echo "Processing sample1" > sample1_output.txt + echo "Processing sample2" > sample2_output.txt Command exit status: 0 @@ -1844,9 +1832,9 @@ nextflow run missing_output.nf (empty) Work dir: - /workspaces/training/side-quests/debugging/work/1e/2011154d0b0f001cd383d7364b5244 + /workspaces/training/side-quests/debugging/work/f0/42f283a25543dad8d56b192e314f41 - Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` -- Check '.nextflow.log' file for details ``` @@ -1980,22 +1968,22 @@ nextflow run bad_channel_shape_viewed_debug.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_channel_shape_viewed_debug.nf` [agitated_crick] DSL2 - revision: ea3676d9ec + Launching `bad_channel_shape_viewed_debug.nf` [infallible_shirley] revision: 37cbda227b executor > local (3) - [c6/2dac51] process > PROCESS_FILES (3) [100%] 3 of 3 ✔ + [a1/59e59a] PROCESS_FILES (3) | 3 of 3 ✔ Channel content: [sample1, file1.txt] Channel content: [sample2, file2.txt] Channel content: [sample3, file3.txt] After mapping: sample1 After mapping: sample2 After mapping: sample3 - Sample name inside process is sample2 - Sample name inside process is sample1 + Sample name inside process is sample2 + Sample name inside process is sample3 ``` @@ -2044,9 +2032,9 @@ nextflow run bad_syntax.nf -preview ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `bad_syntax.nf` [magical_mercator] DSL2 - revision: 550b9a8873 + Launching `bad_syntax.nf` [magical_mercator] revision: 550b9a8873 Error bad_syntax.nf:24:1: Unexpected input: '' @@ -2094,9 +2082,9 @@ nextflow run missing_software_with_stub.nf .command.sh: line 2: cowpy: command not found Work dir: - /workspaces/training/side-quests/debugging/work/82/42a5bfb60c9c6ee63ebdbc2d51aa6e + /workspaces/training/side-quests/debugging/work/cd/b8686a0d27df5be779a38fed616d01 - Tip: you can try to figure out what's wrong by changing to the process work directory and showing the script file named `.command.sh` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -- Check '.nextflow.log' file for details ``` @@ -2110,12 +2098,12 @@ nextflow run missing_software_with_stub.nf -stub-run ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `missing_software_with_stub.nf` [astonishing_shockley] DSL2 - revision: f1f4f05d7d + Launching `missing_software_with_stub.nf` [astonishing_shockley] revision: f1f4f05d7d executor > local (3) - [b5/2517a3] PROCESS_FILES (3) | 3 of 3 ✔ + [ba/416414] PROCESS_FILES (2) | 3 of 3 ✔ ``` #### Kodu inceleyin @@ -2249,16 +2237,20 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `buggy_workflow.nf` [happy_aryabhata] revision: 6a296ff695 - Launching `buggy_workflow.nf` [wise_ramanujan] DSL2 - revision: d51a8e83fd + Error buggy_workflow.nf:25:12: Unexpected input: '\n' + │ 25 | script: + ╰ | ^ - ERROR ~ Range [11, 12) out of bounds for length 11 + ERROR ~ Script compilation failed -- Check '.nextflow.log' file for details ``` - Bu şifreli hata, `params{}` bloğundaki 11-12. satırlar civarında bir ayrıştırma sorununa işaret etmektedir. v2 ayrıştırıcısı yapısal sorunları erken yakalar. + Ayrıştırıcı 25. satıra (`script:`) işaret ediyor; ancak asıl sorun hemen üzerindedir: 23. satırdaki `output:` bildiriminden sonra gelen sondaki virgül, ayrıştırıcının başka bir çıktı beklentisine girmesine neden olur ve `script:` satırına ulaştığında hata verir. Bu, çözülmesi gereken birkaç sözdizimi hatasından ilkidir. Öğrendiğiniz dört aşamalı hata ayıklama yöntemini uygulayın: @@ -2300,7 +2292,7 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy ``` ??? solution "Çözüm" - `buggy_workflow.nf` dosyası, tüm önemli hata ayıklama kategorilerini kapsayan 9 veya 10 farklı hata içermektedir (nasıl saydığınıza bağlı olarak). Her hatanın ve nasıl düzeltileceğinin sistematik bir dökümü aşağıda verilmiştir. + `buggy_workflow.nf` dosyası, tüm önemli hata ayıklama kategorilerini kapsayan 10 farklı hata içermektedir. Her hatanın ve nasıl düzeltileceğinin, Nextflow 26.04'te gerçekte karşılaşılan sıraya göre sistematik bir dökümü aşağıda verilmiştir. Derleyici iş akışını iki geçişte çözümler: önce sözdizimini ayrıştırır, ardından her değişkenin tanımlı olduğunu statik olarak kontrol eder. Bu nedenle önce sözdizimi hatalarını temizlersiniz, ardından bir grup tanımsız değişken hatası gelir; iş akışı hiç çalışmadan önce bunların hepsi giderilmelidir. Sözdizimi hatalarıyla başlayalım: @@ -2315,6 +2307,8 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy path "${sample_id}_result.txt" ``` + Virgül kaldırıldıktan sonra ayrıştırıcı, `processFiles`'ı kapatması gereken süslü parantezi arayarak dosyanın sonuna kadar ilerler ve `Unexpected input: ''` hatasını bildirir. + **Hata 2: Sözdizimi Hatası - Eksik Kapanış Süslü Parantezi** ```groovy linenums="24" script: @@ -2333,6 +2327,17 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy } // Eksik kapanış süslü parantezini ekle ``` + Artık sözdizimi ayrıştırılıyor; bu nedenle statik tür denetleyicisi çalışır. İş akışı çalışmadan önce tüm tanımsız değişkenleri bir kerede bildirir: + + ```console + Error buggy_workflow.nf:86:29: `sample_ids` is not defined + Error buggy_workflow.nf:27:25: `sample` is not defined + Error buggy_workflow.nf:28:27: `sample` is not defined + Error buggy_workflow.nf:49:33: `i` is not defined + ``` + + Bu dört satır, aşağıdaki Hata 3, 4 ve 5'e karşılık gelen üç farklı hataya işaret etmektedir. Sonuncusu olan `i`, tür denetleyicisinin bir Nextflow değişkeninden ayırt edemediği bir Bash değişkenidir; bu nedenle çalışma zamanı hatası olarak değil, derleme zamanında ortaya çıkar. Yeniden çalıştırmadan önce üçünü de düzeltin. + **Hata 3: Değişken Adı Hatası** ```groovy linenums="26" echo "Processing: ${sample}" // HATA: sample_id olmalı @@ -2348,14 +2353,23 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy ```groovy linenums="87" heavy_ch = heavyProcess(sample_ids) // HATA: sample_ids tanımsız ``` - **Düzeltme:** Doğru kanalı kullanın ve örnek kimliklerini çıkarın + **Düzeltme:** Doğru kanalı kullanın ```groovy linenums="87" heavy_ch = heavyProcess(input_ch) ``` - Bu noktada iş akışı çalışacak; ancak hâlâ hatalar alacağız (örneğin `processFiles` içinde `Path value cannot be null`), bunun nedeni hatalı kanal yapısıdır. + **Hata 5: Bash Değişkeni Kaçırma Hatası** + ```groovy linenums="48" + echo "Heavy computation $i for ${sample_id}" // HATA: $i tanımsız bir Nextflow değişkeni gibi görünüyor + ``` + **Düzeltme:** Bash değişkenini kaçırın; böylece Nextflow onu shell'e bırakır + ```groovy linenums="48" + echo "Heavy computation \${i} for ${sample_id}" + ``` + + Bunlar çözüldükten sonra iş akışı derlenir ve çalışmaya başlar. İlk çalışma zamanı hatası `processFiles`'tan gelir; süreç bir demet beklerken yalın bir değer alıyor: `Input tuple does not match tuple declaration in process 'processFiles' -- offending value: sample_003`. - **Hata 5: Kanal Yapısı Hatası - Yanlış Map Çıktısı** + **Hata 6: Kanal Yapısı Hatası - Yanlış Map Çıktısı** ```groovy linenums="83" .map { row -> row.sample_id } // HATA: processFiles demet bekliyor ``` @@ -2364,29 +2378,18 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy .map { row -> [row.sample_id, file(row.fastq_path)] } ``` - Ancak bu, yukarıdaki `heavyProcess()` çalıştırma düzeltmemizi bozacak; bu nedenle o sürece yalnızca örnek kimliklerini iletmek için bir map kullanmamız gerekecek: + Bu `processFiles`'ı düzeltir; ancak `input_ch` artık iki elemanlı bir demet yayınlıyor ve `heavyProcess` hâlâ tek bir değer beklerken tüm demeti alıyor. Demet, betikteki Bash komutuna `[sample_005, /path/sample_005.fastq.gz]` olarak aktarılır ve 2 çıkış durumuyla bir sözdizimi hatasına yol açar. - **Hata 6: heavyProcess için Hatalı Kanal Yapısı** + **Hata 7: heavyProcess için Hatalı Kanal Yapısı** ```groovy linenums="87" - heavy_ch = heavyProcess(input_ch) // HATA: input_ch artık emisyon başına 2 öğeye sahip - heavyProcess yalnızca 1'e (ilkine) ihtiyaç duyuyor + heavy_ch = heavyProcess(input_ch) // HATA: input_ch artık 2 elemanlı demet yayınlıyor; heavyProcess yalnızca ilk elemana ihtiyaç duyuyor ``` - **Düzeltme:** Doğru kanalı kullanın ve örnek kimliklerini çıkarın + **Düzeltme:** Yalnızca örnek kimliklerini iletin ```groovy linenums="87" heavy_ch = heavyProcess(input_ch.map{it[0]}) ``` - Artık biraz daha ilerliyoruz; ancak bir Bash değişkenini kaçırmadığımız için `No such variable: i` hatası alıyoruz. - - **Hata 7: Bash Değişkeni Kaçırma Hatası** - ```groovy linenums="48" - echo "Heavy computation $i for ${sample_id}" // HATA: $i kaçırılmamış - ``` - **Düzeltme:** Bash değişkenini kaçırın - ```groovy linenums="48" - echo "Heavy computation \${i} for ${sample_id}" - ``` - - Artık `Process exceeded running time limit (1ms)` hatası alıyoruz; bu nedenle ilgili süreç için çalışma süresi sınırını düzeltiyoruz: + Artık `heavyProcess` çalışıyor; ancak zaman sınırına takılıyor. `local` yürütücüde mesaj, açık bir zaman aşımı yerine `process hasn't exited` (ve `WARN: Killing running tasks` uyarısı) şeklinde görünür; bu nedenle durdurulan görevi `time` yönergesine bağlayın: **Hata 8: Kaynak Yapılandırma Hatası** ```groovy linenums="36" @@ -2397,7 +2400,7 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy time '100 s' ``` - Ardından çözülmesi gereken bir `Missing output file(s)` hatası var: + Ardından çözülmesi gereken bir `Missing output file(s)` hatası var; çünkü betik `${sample_id}.txt` yazıyor ancak çıktı bildirimi `${sample_id}_heavy.txt` bekliyor: **Hata 9: Çıktı Dosyası Adı Uyuşmazlığı** ```groovy linenums="49" @@ -2408,9 +2411,9 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy done > ${sample_id}_heavy.txt ``` - İlk iki süreç çalıştı; ancak üçüncüsü çalışmadı. + İş akışı artık hatasız tamamlanıyor; ancak `files` çıktısı boş: `handleFiles` hiç çalışmadı. Girdi kanalı olan `channel.fromPath("*.txt")`, başlatma dizininde hiçbir dosyayla eşleşmediğinden süreç sessizce atlanıyor. - **Hata 10: Çıktı Dosyası Adı Uyuşmazlığı** + **Hata 10: Yanlış Kanal Kaynağı** ```groovy linenums="88" file_ch = channel.fromPath("*.txt") // Hata: Bir süreçten değil, mevcut çalışma dizininden girdi almaya çalışıyor handleFiles(file_ch) @@ -2420,7 +2423,7 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy file_ch = handleFiles(heavy_ch) ``` - Bununla birlikte tüm iş akışı çalışmalıdır. + Bununla birlikte tüm iş akışı baştan sona çalışır ve üç çıktının tamamı doldurulur. **Tam Düzeltilmiş İş Akışı:** ```groovy linenums="1" @@ -2471,7 +2474,7 @@ Artık sistematik hata ayıklama yaklaşımını pratiğe dökme zamanı. `buggy script: """ # Ağır hesaplamayı simüle et - for i in {1..1000000}; do + for i in {1..10000}; do echo "Heavy computation \$i for ${sample_id}" done > ${sample_id}_heavy.txt """ diff --git a/docs/tr/docs/side_quests/dev_environment/index.md b/docs/tr/docs/side_quests/dev_environment/index.md index 6d926c8c06..42838a3e59 100644 --- a/docs/tr/docs/side_quests/dev_environment/index.md +++ b/docs/tr/docs/side_quests/dev_environment/index.md @@ -74,7 +74,7 @@ tree . │ └── utils.nf └── nextflow.config -3 directories, 12 files +2 directories, 12 files ``` !!! note "Örnek Dosyalar Hakkında" diff --git a/docs/tr/docs/side_quests/essential_scripting_patterns/index.md b/docs/tr/docs/side_quests/essential_scripting_patterns/index.md index a4692de612..7c671fdfc0 100644 --- a/docs/tr/docs/side_quests/essential_scripting_patterns/index.md +++ b/docs/tr/docs/side_quests/essential_scripting_patterns/index.md @@ -55,7 +55,7 @@ cd side-quests/essential_scripting_patterns Ana iş akışı dosyasını ve örnek veri dosyalarını içeren bir `data` dizinini bulacaksınız. -```console title="Dizin içeriği" +```console title="Directory contents" . ├── collect.nf ├── data @@ -83,10 +83,6 @@ SAMPLE_003,human,kidney,45000000,data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, Gerçek biyoinformatik iş akışlarında karşılaşacağınız pratik programlama tekniklerini keşfetmek için bu gerçekçi veri kümesini kullanacağız. - - - - #### Hazırlık kontrol listesi Başlamaya hazır mısınız? @@ -112,9 +108,19 @@ CSV dosyasını yalnızca okuyan basit bir iş akışıyla başlayın (`main.nf` ```groovy title="main.nf" linenums="1" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() + + publish: + reports = channel.empty() +} + +output { + reports { + path 'reports' + } } ``` @@ -129,11 +135,19 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - Launching `main.nf` [marvelous_tuckerman] DSL2 - revision: 6113e05c17 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [exotic_salas] revision: d915f0414b [sample_id:SAMPLE_001, organism:human, tissue_type:liver, sequencing_depth:30000000, file_path:data/sequences/SAMPLE_001_S1_L001_R1_001.fastq, quality_score:38.5] [sample_id:SAMPLE_002, organism:mouse, tissue_type:brain, sequencing_depth:25000000, file_path:data/sequences/SAMPLE_002_S2_L001_R1_001.fastq, quality_score:35.2] [sample_id:SAMPLE_003, organism:human, tissue_type:kidney, sequencing_depth:45000000, file_path:data/sequences/SAMPLE_003_S3_L001_R1_001.fastq, quality_score:42.1] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` #### 1.1.2. Map Operatörünü Eklemek @@ -148,7 +162,7 @@ Map işleminin nasıl göründüğü aşağıdadır: === "Sonra" - ```groovy title="main.nf" linenums="2" hl_lines="3-6" + ```groovy title="main.nf" linenums="3" hl_lines="3-6" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -159,7 +173,7 @@ Map işleminin nasıl göründüğü aşağıdadır: === "Önce" - ```groovy title="main.nf" linenums="2" hl_lines="3" + ```groovy title="main.nf" linenums="3" hl_lines="3" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .view() @@ -185,7 +199,7 @@ Girdiyi değiştirmeden döndürdüğümüz için öncekiyle aynı çıktıyı g === "Sonra" - ```groovy title="main.nf" linenums="2" hl_lines="4-12" + ```groovy title="main.nf" linenums="3" hl_lines="4-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -204,7 +218,7 @@ Girdiyi değiştirmeden döndürdüğümüz için öncekiyle aynı çıktıyı g === "Önce" - ```groovy title="main.nf" linenums="2" hl_lines="4" + ```groovy title="main.nf" linenums="3" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -239,7 +253,7 @@ Aşağıdaki değişikliği yapın: === "Sonra" - ```groovy title="main.nf" linenums="2" hl_lines="11-12" + ```groovy title="main.nf" linenums="3" hl_lines="11-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -258,7 +272,7 @@ Aşağıdaki değişikliği yapın: === "Önce" - ```groovy title="main.nf" linenums="2" hl_lines="11" + ```groovy title="main.nf" linenums="3" hl_lines="11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -306,7 +320,7 @@ Yalnızca kimlik alanlarını içeren, meta verilerimizin basitleştirilmiş bir === "Sonra" - ```groovy title="main.nf" linenums="2" hl_lines="12-15" + ```groovy title="main.nf" linenums="3" hl_lines="12-13" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -319,7 +333,7 @@ Yalnızca kimlik alanlarını içeren, meta verilerimizin basitleştirilmiş bir quality: row.quality_score.toDouble() ] def id_only = sample_meta.subMap(['id', 'organism', 'tissue']) - println "Yalnızca kimlik alanları: ${id_only}" + println "ID fields only: ${id_only}" def priority = sample_meta.quality > 40 ? 'high' : 'normal' return sample_meta + [priority: priority] @@ -329,7 +343,7 @@ Yalnızca kimlik alanlarını içeren, meta verilerimizin basitleştirilmiş bir === "Önce" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -356,16 +370,22 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [peaceful_cori] DSL2 - revision: 4cc4a8340f + Launching `main.nf` [focused_goldwasser] revision: d9c7a39dec - Yalnızca kimlik alanları: [id:sample_001, organism:human, tissue:liver] - Yalnızca kimlik alanları: [id:sample_002, organism:mouse, tissue:brain] - Yalnızca kimlik alanları: [id:sample_003, organism:human, tissue:kidney] + ID fields only: [id:sample_001, organism:human, tissue:liver] [id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, priority:normal] + ID fields only: [id:sample_002, organism:mouse, tissue:brain] [id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, priority:normal] + ID fields only: [id:sample_003, organism:human, tissue:kidney] [id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, priority:high] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Bu çıktı, `view()` işlemiyle görüntülenen tam meta veriyi ve `println` ile yazdırdığımız çıkarılmış alt kümeyi birlikte göstermektedir. @@ -390,7 +410,7 @@ Bu yöntem, farklı süreçler için farklı meta veri sürümleri oluşturmanı === "Sonra" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -409,7 +429,7 @@ Bu yöntem, farklı süreçler için farklı meta veri sürümleri oluşturmanı === "Önce" - ```groovy title="main.nf" linenums="2" hl_lines="12" + ```groovy title="main.nf" linenums="3" hl_lines="12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -461,9 +481,9 @@ def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - birden fazla kanal yayınını tek bir yayında gruplar ch_input = channel.fromList(sample_ids) -ch_input.view { sample -> "Bireysel kanal öğesi: ${sample}" } +ch_input.view { sample -> "Individual channel item: ${sample}" } ch_collected = ch_input.collect() -ch_collected.view { list -> "channel.collect() sonucu: ${list} (${list.size()} öğe tek bir öğede gruplandı)" } +ch_collected.view { list -> "channel.collect() result: ${list} (${list.size()} items grouped into 1)" } ``` Adımlar: @@ -485,14 +505,14 @@ nextflow run collect.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [loving_mendel] DSL2 - revision: e8d054a46e + Launching `collect.nf` [friendly_jones] revision: 5b2b07e824 - Bireysel kanal öğesi: sample_001 - Bireysel kanal öğesi: sample_002 - Bireysel kanal öğesi: sample_003 - channel.collect() sonucu: [sample_001, sample_002, sample_003] (3 öğe tek bir öğede gruplandı) + Individual channel item: sample_001 + Individual channel item: sample_002 + Individual channel item: sample_003 + channel.collect() result: [sample_001, sample_002, sample_003] (3 items grouped into 1) ``` `view()` her kanal yayını için bir çıktı döndürür; dolayısıyla bu tek çıktının orijinal 3 öğeyi tek bir listede grupladığını biliyoruz. @@ -501,32 +521,32 @@ nextflow run collect.nf === "Sonra" - ```groovy title="main.nf" linenums="1" hl_lines="9-13" + ```groovy title="collect.nf" linenums="1" hl_lines="9-13" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - birden fazla kanal yayınını tek bir yayında gruplar ch_input = channel.fromList(sample_ids) - ch_input.view { sample -> "Bireysel kanal öğesi: ${sample}" } + ch_input.view { sample -> "Individual channel item: ${sample}" } ch_collected = ch_input.collect() - ch_collected.view { list -> "channel.collect() sonucu: ${list} (${list.size()} öğe tek bir öğede gruplandı)" } + ch_collected.view { list -> "channel.collect() result: ${list} (${list.size()} items grouped into 1)" } // List.collect() - her öğeyi dönüştürür, yapıyı korur def formatted_ids = sample_ids.collect { id -> id.toUpperCase().replace('SAMPLE_', 'SPECIMEN_') } - println "List.collect() sonucu: ${formatted_ids} (${sample_ids.size()} öğe ${formatted_ids.size()} öğeye dönüştürüldü)" + println "List.collect() result: ${formatted_ids} (${sample_ids.size()} items transformed into ${formatted_ids.size()})" ``` === "Önce" - ```groovy title="main.nf" linenums="1" + ```groovy title="collect.nf" linenums="1" def sample_ids = ['sample_001', 'sample_002', 'sample_003'] // channel.collect() - birden fazla kanal yayınını tek bir yayında gruplar ch_input = channel.fromList(sample_ids) - ch_input.view { sample -> "Bireysel kanal öğesi: ${sample}" } + ch_input.view { sample -> "Individual channel item: ${sample}" } ch_collected = ch_input.collect() - ch_collected.view { list -> "channel.collect() sonucu: ${list} (${list.size()} öğe tek bir öğede gruplandı)" } + ch_collected.view { list -> "channel.collect() result: ${list} (${list.size()} items grouped into 1)" } ``` Bu yeni kod parçasında: @@ -543,15 +563,15 @@ nextflow run collect.nf ??? success "Komut çıktısı" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cheeky_stonebraker] DSL2 - revision: 2d5039fb47 + Launching `collect.nf` [lethal_caravaggio] revision: 48f3dcbb7b - List.collect() sonucu: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 öğe 3 öğeye dönüştürüldü) - Bireysel kanal öğesi: sample_001 - Bireysel kanal öğesi: sample_002 - Bireysel kanal öğesi: sample_003 - channel.collect() sonucu: [sample_001, sample_002, sample_003] (3 öğe tek bir öğede gruplandı) + List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) + Individual channel item: sample_001 + Individual channel item: sample_002 + Individual channel item: sample_003 + channel.collect() result: [sample_001, sample_002, sample_003] (3 items grouped into 1) ``` Bu sefer verinin yapısını DEĞİŞTİRMEDİK; listede hâlâ 3 öğe var. Ancak List'in `collect` yöntemiyle her öğeyi DÖNÜŞTÜRDÜKve değiştirilmiş değerlere sahip yeni bir liste elde ettik. Bu, bir kanal üzerinde `map` operatörü kullanmaya benzer; ancak kanal yerine bir List veri yapısı üzerinde çalışmaktadır. @@ -571,20 +591,20 @@ List'in `collect` yöntemiyle ilişkili olan spread operatörü (`*.`), koleksiy // channel.collect() - birden fazla kanal yayınını tek bir yayında gruplar ch_input = channel.fromList(sample_ids) - ch_input.view { sample -> "Bireysel kanal öğesi: ${sample}" } + ch_input.view { sample -> "Individual channel item: ${sample}" } ch_collected = ch_input.collect() - ch_collected.view { list -> "channel.collect() sonucu: ${list} (${list.size()} öğe tek bir öğede gruplandı)" } + ch_collected.view { list -> "channel.collect() result: ${list} (${list.size()} items grouped into 1)" } // List.collect() - her öğeyi dönüştürür, yapıyı korur def formatted_ids = sample_ids.collect { id -> id.toUpperCase().replace('SAMPLE_', 'SPECIMEN_') } - println "List.collect() sonucu: ${formatted_ids} (${sample_ids.size()} öğe ${formatted_ids.size()} öğeye dönüştürüldü)" + println "List.collect() result: ${formatted_ids} (${sample_ids.size()} items transformed into ${formatted_ids.size()})" // Spread operatörü - kısa ve öz özellik erişimi def sample_data = [[id: 's1', quality: 38.5], [id: 's2', quality: 42.1], [id: 's3', quality: 35.2]] def all_ids = sample_data*.id - println "Spread operatörü sonucu: ${all_ids}" + println "Spread operator result: ${all_ids}" ``` === "Önce" @@ -594,36 +614,36 @@ List'in `collect` yöntemiyle ilişkili olan spread operatörü (`*.`), koleksiy // channel.collect() - birden fazla kanal yayınını tek bir yayında gruplar ch_input = channel.fromList(sample_ids) - ch_input.view { sample -> "Bireysel kanal öğesi: ${sample}" } + ch_input.view { sample -> "Individual channel item: ${sample}" } ch_collected = ch_input.collect() - ch_collected.view { list -> "channel.collect() sonucu: ${list} (${list.size()} öğe tek bir öğede gruplandı)" } + ch_collected.view { list -> "channel.collect() result: ${list} (${list.size()} items grouped into 1)" } // List.collect() - her öğeyi dönüştürür, yapıyı korur def formatted_ids = sample_ids.collect { id -> id.toUpperCase().replace('SAMPLE_', 'SPECIMEN_') } - println "List.collect() sonucu: ${formatted_ids} (${sample_ids.size()} öğe ${formatted_ids.size()} öğeye dönüştürüldü)" + println "List.collect() result: ${formatted_ids} (${sample_ids.size()} items transformed into ${formatted_ids.size()})" ``` Güncellenmiş iş akışını çalıştırın: -```bash title="Spread operatörünü test edin" +```bash title="Test spread operator" nextflow run collect.nf ``` ??? success "Komut çıktısı" ```console hl_lines="6" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `collect.nf` [cranky_galileo] DSL2 - revision: 5f3c8b2a91 + Launching `collect.nf` [adoring_visvesvaraya] revision: 915ce68e4d - List.collect() sonucu: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 öğe 3 öğeye dönüştürüldü) - Spread operatörü sonucu: [s1, s2, s3] - Bireysel kanal öğesi: sample_001 - Bireysel kanal öğesi: sample_002 - Bireysel kanal öğesi: sample_003 - channel.collect() sonucu: [sample_001, sample_002, sample_003] (3 öğe tek bir öğede gruplandı) + List.collect() result: [SPECIMEN_001, SPECIMEN_002, SPECIMEN_003] (3 items transformed into 3) + Spread operator result: [s1, s2, s3] + Individual channel item: sample_001 + Individual channel item: sample_002 + Individual channel item: sample_003 + channel.collect() result: [sample_001, sample_002, sample_003] (3 items grouped into 1) ``` Spread operatörü `*.`, yaygın bir collect kalıbı için kısayoldur: @@ -673,7 +693,7 @@ Mevcut `main.nf` iş akışınızda aşağıdaki değişikliği yapın: === "Sonra" - ```groovy title="main.nf" linenums="4" hl_lines="10-21" + ```groovy title="main.nf" linenums="5" hl_lines="10-21" .map { row -> // Veri dönüşümü için betik yazımı def sample_meta = [ @@ -700,7 +720,7 @@ Mevcut `main.nf` iş akışınızda aşağıdaki değişikliği yapın: === "Önce" - ```groovy title="main.nf" linenums="4" hl_lines="10-11" + ```groovy title="main.nf" linenums="5" hl_lines="10-11" .map { row -> // Veri dönüşümü için betik yazımı def sample_meta = [ @@ -736,20 +756,26 @@ Bu, meta veriyi otomatik olarak çıkarmak için Illumina tarzı adlandırma kur Değiştirilen iş akışını çalıştırın: -```bash title="Kalıp eşleştirmeyi test edin" +```bash title="Test pattern matching" nextflow run main.nf ``` ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_pauling] DSL2 - revision: 605d2058b4 + Launching `main.nf` [nasty_brazil] revision: 723ff4e5e6 [[id:sample_001, organism:human, tissue:liver, depth:30000000, quality:38.5, sample_num:1, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_001_S1_L001_R1_001.fastq] [[id:sample_002, organism:mouse, tissue:brain, depth:25000000, quality:35.2, sample_num:2, lane:001, read:R1, chunk:001, priority:normal], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_002_S2_L001_R1_001.fastq] [[id:sample_003, organism:human, tissue:kidney, depth:45000000, quality:42.1, sample_num:3, lane:001, read:R1, chunk:001, priority:high], /workspaces/training/side-quests/essential_scripting_patterns/data/sequences/SAMPLE_003_S3_L001_R1_001.fastq] + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Bu çıktı, dosya adlarından zenginleştirilmiş meta veriyi göstermektedir. @@ -796,8 +822,9 @@ Ardından `ch_samples` kanalını `FASTP` sürecine bağlamak için `workflow` b === "Sonra" - ```groovy title="main.nf" linenums="25" hl_lines="27" + ```groovy title="main.nf" linenums="25" hl_lines="28" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -824,13 +851,23 @@ Ardından `ch_samples` kanalını `FASTP` sürecine bağlamak için `workflow` b } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` === "Önce" - ```groovy title="main.nf" linenums="25" hl_lines="26" + ```groovy title="main.nf" linenums="25" hl_lines="27" workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) @@ -853,9 +890,18 @@ Ardından `ch_samples` kanalını `FASTP` sürecine bağlamak için `workflow` b ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' - return [sample_meta + file_meta + [priority: priority], file(row.file_path)] + return tuple(sample_meta + file_meta + [priority: priority], fastq_path) } .view() + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` @@ -868,28 +914,41 @@ nextflow run main.nf ??? failure "Komut çıktısı" ```console - ERROR ~ Error executing process > 'FASTP (3)' + ERROR ~ Error executing process > 'FASTP (2)' Caused by: - Process `FASTP (3)` terminated with an error exit status (255) + Process `FASTP (2)` terminated with an error exit status (255) Command executed: fastp \ - --in1 SAMPLE_003_S3_L001_R1_001.fastq \ + --in1 SAMPLE_002_S2_L001_R1_001.fastq \ --in2 null \ - --out1 sample_003_trimmed_R1.fastq.gz \ - --out2 sample_003_trimmed_R2.fastq.gz \ - --json sample_003.fastp.json \ - --html sample_003.fastp.html \ - --thread 2 + --out1 sample_002_trimmed_R1.fastq.gz \ + --out2 sample_002_trimmed_R2.fastq.gz \ + --json sample_002.fastp.json \ + --html sample_002.fastp.html \ + --thread 1 Command exit status: 255 Command output: (empty) + + Command error: + ERROR: Failed to open file: null + + Work dir: + /workspaces/training/side-quests/essential_scripting_patterns/work/8b/5b15c8cf35259a87db0137312d6d06 + + Container: + community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 + + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` + + -- Check '.nextflow.log' file for details ``` Sürecin ikinci girdi dosyası için `null` değeriyle `fastp` çalıştırmaya çalıştığını ve bu nedenle başarısız olduğunu görebilirsiniz. Bunun nedeni, veri kümemizin tek uçlu okumalar içermesi, ancak sürecin çift uçlu okumalar (aynı anda iki girdi dosyası) beklediği şekilde sabit kodlanmış olmasıdır. @@ -953,18 +1012,24 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_rosalind] DSL2 - revision: 04b1cd93e9 + Launching `main.nf` [distracted_bohr] revision: b9b1c249c1 executor > local (3) - [31/a8ad4d] process > FASTP (3) [100%] 3 of 3 ✔ + [d9/542a41] FASTP (1) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: ``` Harika görünüyor! Çalıştırılan gerçek komutları kontrol edersek (görev hash'inize göre özelleştirin): -```console title="Çalıştırılan komutları kontrol edin" -cat work/31/a8ad4d95749e685a6d842d3007957f/.command.sh +```console title="Check commands executed" +cat work/d9/542a41xxxxxxxxxxxxxxxxxxxxxxxxxx/.command.sh ``` Nextflow'un tek uçlu okumalar için doğru komutu seçtiğini görebiliriz: @@ -976,12 +1041,12 @@ fastp \ --out1 sample_003_trimmed.fastq.gz \ --json sample_003.fastp.json \ --html sample_003.fastp.html \ - --thread 2 + --thread 1 ``` Dinamik betik mantığının başka bir yaygın kullanımı [Nextflow for Science Genomics modülünde](../../nf4_science/genomics/03_joint_calling.md) görülebilir. O modülde çağrılan GATK süreci birden fazla girdi dosyası alabilir, ancak doğru bir komut satırı oluşturmak için her birinin başına `-V` eklenmelidir. Süreç, bir girdi dosyaları koleksiyonunu (`all_gvcfs`) doğru komut argümanlarına dönüştürmek için betik yazımını kullanır: -```groovy title="GATK için komut satırı işleme" linenums="1" hl_lines="2 5" +```groovy title="command line manipulation for GATK" linenums="1" hl_lines="2 5" script: def gvcfs_line = all_gvcfs.collect { gvcf -> "-V ${gvcf}" }.join(' ') """ @@ -1011,8 +1076,8 @@ process GENERATE_REPORT { script: """ - echo "İşleniyor: ${reads}" > ${meta.id}_report.txt - echo "Örnek: ${meta.id}" >> ${meta.id}_report.txt + echo "Processing ${reads}" > ${meta.id}_report.txt + echo "Sample: ${meta.id}" >> ${meta.id}_report.txt """ } ``` @@ -1023,11 +1088,12 @@ Süreci `main.nf` dosyanıza dahil edin ve iş akışına ekleyin: === "Sonra" - ```groovy title="main.nf" linenums="1" hl_lines="2 30" + ```groovy title="main.nf" linenums="1" hl_lines="2 31" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1054,15 +1120,25 @@ Süreci `main.nf` dosyanıza dahil edin ve iş akışına ekleyin: ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Önce" - ```groovy title="main.nf" linenums="1" hl_lines="1 28" + ```groovy title="main.nf" linenums="1" hl_lines="1 29" include { FASTP } from './modules/fastp.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1088,17 +1164,44 @@ Süreci `main.nf` dosyanıza dahil edin ve iş akışına ekleyin: } ch_fastp = FASTP(ch_samples) + + publish: + reports = channel.empty() + } + + output { + reports { + path 'reports' + } } ``` Şimdi iş akışını çalıştırın ve `results/reports/` dizinindeki oluşturulan raporları kontrol edin. Her örnek hakkında temel bilgiler içermeleri gerekir. - +```bash +nextflow run main.nf +``` ??? success "Komut çıktısı" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [festering_payne] - revision: 3690c7806d + [31/870279] Submitted process > FASTP (1) + [52/c9fb45] Submitted process > GENERATE_REPORT (1) + [a2/00d26a] Submitted process > GENERATE_REPORT (3) + [61/c169b0] Submitted process > FASTP (2) + [a1/11c8b1] Submitted process > GENERATE_REPORT (2) + [d8/40aa79] Submitted process > FASTP (3) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt ``` Peki işlemenin ne zaman ve nerede gerçekleştiğine dair bilgi eklemek istersek? Rapora geçerli kullanıcıyı, ana bilgisayar adını ve tarihi dahil etmek için **kabuk** değişkenlerini ve komut ikamesini kullanalım: @@ -1108,11 +1211,11 @@ Peki işlemenin ne zaman ve nerede gerçekleştiğine dair bilgi eklemek isterse ```groovy title="modules/generate_report.nf" linenums="10" hl_lines="5-7" script: """ - echo "İşleniyor: ${reads}" > ${meta.id}_report.txt - echo "Örnek: ${meta.id}" >> ${meta.id}_report.txt - echo "İşleyen: ${USER}" >> ${meta.id}_report.txt - echo "Ana bilgisayar: $(hostname)" >> ${meta.id}_report.txt - echo "Tarih: $(date)" >> ${meta.id}_report.txt + echo "Processing ${reads}" > ${meta.id}_report.txt + echo "Sample: ${meta.id}" >> ${meta.id}_report.txt + echo "Processed by: ${USER}" >> ${meta.id}_report.txt + echo "Hostname: $(hostname)" >> ${meta.id}_report.txt + echo "Date: $(date)" >> ${meta.id}_report.txt """ ``` @@ -1121,8 +1224,8 @@ Peki işlemenin ne zaman ve nerede gerçekleştiğine dair bilgi eklemek isterse ```groovy title="modules/generate_report.nf" linenums="10" script: """ - echo "İşleniyor: ${reads}" > ${meta.id}_report.txt - echo "Örnek: ${meta.id}" >> ${meta.id}_report.txt + echo "Processing ${reads}" > ${meta.id}_report.txt + echo "Sample: ${meta.id}" >> ${meta.id}_report.txt """ ``` @@ -1131,11 +1234,18 @@ Bunu çalıştırırsanız bir hata fark edeceksiniz; Nextflow, `#!groovy ${USER ??? failure "Komut çıktısı" ```console - Error modules/generate_report.nf:15:27: `USER` is not defined - │ 15 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [furious_euclid] revision: 3690c7806d + + Error modules/generate_report.nf:13:27: `USER` is not defined + │ 13 | echo "Processed by: ${USER}" >> ${meta.id}_report.txt ╰ | ^^^^ + ERROR ~ Script compilation failed + + -- Check '.nextflow.log' file for details ``` Bash'in bunu işleyebilmesi için kaçış karakteri eklememiz gerekiyor. @@ -1147,11 +1257,11 @@ Kabuk değişkenlerini ve komut ikamelerini ters eğik çizgi (`\`) ile kaçıra ```groovy title="modules/generate_report.nf" linenums="10" hl_lines="5-7" script: """ - echo "İşleniyor: ${reads}" > ${meta.id}_report.txt - echo "Örnek: ${meta.id}" >> ${meta.id}_report.txt - echo "İşleyen: \${USER}" >> ${meta.id}_report.txt - echo "Ana bilgisayar: \$(hostname)" >> ${meta.id}_report.txt - echo "Tarih: \$(date)" >> ${meta.id}_report.txt + echo "Processing ${reads}" > ${meta.id}_report.txt + echo "Sample: ${meta.id}" >> ${meta.id}_report.txt + echo "Processed by: \${USER}" >> ${meta.id}_report.txt + echo "Hostname: \$(hostname)" >> ${meta.id}_report.txt + echo "Date: \$(date)" >> ${meta.id}_report.txt """ ``` @@ -1160,11 +1270,11 @@ Kabuk değişkenlerini ve komut ikamelerini ters eğik çizgi (`\`) ile kaçıra ```groovy title="modules/generate_report.nf" linenums="10" script: """ - echo "İşleniyor: ${reads}" > ${meta.id}_report.txt - echo "Örnek: ${meta.id}" >> ${meta.id}_report.txt - echo "İşleyen: ${USER}" >> ${meta.id}_report.txt - echo "Ana bilgisayar: $(hostname)" >> ${meta.id}_report.txt - echo "Tarih: $(date)" >> ${meta.id}_report.txt + echo "Processing ${reads}" > ${meta.id}_report.txt + echo "Sample: ${meta.id}" >> ${meta.id}_report.txt + echo "Processed by: ${USER}" >> ${meta.id}_report.txt + echo "Hostname: $(hostname)" >> ${meta.id}_report.txt + echo "Date: $(date)" >> ${meta.id}_report.txt """ ``` @@ -1195,7 +1305,7 @@ Mevcut iş akışımızla bunun nasıl göründüğünü göstermek için aşağ === "Sonra" - ```groovy title="main.nf" linenums="1" hl_lines="4-24 29" + ```groovy title="main.nf" linenums="1" hl_lines="4-24 30" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1222,22 +1332,33 @@ Mevcut iş akışımızla bunun nasıl göründüğünü göstermek için aşağ } workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` === "Önce" - ```groovy title="main.nf" linenums="1" hl_lines="7-27" + ```groovy title="main.nf" linenums="1" hl_lines="8-28" include { FASTP } from './modules/fastp.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> @@ -1264,12 +1385,21 @@ Mevcut iş akışımızla bunun nasıl göründüğünü göstermek için aşağ ch_fastp = FASTP(ch_samples) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out + } + + output { + reports { + path 'reports' + } } ``` Bu mantığı bir fonksiyona çıkararak gerçek iş akışı mantığını çok daha temiz bir hale getirdik: -```groovy title="minimal iş akışı" +```groovy title="minimal workflow" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1289,13 +1419,22 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_panini] DSL2 - revision: 8cc832e32f + Launching `main.nf` [peaceful_plateau] revision: 918c15451f executor > local (6) - [8c/2e3f91] process > FASTP (3) [100%] 3 of 3 ✔ - [7a/1b4c92] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ + [a5/f542b1] FASTP (2) | 3 of 3 ✔ + [22/a94ad7] GENERATE_REPORT (2) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Çıktı, her iki sürecin de başarıyla tamamlandığını göstermelidir. İş akışı artık çok daha temiz ve sürdürülebilir; tüm karmaşık meta veri işleme mantığı `separateMetadata` fonksiyonunda kapsüllenmiştir. @@ -1359,26 +1498,35 @@ nextflow run main.nf -ansi-log false ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [fervent_albattani] DSL2 - revision: fa8f249759 - [bd/ff3d41] Submitted process > FASTP (2) - [a4/a3aab2] Submitted process > FASTP (1) - [48/6db0c9] Submitted process > FASTP (3) - [ec/83439d] Submitted process > GENERATE_REPORT (3) - [bd/15d7cc] Submitted process > GENERATE_REPORT (2) - [42/699357] Submitted process > GENERATE_REPORT (1) + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [naughty_kay] - revision: 918c15451f + [1e/d9a972] Submitted process > GENERATE_REPORT (2) + [ef/820ed7] Submitted process > GENERATE_REPORT (3) + [f6/ab4b70] Submitted process > FASTP (1) + [5b/748d5a] Submitted process > GENERATE_REPORT (1) + [7b/d99953] Submitted process > FASTP (3) + [37/291870] Submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_002_report.txt + - reports/sample_003_report.txt + - reports/sample_001_report.txt ``` Herhangi bir görev için CPU tahsisini görmek amacıyla çalıştırılan `docker` komutunu kontrol edebilirsiniz: -```console title="Docker komutunu kontrol edin" -cat work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.run | grep "docker run" +```console title="Check docker command" +cat work/7b/d999535cfcdfb6865b4e63cddc3987/.command.run | grep "docker run" ``` Şuna benzer bir şey görmelisiniz: -```bash title="docker komutu" - docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/48/6db0c9e9d8aa65e4bb4936cd3bd59e/.command.sh +```bash title="docker command" + docker run -i --cpu-shares 2048 --memory 2048m -e "NXF_TASK_WORKDIR" -v /workspaces/training/side-quests/essential_scripting_patterns:/workspaces/training/side-quests/essential_scripting_patterns -w "$NXF_TASK_WORKDIR" --name $NXF_BOXID community.wave.seqera.io/library/fastp:0.24.0--62c97b06e8447690 /bin/bash -ue /workspaces/training/side-quests/essential_scripting_patterns/work/7b/d999535cfcdfb6865b4e63cddc3987/.command.sh ``` Bu örnekte yüksek derinlikli bir örnek olduğu için 2 CPU talep eden bir örnek seçtik (`--cpu-shares 2048`); ancak örnek derinliğine bağlı olarak farklı CPU tahsisleri görmelisiniz. Diğer görevler için de bunu deneyin. @@ -1432,7 +1580,7 @@ nextflow run main.nf Detecting adapter sequence for read1... No adapter detected for read1 - .command.sh: line 7: 101 Killed fastp --in1 SAMPLE_002_S2_L001_R1_001.fastq --out1 sample_002_trimmed.fastq.gz --json sample_002.fastp.json --html sample_002.fastp.html --thread 1 + .command.sh: line 7: 34 Killed fastp --in1 SAMPLE_001_S1_L001_R1_001.fastq --out1 sample_001_trimmed.fastq.gz --json sample_001.fastp.json --html sample_001.fastp.html --thread 1 ``` Bu, sürecin bellek sınırını aştığı için sonlandırıldığını göstermektedir. @@ -1520,7 +1668,7 @@ Nextflow'un [veri akışı operatörleri](https://www.nextflow.io/docs/latest/re === "Sonra" - ```groovy title="main.nf" linenums="28" hl_lines="5-12" + ```groovy title="main.nf" linenums="29" hl_lines="5-12" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1538,7 +1686,7 @@ Nextflow'un [veri akışı operatörleri](https://www.nextflow.io/docs/latest/re === "Önce" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1556,14 +1704,26 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [adoring_galileo] DSL2 - revision: c9e83aaef1 + Launching `main.nf` [condescending_venter] revision: 02a7ca6f13 - executor > local (6) - [1d/0747ac] process > FASTP (2) [100%] 2 of 2 ✔ - [cc/c44caf] process > TRIMGALORE (1) [100%] 1 of 1 ✔ - [34/bd5a9f] process > GENERATE_REPORT (1) [100%] 3 of 3 ✔ + executor > local (8) + [8b/40c882] FASTP (1) | 2 of 2, retries: 2 ✔ + [59/988a68] TRIMGALORE (1) | 1 of 1 ✔ + [01/2df2d4] GENERATE_REPORT (3) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt + + [0a/8bb1dd] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [af/76bc6f] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) ``` Burada, örnekleri meta verilerine göre yönlendirmek için `.branch{}` operatörü içinde küçük ama güçlü koşullu ifadeler kullandık. Yüksek kapsama sahip insan örnekleri `FASTP`'tan geçerken diğer tüm örnekler `TRIMGALORE`'dan geçer. @@ -1583,7 +1743,7 @@ Dal işleminden önce aşağıdakini ekleyin: === "Sonra" - ```groovy title="main.nf" linenums="28" hl_lines="5-11" + ```groovy title="main.nf" linenums="29" hl_lines="5-11" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1603,7 +1763,7 @@ Dal işleminden önce aşağıdakini ekleyin: === "Önce" - ```groovy title="main.nf" linenums="28" hl_lines="5" + ```groovy title="main.nf" linenums="29" hl_lines="5" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map { row -> separateMetadata(row) } @@ -1624,21 +1784,31 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [lonely_williams] DSL2 - revision: d0b3f121ec - [94/b48eac] Submitted process > FASTP (2) - [2c/d2b28f] Submitted process > GENERATE_REPORT (2) - [65/2e3be4] Submitted process > GENERATE_REPORT (1) - [94/b48eac] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) - [3e/0d8664] Submitted process > TRIMGALORE (1) - [6a/9137b0] Submitted process > FASTP (1) - [6a/9137b0] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) - [83/577ac0] Submitted process > GENERATE_REPORT (3) - [a2/5117de] Re-submitted process > FASTP (1) - [1f/a1a4ca] Re-submitted process > FASTP (2) - ``` - -Bazı örnekleri dışlayan bir filtre seçtiğimiz için daha az görev çalıştırıldı. + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [disturbed_jepsen] - revision: 7097b98dd8 + [5b/a38d75] Submitted process > FASTP (2) + [b3/cc56c7] Submitted process > FASTP (1) + [01/feef56] Submitted process > GENERATE_REPORT (3) + [9b/e944ae] Submitted process > GENERATE_REPORT (1) + [74/04af51] Submitted process > GENERATE_REPORT (2) + [24/939e1f] Submitted process > TRIMGALORE (1) + [b3/cc56c7] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [b2/90425f] Re-submitted process > FASTP (1) + [5b/a38d75] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [24/a79e73] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_001_report.txt + - reports/sample_002_report.txt + ``` + +Bu durumda üç örnek de filtreyi geçmektedir; dolayısıyla her örnek pipeline'da ilerlemeye devam eder. +Daha katı bir eşik, düşük derinlikli örnekleri dışarıda bırakır ve çalıştırılan görev sayısını azaltır. `meta.id && meta.organism && meta.depth >= 25000000` filtre ifadesi, doğruluk değerini açık karşılaştırmalarla birleştirir: @@ -1708,13 +1878,13 @@ nextflow run main.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_torvalds] DSL2 - revision: b56fbfbce2 + Launching `main.nf` [fervent_bassi] revision: c5d3df5c06 ERROR ~ Cannot invoke method toUpperCase() on null object - -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details + -- Check script 'main.nf' at line: 13 or see '.nextflow.log' file for more details ``` Bu, NullPointerException ile çöküyor. @@ -1764,7 +1934,27 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [serene_jennings] - revision: d7cb8ec312 + [6f/754af4] Submitted process > GENERATE_REPORT (2) + [fe/9b03c7] Submitted process > GENERATE_REPORT (1) + [5c/a9a73c] Submitted process > FASTP (2) + [f8/e8ad5e] Submitted process > GENERATE_REPORT (3) + [55/0e4155] Submitted process > TRIMGALORE (1) + [cb/e00b43] Submitted process > FASTP (1) + [cb/e00b43] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [5c/a9a73c] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [49/fb02c9] Re-submitted process > FASTP (1) + [e3/d3cf5f] Re-submitted process > FASTP (2) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_002_report.txt + - reports/sample_003_report.txt ``` Çökme yok! İş akışı artık eksik alanı zarif biçimde işliyor. `row.run_id` `null` olduğunda, `?.` operatörü `.toUpperCase()` çağrısını engeller ve `run_id`, istisna fırlatmak yerine `null` olur. @@ -1808,7 +1998,7 @@ Sonuçları görmek için iş akışına bir `view()` operatörü de ekleyin: === "Sonra" - ```groovy title="main.nf" linenums="30" hl_lines="4" + ```groovy title="main.nf" linenums="31" hl_lines="4" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1817,7 +2007,7 @@ Sonuçları görmek için iş akışına bir `view()` operatörü de ekleyin: === "Önce" - ```groovy title="main.nf" linenums="30" + ```groovy title="main.nf" linenums="31" ch_samples = channel.fromPath("./data/samples.csv") .splitCsv(header: true) .map{ row -> separateMetadata(row) } @@ -1870,7 +2060,7 @@ Bazen girdi parametreleri geçersizse iş akışını hemen durdurmak gerekir. N === "Sonra" - ```groovy title="main.nf" linenums="1" hl_lines="5-15 18-19" + ```groovy title="main.nf" linenums="1" hl_lines="5-15 19-20" include { FASTP } from './modules/fastp.nf' include { TRIMGALORE } from './modules/trimgalore.nf' include { GENERATE_REPORT } from './modules/generate_report.nf' @@ -1878,16 +2068,17 @@ Bazen girdi parametreleri geçersizse iş akışını hemen durdurmak gerekir. N def validateInputs() { // Girdi parametresinin sağlandığını kontrol et if (!params.input) { - error("Girdi CSV dosya yolu belirtilmedi. Lütfen --input ile belirtin") + error("Input CSV file path not provided. Please specify --input ") } // CSV dosyasının var olduğunu kontrol et if (!file(params.input).exists()) { - error("Girdi CSV dosyası bulunamadı: ${params.input}") + error("Input CSV file not found: ${params.input}") } } ... workflow { + main: validateInputs() ch_samples = channel.fromPath(params.input) ``` @@ -1901,6 +2092,7 @@ Bazen girdi parametreleri geçersizse iş akışını hemen durdurmak gerekir. N ... workflow { + main: ch_samples = channel.fromPath("./data/samples.csv") ``` @@ -1913,12 +2105,12 @@ nextflow run main.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_coulomb] DSL2 - revision: 07059399ed + Launching `main.nf` [golden_lamarck] revision: e1d7259d32 WARN: Access to undefined parameter `input` -- Initialise it to a default value eg. `params.input = some_value` - Girdi CSV dosya yolu belirtilmedi. Lütfen --input ile belirtin + Input CSV file path not provided. Please specify --input ``` İş akışı, daha sonra gizemli bir şekilde başarısız olmak yerine açık bir hata mesajıyla hemen durur. @@ -1932,11 +2124,11 @@ nextflow run main.nf --input ./data/nonexistent.csv ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cranky_gates] DSL2 - revision: 26839ae3eb + Launching `main.nf` [admiring_avogadro] revision: e1d7259d32 - Girdi CSV dosyası bulunamadı: ./data/nonexistent.csv + Input CSV file not found: ./data/nonexistent.csv ``` Son olarak, doğru dosyayla çalıştırın: @@ -1948,7 +2140,27 @@ nextflow run main.nf --input ./data/samples.csv ??? success "Komut çıktısı" ```console - + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sad_hopper] - revision: e1d7259d32 + [1d/48ab44] Submitted process > TRIMGALORE (1) + [94/f6f423] Submitted process > FASTP (1) + [ca/6bbfae] Submitted process > GENERATE_REPORT (1) + [25/18c80b] Submitted process > GENERATE_REPORT (3) + [11/caf770] Submitted process > FASTP (2) + [a6/16ae06] Submitted process > GENERATE_REPORT (2) + [11/caf770] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [94/f6f423] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [a3/cb724c] Re-submitted process > FASTP (2) + [d6/8baf95] Re-submitted process > FASTP (1) + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Bu sefer başarıyla çalışır. @@ -1962,7 +2174,7 @@ Bu sefer başarıyla çalışır. // Verinin mantıklı olduğunu doğrula if (sample_meta.depth < 30000000) { - log.warn "Düşük dizileme derinliği ${sample_meta.id} için: ${sample_meta.depth}" + log.warn "Low sequencing depth for ${sample_meta.id}: ${sample_meta.depth}" } return tuple(sample_meta + file_meta + [priority: priority], fastq_path) @@ -1987,14 +2199,24 @@ nextflow run main.nf --input ./data/samples.csv ??? warning "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [jolly_colden] revision: 608f36a239 + + executor > local (8) + [3b/e1586c] FASTP (2) | 2 of 2, retries: 2 ✔ + [8b/4286b3] TRIMGALORE (1) | 1 of 1 ✔ + [a0/761239] GENERATE_REPORT (3) | 3 of 3 ✔ - Launching `main.nf` [awesome_goldwasser] DSL2 - revision: a31662a7c1 + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt - executor > local (5) - [ce/df5eeb] process > FASTP (2) [100%] 2 of 2 ✔ - [- ] process > TRIMGALORE - - [d1/7d2b4b] process > GENERATE_REPORT (3) [100%] 3 of 3 ✔ WARN: Low sequencing depth for sample_002: 25000000 ``` @@ -2025,31 +2247,37 @@ Olay işleyicisini `main.nf` dosyanıza, iş akışı tanımınızın içine ekl === "Sonra" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) workflow.onComplete = { println "" - println "Pipeline yürütme özeti:" + println "Pipeline execution summary:" println "==========================" - println "Tamamlandı: ${workflow.complete}" - println "Süre : ${workflow.duration}" - println "Başarı : ${workflow.success}" - println "workDir : ${workflow.workDir}" - println "Çıkış kodu : ${workflow.exitStatus}" + println "Completed at: ${workflow.complete}" + println "Duration : ${workflow.duration}" + println "Success : ${workflow.success}" + println "workDir : ${workflow.workDir}" + println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` === "Önce" - ```groovy title="main.nf" linenums="66" hl_lines="4" + ```groovy title="main.nf" linenums="67" hl_lines="7" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + + publish: + reports = GENERATE_REPORT.out } ``` @@ -2064,115 +2292,153 @@ nextflow run main.nf --input ./data/samples.csv -ansi-log false ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [marvelous_boltzmann] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [sleepy_sax] - revision: 7f4b2a0423 WARN: Low sequencing depth for sample_002: 25000000 - [9b/d48e40] Submitted process > FASTP (2) - [6a/73867a] Submitted process > GENERATE_REPORT (2) - [79/ad0ac5] Submitted process > GENERATE_REPORT (1) - [f3/bda6cb] Submitted process > FASTP (1) - [34/d5b52f] Submitted process > GENERATE_REPORT (3) - - Pipeline yürütme özeti: + [1d/85ba4a] Submitted process > TRIMGALORE (1) + [4c/7c429a] Submitted process > FASTP (2) + [22/e7faf8] Submitted process > GENERATE_REPORT (1) + [2a/ade0b2] Submitted process > FASTP (1) + [1f/193864] Submitted process > GENERATE_REPORT (3) + [60/712f82] Submitted process > GENERATE_REPORT (2) + [2a/ade0b2] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [4c/7c429a] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [85/b96cbc] Re-submitted process > FASTP (1) + [a7/55b62e] Re-submitted process > FASTP (2) + + Pipeline execution summary: ========================== - Tamamlandı: 2025-10-10T12:14:24.885384+01:00 - Süre : 2.9s - Başarı : true - workDir : /workspaces/training/side-quests/essential_scripting_patterns/work - Çıkış kodu : 0 + Completed at: 2026-06-23T15:49:52.574354708Z + Duration : 4.5s + Success : true + workDir : /workspaces/training/side-quests/essential_scripting_patterns/work + exit status : 0 + + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results + + reports: + - reports/sample_001_report.txt + - reports/sample_003_report.txt + - reports/sample_002_report.txt ``` Koşullu mantık ekleyerek daha kullanışlı hale getirelim: === "Sonra" - ```groovy title="main.nf" linenums="66" hl_lines="5-22" + ```groovy title="main.nf" linenums="67" hl_lines="5-22" ch_fastp = FASTP(trim_branches.fastp) - ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) + ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) + GENERATE_REPORT(ch_samples) workflow.onComplete = { println "" - println "Pipeline yürütme özeti:" + println "Pipeline execution summary:" println "==========================" - println "Tamamlandı: ${workflow.complete}" - println "Süre : ${workflow.duration}" - println "Başarı : ${workflow.success}" - println "workDir : ${workflow.workDir}" - println "Çıkış kodu : ${workflow.exitStatus}" + println "Completed at: ${workflow.complete}" + println "Duration : ${workflow.duration}" + println "Success : ${workflow.success}" + println "workDir : ${workflow.workDir}" + println "exit status : ${workflow.exitStatus}" println "" if (workflow.success) { - println "✅ Pipeline başarıyla tamamlandı!" + println "✅ Pipeline completed successfully!" } else { - println "❌ Pipeline başarısız oldu!" - println "Hata: ${workflow.errorMessage}" + println "❌ Pipeline failed!" + println "Error: ${workflow.errorMessage}" } } + + publish: + reports = GENERATE_REPORT.out } ``` === "Önce" - ```groovy title="main.nf" linenums="66" hl_lines="5-16" + ```groovy title="main.nf" linenums="67" hl_lines="5-16" ch_fastp = FASTP(trim_branches.fastp) ch_trimgalore = TRIMGALORE(trim_branches.trimgalore) GENERATE_REPORT(ch_samples) workflow.onComplete = { println "" - println "Pipeline yürütme özeti:" + println "Pipeline execution summary:" println "==========================" - println "Tamamlandı: ${workflow.complete}" - println "Süre : ${workflow.duration}" - println "Başarı : ${workflow.success}" - println "workDir : ${workflow.workDir}" - println "Çıkış kodu : ${workflow.exitStatus}" + println "Completed at: ${workflow.complete}" + println "Duration : ${workflow.duration}" + println "Success : ${workflow.success}" + println "workDir : ${workflow.workDir}" + println "exit status : ${workflow.exitStatus}" println "" } + + publish: + reports = GENERATE_REPORT.out } ``` Artık belirtilmişse çıktı dizinini ve başarı/başarısızlık mesajını da içeren çok daha bilgilendirici bir özet elde ediyoruz: - +```bash +nextflow run main.nf +``` ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 - Launching `main.nf` [boring_linnaeus] DSL2 - revision: a31662a7c1 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [hopeful_waddington] - revision: 442ec086c8 WARN: Low sequencing depth for sample_002: 25000000 - [e5/242efc] Submitted process > FASTP (2) - [3b/74047c] Submitted process > GENERATE_REPORT (3) - [8a/7a57e6] Submitted process > GENERATE_REPORT (1) - [a8/b1a31f] Submitted process > GENERATE_REPORT (2) - [40/648429] Submitted process > FASTP (1) - - Pipeline yürütme özeti: + [e5/a71364] Submitted process > FASTP (1) + [81/c69cdc] Submitted process > FASTP (2) + [d1/368dff] Submitted process > GENERATE_REPORT (3) + [f0/19394e] Submitted process > TRIMGALORE (1) + [e3/679e45] Submitted process > GENERATE_REPORT (2) + [48/406c85] Submitted process > GENERATE_REPORT (1) + [81/c69cdc] NOTE: Process `FASTP (2)` terminated with an error exit status (137) -- Execution is retried (1) + [e5/a71364] NOTE: Process `FASTP (1)` terminated with an error exit status (137) -- Execution is retried (1) + [f8/b10ac0] Re-submitted process > FASTP (2) + [9e/49f6e2] Re-submitted process > FASTP (1) + + Pipeline execution summary: ========================== - Tamamlandı: 2025-10-10T12:16:00.522569+01:00 - Süre : 3.6s - Başarı : true - workDir : /workspaces/training/side-quests/essential_scripting_patterns/work - Çıkış kodu : 0 + Completed at: 2026-06-23T15:50:06.811854363Z + Duration : 4.4s + Success : true + workDir : /workspaces/training/side-quests/essential_scripting_patterns/work + exit status : 0 + + ✅ Pipeline completed successfully! + + Outputs: + + /workspaces/training/side-quests/essential_scripting_patterns/results - ✅ Pipeline başarıyla tamamlandı! + reports: + - reports/sample_003_report.txt + - reports/sample_002_report.txt + - reports/sample_001_report.txt ``` Dosya işlemlerini kullanarak özeti bir dosyaya da yazabilirsiniz: -```groovy title="main.nf - Özeti dosyaya yazmak" +```groovy title="main.nf - Writing summary to file" workflow { // ... iş akışı kodunuz ... workflow.onComplete = { def summary = """ - Pipeline Yürütme Özeti + Pipeline Execution Summary =========================== - Tamamlandı: ${workflow.complete} - Süre : ${workflow.duration} - Başarı : ${workflow.success} - Komut : ${workflow.commandLine} + Completed: ${workflow.complete} + Duration : ${workflow.duration} + Success : ${workflow.success} + Command : ${workflow.commandLine} """ println summary @@ -2188,48 +2454,48 @@ workflow { `onComplete`'in yanı sıra kullanabileceğiniz bir olay işleyicisi daha vardır: yalnızca iş akışı başarısız olduğunda çalışan `onError`: -```groovy title="main.nf - onError işleyicisi" +```groovy title="main.nf - onError handler" workflow { // ... iş akışı kodunuz ... workflow.onError = { println "="* 50 - println "Pipeline yürütmesi başarısız oldu!" - println "Hata mesajı: ${workflow.errorMessage}" + println "Pipeline execution failed!" + println "Error message: ${workflow.errorMessage}" println "="* 50 // Ayrıntılı hata günlüğü yaz def error_file = file("${workflow.launchDir}/error.log") error_file.text = """ - İş Akışı Hata Raporu + Workflow Error Report ===================== - Zaman: ${new Date()} - Hata: ${workflow.errorMessage} - Hata raporu: ${workflow.errorReport ?: 'Ayrıntılı rapor mevcut değil'} + Time: ${new Date()} + Error: ${workflow.errorMessage} + Error report: ${workflow.errorReport ?: 'No detailed report available'} """ - println "Hata ayrıntıları şuraya yazıldı: ${error_file}" + println "Error details written to: ${error_file}" } } ``` İş akışı betiğinizde birden fazla işleyiciyi birlikte kullanabilirsiniz: -```groovy title="main.nf - Birleşik işleyiciler" +```groovy title="main.nf - Combined handlers" workflow { // ... iş akışı kodunuz ... workflow.onError = { - println "İş akışı başarısız oldu: ${workflow.errorMessage}" + println "Workflow failed: ${workflow.errorMessage}" } workflow.onComplete = { def duration_mins = workflow.duration.toMinutes().round(2) - def status = workflow.success ? "BAŞARILI ✅" : "BAŞARISIZ ❌" + def status = workflow.success ? "SUCCESS ✅" : "FAILED ❌" println """ - Pipeline tamamlandı: ${status} - Süre: ${duration_mins} dakika + Pipeline finished: ${status} + Duration: ${duration_mins} minutes """ } } @@ -2313,10 +2579,10 @@ Bu kalıpları kendi çalışmalarınızda uygulamak, dayanıklı, üretime haz ```groovy def separateMetadata(row) { - def sample_meta = [ /* kısalık için kod gizlendi */ ] + def sample_meta = [ /* code hidden for brevity */ ] def fastq_path = file(row.file_path) def m = (fastq_path.name =~ /^(.+)_S(\d+)_L(\d{3})_(R[12])_(\d{3})\.fastq(?:\.gz)?$/) - def file_meta = m ? [ /* kısalık için kod gizlendi */ ] : [:] + def file_meta = m ? [ /* code hidden for brevity */ ] : [:] def priority = sample_meta.quality > 40 ? 'high' : 'normal' return tuple(sample_meta + file_meta + [priority: priority], fastq_path) @@ -2368,7 +2634,7 @@ Bu kalıpları kendi çalışmalarınızda uygulamak, dayanıklı, üretime haz - Groovy doğruluk değeriyle boolean değerlendirme ```groovy - if (sample.files) println "Dosyalar mevcut" + if (sample.files) println "Has files" ``` - 'Doğruluk değeri' ile veriyi alt kümelere ayırmak için `filter()` kullanmak @@ -2391,9 +2657,9 @@ Bu kalıpları kendi çalışmalarınızda uygulamak, dayanıklı, üretime haz ```groovy try { def errors = validateSample(sample) - if (errors) throw new RuntimeException("Geçersiz: ${errors.join(', ')}") + if (errors) throw new RuntimeException("Invalid: ${errors.join(', ')}") } catch (Exception e) { - println "Hata: ${e.message}" + println "Error: ${e.message}" } ``` @@ -2403,14 +2669,14 @@ Bu kalıpları kendi çalışmalarınızda uygulamak, dayanıklı, üretime haz ```groovy workflow.onComplete = { - println "Başarı : ${workflow.success}" - println "Çıkış kodu : ${workflow.exitStatus}" + println "Success : ${workflow.success}" + println "exit status : ${workflow.exitStatus}" if (workflow.success) { - println "✅ Pipeline başarıyla tamamlandı!" + println "✅ Pipeline completed successfully!" } else { - println "❌ Pipeline başarısız oldu!" - println "Hata: ${workflow.errorMessage}" + println "❌ Pipeline failed!" + println "Error: ${workflow.errorMessage}" } } ``` @@ -2422,12 +2688,12 @@ Bu kalıpları kendi çalışmalarınızda uygulamak, dayanıklı, üretime haz // Ayrıntılı hata günlüğü yaz def error_file = file("${workflow.launchDir}/error.log") error_file.text = """ - Zaman: ${new Date()} - Hata: ${workflow.errorMessage} - Hata raporu: ${workflow.errorReport ?: 'Ayrıntılı rapor mevcut değil'} + Time: ${new Date()} + Error: ${workflow.errorMessage} + Error report: ${workflow.errorReport ?: 'No detailed report available'} """ - println "Hata ayrıntıları şuraya yazıldı: ${error_file}" + println "Error details written to: ${error_file}" } ``` diff --git a/docs/tr/docs/side_quests/metadata/index.md b/docs/tr/docs/side_quests/metadata/index.md index 6defa6f44c..672bf55378 100644 --- a/docs/tr/docs/side_quests/metadata/index.md +++ b/docs/tr/docs/side_quests/metadata/index.md @@ -212,9 +212,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 [id:sampleA, character:squirrel, recording:/workspaces/training/side-quests/metadata/data/bonjour.txt] [id:sampleB, character:tux, recording:/workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -223,6 +223,12 @@ nextflow run main.nf [id:sampleE, character:stegosaurus, recording:/workspaces/training/side-quests/metadata/data/hola.txt] [id:sampleF, character:moose, recording:/workspaces/training/side-quests/metadata/data/salut.txt] [id:sampleG, character:turtle, recording:/workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Gördüğünüz gibi, operatör CSV dosyasındaki her satır için sütun başlıklarını anahtar olarak kullanan anahtar-değer çiftlerinden oluşan bir map oluşturmuştur. @@ -265,9 +271,9 @@ Bu, her satırdan belirli alanlara erişmeyi kolaylaştırır. Çıktıda şunları görmeyi bekleyebilirsiniz: ```console title="Output" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `map_demo.nf` [cheesy_plateau] DSL2 - revision: fae5b8496e + Launching `examples/map_demo.nf` [cheesy_plateau] revision: fae5b8496e map: [id:sampleA, character:squirrel] id: sampleA @@ -314,9 +320,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [exotic_albattani] DSL2 - revision: c0d03cec83 + Launching `main.nf` [exotic_albattani] revision: c0d03cec83 squirrel tux @@ -325,6 +331,12 @@ nextflow run main.nf stegosaurus moose turtle + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Bu, her satır için `character` sütunundaki değerlere erişebildiğimizi gösteriyor. @@ -483,12 +495,25 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [clever_dijkstra] DSL2 - revision: a1b2c3d4e5 + Launching `main.nf` [clever_dijkstra] revision: a1b2c3d4e5 executor > local (7) - [3a/f1c290] COWPY (7) [100%] 7 of 7 ✔ + [3a/f1c290] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Gördüğünüz gibi, `COWPY` her dosya için doğru karakteri kullanarak çalıştı. @@ -654,12 +679,25 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [pedantic_lovelace] DSL2 - revision: b2c3d4e5f6 + Launching `main.nf` [pedantic_lovelace] revision: b2c3d4e5f6 executor > local (7) - [5e/2a1b34] COWPY (7) [100%] 7 of 7 ✔ + [5e/2a1b34] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Çıktı, öncekiyle aynı yedi `cowpy-*.txt` dosyasıdır; artık `COWPY`'ye daha basit bir çağrıyla üretilmektedir. @@ -744,7 +782,7 @@ Bu yapıyı kabul eden süreçlerin kaç metadata alanı bulunduğunu bilmesine === "Önce" - ```groovy title="main.nf" linenums="5" hl_lines="4 7" + ```groovy title="main.nf" linenums="5" hl_lines="4 7 10" ch_datasheet = channel.fromPath("./data/datasheet.csv") .splitCsv(header: true) .map { row -> @@ -770,9 +808,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console title="View meta map" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [lethal_booth] DSL2 - revision: 0d8f844c07 + Launching `main.nf` [lethal_booth] revision: 0d8f844c07 [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/data/bonjour.txt] [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/data/guten_tag.txt] @@ -781,6 +819,12 @@ nextflow run main.nf [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/data/hola.txt] [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/data/salut.txt] [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/data/ciao.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: ``` Kanaldaki her eleman artık iki elemanlı bir demettir: önce meta map, ardından dosya. @@ -792,7 +836,7 @@ Kanaldaki her eleman artık iki elemanlı bir demettir: önce meta map, ardında ] ``` -Veri sayfasına daha sonra bir `language` sütunu eklersek, süreç girdi tanımında herhangi bir değişiklik yapmadan `meta.language` olarak erişilebilir hale gelecektir. +Veri sayfasına daha sonra bir `language` sütunu ekler ve bunu `map` işlemine dahil edersek (örneğin `language: row.language`), süreç girdi tanımında herhangi bir değişiklik yapmadan `meta.language` olarak erişilebilir hale gelecektir. #### 1.5.3. `COWPY` sürecini meta map kullanacak şekilde güncelleyin @@ -891,12 +935,25 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.2 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [wise_sammet] DSL2 - revision: 99797b1e92 + Launching `main.nf` [wise_sammet] revision: 99797b1e92 executor > local (7) - [5d/dffd4e] COWPY (7) [100%] 7 of 7 ✔ + [5d/dffd4e] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-bonjour.txt + - cowpy-guten_tag.txt + - cowpy-salut.txt + - cowpy-hola.txt + - cowpy-hello.txt + - cowpy-hallo.txt + - cowpy-ciao.txt ``` Sonuçlar dizini artık ASCII sanatı dosyalarını içeriyor. @@ -1044,20 +1101,33 @@ nextflow run main.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [voluminous_mcnulty] DSL2 - revision: f9bcfebabb + Launching `main.nf` [voluminous_mcnulty] revision: f9bcfebabb - executor > local (14) - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt, fr] - [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt, de] - [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt, en] - [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt, de] - [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt, fr] - [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt, es] - [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt, it] + executor > local (7) + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [58/d865ee] COWPY (7) | 7 of 7, cached: 7 ✔ + [[id:sampleG, character:turtle], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt, it] + [[id:sampleB, character:tux], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt, de] + [[id:sampleD, character:turkey], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt, en] + [[id:sampleF, character:moose], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt, fr] + [[id:sampleE, character:stegosaurus], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt, es] + [[id:sampleC, character:sheep], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt, de] + [[id:sampleA, character:squirrel], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt, fr] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-salut.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-guten_tag.txt + - cowpy-ciao.txt ``` Artık veri setindeki her dosya için bir dil tahminine sahibiz. @@ -1206,19 +1276,32 @@ nextflow run main.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_fermat] DSL2 - revision: d096281ee4 + Launching `main.nf` [cheeky_fermat] revision: d096281ee4 - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [4e/f722fe] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/eb/f7148ebdd898fbe1136bec6a714acb/bonjour.txt] - [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/16/71d72410952c22cd0086d9bca03680/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/ea/04f5d979429e4455e14b9242fb3b45/hallo.txt] - [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/c4/b7562adddc1cc0b7d414ec45d436eb/hello.txt] - [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/5a/6c2b84bf8fadb98e28e216426be079/salut.txt] - [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/af/ee7c69bcab891c40d0529305f6b9e7/hola.txt] - [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/4e/f722fe47271ba7ebcd69afa42964ca/ciao.txt] + [d9/b360d0] IDENTIFY_LANGUAGE (3) | 7 of 7, cached: 7 ✔ + [94/224450] COWPY (3) | 7 of 7, cached: 7 ✔ + [[id:sampleF, character:moose, lang:fr], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] + [[id:sampleC, character:sheep, lang:de], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleD, character:turkey, lang:en], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleE, character:stegosaurus, lang:es], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleG, character:turtle, lang:it], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleA, character:squirrel, lang:fr], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleB, character:tux, lang:de], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hello.txt + - cowpy-hola.txt + - cowpy-salut.txt + - cowpy-ciao.txt ``` Evet, bu doğru! @@ -1322,19 +1405,32 @@ nextflow run main.nf -resume ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [wise_almeida] revision: 46778c3cd0 - Launching `main.nf` [wise_almeida] DSL2 - revision: 46778c3cd0 + [c9/34bfec] IDENTIFY_LANGUAGE (1) | 7 of 7, cached: 7 ✔ + [e9/269aa0] COWPY (6) | 7 of 7, cached: 7 ✔ + [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/d9/b360d0cd38e53c710ec41ac3b74bc3/hallo.txt] + [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/c9/34bfec04abaf808c2ef6c5cb8c8273/bonjour.txt] + [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/work/7d/890c6fa79c485b4a600eaa89af2140/hola.txt] + [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/work/5e/ebac0d3e7a45a5e914d0bca827fc02/hello.txt] + [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/work/91/a2a307e970fa3950ceeeee6aa3b34c/guten_tag.txt] + [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/work/f6/8544c23128c0ed7c4f11dbc729b167/ciao.txt] + [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/work/08/7199b7ab1ca733267d76b8168e5f38/salut.txt] - [5d/dffd4e] COWPY (7) [100%] 7 of 7, cached: 7 ✔ - [da/652cc6] IDENTIFY_LANGUAGE (7) [100%] 7 of 7, cached: 7 ✔ - [[id:sampleA, character:squirrel, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/bonjour.txt] - [[id:sampleB, character:tux, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/guten_tag.txt] - [[id:sampleC, character:sheep, lang:de, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hallo.txt] - [[id:sampleD, character:turkey, lang:en, lang_group:germanic], /workspaces/training/side-quests/metadata/data/hello.txt] - [[id:sampleE, character:stegosaurus, lang:es, lang_group:romance], /workspaces/training/side-quests/metadata/data/hola.txt] - [[id:sampleF, character:moose, lang:fr, lang_group:romance], /workspaces/training/side-quests/metadata/data/salut.txt] - [[id:sampleG, character:turtle, lang:it, lang_group:romance], /workspaces/training/side-quests/metadata/data/ciao.txt] + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - cowpy-ciao.txt + - cowpy-salut.txt + - cowpy-guten_tag.txt + - cowpy-hallo.txt + - cowpy-bonjour.txt + - cowpy-hola.txt + - cowpy-hello.txt ``` Meta map artık dört alan taşıyor: `id`, `character`, `lang` ve `lang_group`. @@ -1445,13 +1541,26 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_crick] DSL2 - revision: 25541014c5 + Launching `main.nf` [suspicious_crick] revision: 25541014c5 executor > local (14) - [5d/dffd4e] IDENTIFY_LANGUAGE (7) [100%] 7 of 7 ✔ - [e7/317c18] COWPY (7) [100%] 7 of 7 ✔ + [99/64c59d] IDENTIFY_LANGUAGE (6) | 7 of 7 ✔ + [3c/0f1922] COWPY (7) | 7 of 7 ✔ + + Outputs: + + /workspaces/training/side-quests/metadata/results + + cowpy_art: + - [{id: sampleB, character: tux, lang: de, lang_group: germanic}, germanic/de-guten_tag.txt] + - [{id: sampleG, character: turtle, lang: it, lang_group: romance}, romance/it-ciao.txt] + - [{id: sampleC, character: sheep, lang: de, lang_group: germanic}, germanic/de-hallo.txt] + - [{id: sampleE, character: stegosaurus, lang: es, lang_group: romance}, romance/es-hola.txt] + - [{id: sampleA, character: squirrel, lang: fr, lang_group: romance}, romance/fr-bonjour.txt] + - [{id: sampleD, character: turkey, lang: en, lang_group: germanic}, germanic/en-hello.txt] + - [{id: sampleF, character: moose, lang: fr, lang_group: romance}, romance/fr-salut.txt] ``` Sonuçlar dizini artık dil ailesine göre düzenlenmiş olup her dosya tespit edilen dile göre adlandırılmıştır: @@ -1491,7 +1600,7 @@ Ne bekleyeceğinizi ve nasıl ele alacağınızı aşağıda bulabilirsiniz. ### 3.1. Zorunlu bir metadata alanı eksik olduğunda ne olur `character` değeri, `COWPY` sürecinin geçerli bir sonuç üretmesi için zorunludur. -Hata modu, sütunun veri sayfasında mevcut olup olmadığına ve değerin boş mu yoksa tamamen yoksa mu olduğuna bağlıdır. +Hata modu, sütunun veri sayfasında mevcut olup olmadığına ve değerin boş mu yoksa tamamen yoksa mı olduğuna bağlıdır. #### 3.1.1. Sütun var ama değer boş @@ -1509,18 +1618,19 @@ Nextflow `#!groovy ${meta.character}` ifadesini komuta yerleştirdiğinde, `COWP ??? failure "Komut çıktısı" - ```console hl_lines="8 11 16 28" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17 29" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [marvelous_hirsch] DSL2 - revision: 0dfeee3cc1 + Launching `main.nf` [marvelous_hirsch] revision: 0dfeee3cc1 - executor > local (9) - [c1/c5dd4f] process > IDENTIFY_LANGUAGE (7) [ 85%] 6 of 7 - [d3/b7c415] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (1)' + executor > local (14) + [c1/c5dd4f] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [d3/b7c415] COWPY (3) | 5 of 7 + WARN: Killing running tasks (1) + ERROR ~ Error executing process > 'COWPY (7)' Caused by: - Process `COWPY (1)` terminated with an error exit status (2) + Process `COWPY (7)` terminated with an error exit status (2) Command executed: @@ -1540,7 +1650,7 @@ Nextflow `#!groovy ${meta.character}` ifadesini komuta yerleştirdiğinde, `COWP cowpy: error: argument -c/--cowacter: expected one argument Work dir: - /workspaces/training/side-quests/metadata/work/ca/9d49796612a54dec5ed466063c809b + /workspaces/training/side-quests/metadata/work/cc/dfe60ff2e14f0dd88488939eca57b8 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 @@ -1564,28 +1674,29 @@ sampleB,/workspaces/training/side-quests/metadata/data/guten_tag.txt ... ``` -`character` anahtarı meta map'te hiç oluşturulmaz. -Süreç betiği `#!groovy ${meta.character}` ifadesini değerlendirdiğinde, eksik anahtar `null` döndürür ve Nextflow komuta tam anlamıyla `null` dizesini yerleştirir: +`map` işlemi `#!groovy character: row.character` ifadesini açıkça yazar; dolayısıyla `character` anahtarı meta map'te yine de oluşturulur. Ancak ayrıştırılan satırda bulunmayan bir sütuna erişmek `null` döndürür ve bu nedenle değeri `null` olur. +Süreç betiği `#!groovy ${meta.character}` ifadesini değerlendirdiğinde, Nextflow komuta tam anlamıyla `null` dizesini yerleştirir: ??? failure "Komut çıktısı" - ```console hl_lines="8 11 16" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="7 12 17" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [jovial_bohr] DSL2 - revision: eaaf375827 + Launching `main.nf` [jovial_bohr] revision: eaaf375827 - executor > local (9) - [0d/ada9db] process > IDENTIFY_LANGUAGE (5) [ 85%] 6 of 7 - [06/28065f] process > COWPY (2) [ 0%] 0 of 6 - ERROR ~ Error executing process > 'COWPY (2)' + executor > local (14) + [61/91663a] IDENTIFY_LANGUAGE (1) | 7 of 7 ✔ + [0e/99bfb0] COWPY (7) | 0 of 7 + WARN: Killing running tasks (5) + ERROR ~ Error executing process > 'COWPY (3)' Caused by: - Process `COWPY (2)` terminated with an error exit status (1) + Process `COWPY (3)` terminated with an error exit status (1) Command executed: - cat guten_tag.txt | cowpy -c null > de-guten_tag.txt + cat hola.txt | cowpy -c null > es-hola.txt Command exit status: 1 @@ -1610,7 +1721,7 @@ Süreç betiği `#!groovy ${meta.character}` ifadesini değerlendirdiğinde, eks TypeError: 'str' object is not callable Work dir: - /workspaces/training/side-quests/metadata/work/06/28065f7d9fd7d22bba084aa941b6d6 + /workspaces/training/side-quests/metadata/work/52/80c08666f6732690bce00f04993489 Container: community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273 diff --git a/docs/tr/docs/side_quests/nf_test/index.md b/docs/tr/docs/side_quests/nf_test/index.md index b5371ebe21..e257c82299 100644 --- a/docs/tr/docs/side_quests/nf_test/index.md +++ b/docs/tr/docs/side_quests/nf_test/index.md @@ -19,7 +19,7 @@ Test, pipeline'ınızın her parçasının beklenen şekilde çalışıp çalı Yazabileceğimiz pek çok farklı test türü vardır: -1. **Modül düzeyinde testler**: Bireysel süreçler için +1. **Süreç düzeyinde testler**: Bireysel süreçler için 2. **İş akışı düzeyinde testler**: Tek bir iş akışı için 3. **Pipeline düzeyinde testler**: Bir bütün olarak pipeline için 4. **Performans testleri**: Pipeline'ın hızı ve verimliliği için @@ -27,16 +27,16 @@ Yazabileceğimiz pek çok farklı test türü vardır: Bireysel süreçleri test etmek, diğer dillerdeki birim testlerine benzerdir. İş akışını veya tüm pipeline'ı test etmek ise diğer dillerde entegrasyon testleri olarak adlandırılan şeye benzer; burada bileşenlerin etkileşimlerini test ederiz. -[**nf-test**](https://www.nf-test.com/), modül, iş akışı ve pipeline düzeyinde testler yazmanıza olanak tanıyan bir araçtır. Kısacası, pipeline'ın her bir parçasının _izole olarak_ beklenen şekilde çalışıp çalışmadığını sistematik olarak kontrol etmenizi sağlar. +[**nf-test**](https://www.nf-test.com/), süreç, iş akışı ve pipeline düzeyinde testler yazmanıza olanak tanıyan bir araçtır. Kısacası, pipeline'ın her bir parçasının _izole olarak_ beklenen şekilde çalışıp çalışmadığını sistematik olarak kontrol etmenizi sağlar. ### Öğrenme hedefleri -Bu yan görevde, pipeline için iş akışı düzeyinde bir test ve çağırdığı üç süreç için modül düzeyinde testler yazmak amacıyla nf-test kullanmayı öğreneceksiniz. +Bu yan görevde, pipeline için iş akışı düzeyinde bir test ve çağırdığı iki süreç için süreç düzeyinde testler yazmak amacıyla nf-test kullanmayı öğreneceksiniz. Bu yan görevin sonunda aşağıdaki teknikleri etkin bir şekilde kullanabileceksiniz: - Projenizde nf-test'i başlatma -- Modül düzeyinde ve iş akışı düzeyinde testler oluşturma +- Süreç düzeyinde ve iş akışı düzeyinde testler oluşturma - Yaygın assertion türleri ekleme - Snapshot'ların ne zaman, içerik assertion'larının ne zaman kullanılacağını anlama - Tüm proje için testleri çalıştırma @@ -50,6 +50,16 @@ Bu yan göreve başlamadan önce şunları yapmanız gerekir: - [Hello Nextflow](../../hello_nextflow/index.md) eğitimini veya eşdeğer bir başlangıç kursunu tamamlamış olmanız. - Temel Nextflow kavramları ve mekanizmalarını (süreçler, kanallar, operatörler, dosyalarla çalışma, meta veri) rahatça kullanabilmeniz. +!!! warning "nf-test sürüm gereksinimi" + + Süreç düzeyinde testler **nf-test 0.9.3 veya daha yeni bir sürüm** gerektirir. Daha eski sürümler (0.9.2 dahil), Nextflow'un 26.04 sürümünden itibaren varsayılan olarak kullandığı katı sözdizimi ayrıştırıcısıyla uyumsuz test iskelet kodu üretir; bu durum beklenen test sonucu yerine `Script compilation failed` hatasına neden olur. + + Sürümünüzü `nf-test version` komutuyla kontrol edebilirsiniz. Yükseltmeniz gerekiyorsa: + + ```bash + curl -fsSL https://code.askimed.com/install/nf-test | bash + ``` + --- ## 0. Başlarken @@ -81,7 +91,8 @@ Bir ana iş akışı dosyası ve pipeline'ın girdisini içeren `greetings.csv` ```console title="Directory contents" . ├── greetings.csv -└── main.nf +├── main.nf +└── nextflow.config ``` Dosyaların ayrıntılı açıklaması için [Hello Nextflow'daki ısınma bölümüne](../../hello_nextflow/00_orientation.md) bakın. @@ -111,21 +122,23 @@ Tam iş akışı kodunu aşağıda görebilirsiniz. ??? example "İş akışı kodu" ```groovy title="main.nf" + #!/usr/bin/env nextflow + /* - * Pipeline parametreleri - */ + * Pipeline parametreleri + */ params.input_file = "greetings.csv" /* - * Standart çıktıya 'Hello World!' yazdırmak için echo kullan - */ + * Standart çıktıya 'Hello World!' yazdırmak için echo kullan + */ process sayHello { input: - val greeting + val greeting output: - path "${greeting}-output.txt" + path "${greeting}-output.txt" script: """ @@ -134,15 +147,15 @@ Tam iş akışı kodunu aşağıda görebilirsiniz. } /* - * Selamlamayı büyük harfe dönüştürmek için metin değiştirme aracı kullan - */ + * Selamlamayı büyük harfe dönüştürmek için metin değiştirme aracı kullan + */ process convertToUpper { input: - path input_file + path input_file output: - path "UPPER-${input_file}" + path "UPPER-${input_file}" script: """ @@ -183,13 +196,27 @@ nextflow run main.nf ``` ```console title="Result of running the workflow" - N E X T F L O W ~ version 24.10.2 + N E X T F L O W ~ version 26.04.4 -Launching `main.nf` [soggy_linnaeus] DSL2 - revision: bbf79d5c31 +Launching `main.nf` [trusting_mendel] revision: 405c90f891 executor > local (6) -[f7/c3be66] sayHello (3) | 3 of 3 ✔ -[cd/e15303] convertToUpper (3) | 3 of 3 ✔ +[6c/d7ae4e] sayHello (3) | 3 of 3 ✔ +[72/5fa770] convertToUpper (2) | 3 of 3 ✔ + +Outputs: + + /workspaces/training/side-quests/nf-test/results + + greetings: + - Hola-output.txt + - Hello-output.txt + - Bonjour-output.txt + + upper_greetings: + - UPPER-Hola-output.txt + - UPPER-Bonjour-output.txt + - UPPER-Hello-output.txt ``` TEBRİKLER! Az önce bir test çalıştırdınız! @@ -435,10 +462,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run without failures' PASSED (1.619s) + Test [693ba951] 'Should run without failures' PASSED (2.879s) -SUCCESS: Executed 1 tests in 1.626s +SUCCESS: Executed 1 tests in 2.883s ``` Başarılı! Pipeline başarıyla çalışıyor ve test geçiyor. İstediğiniz kadar çalıştırın, her seferinde aynı sonucu alacaksınız! @@ -460,15 +487,28 @@ https://www.nf-test.com Test Workflow main.nf Test [693ba951] 'Should run without failures' - > Nextflow 24.10.4 is available - Please consider updating your version to it - > N E X T F L O W ~ version 24.10.0 - > Launching `/workspaces/training/side-quests/nf-test/main.nf` [zen_ampere] DSL2 - revision: bbf79d5c31 - > [2b/61e453] Submitted process > sayHello (2) - > [31/4e1606] Submitted process > sayHello (1) - > [bb/5209ee] Submitted process > sayHello (3) - > [83/83db6f] Submitted process > convertToUpper (2) - > [9b/3428b1] Submitted process > convertToUpper (1) - > [ca/0ba51b] Submitted process > convertToUpper (3) + > N E X T F L O W ~ version 26.04.4 + > Launching `/workspaces/training/side-quests/nf-test/main.nf` [maniac_mcclintock] - revision: 405c90f891 + > [fc/6965c3] Submitted process > sayHello (1) + > [14/640c84] Submitted process > sayHello (2) + > [d6/3594c9] Submitted process > sayHello (3) + > [d7/f14d58] Submitted process > convertToUpper (1) + > [76/cb9122] Submitted process > convertToUpper (2) + > [d1/92b304] Submitted process > convertToUpper (3) + > + > Outputs: + > + > /workspaces/training/side-quests/nf-test/.nf-test/tests/693ba951a20fec36a5a9292ed1cc8a9f/results + > + > greetings: + > - Bonjour-output.txt + > - Hello-output.txt + > - Hola-output.txt + > + > upper_greetings: + > - UPPER-Bonjour-output.txt + > - UPPER-Hola-output.txt + > - UPPER-Hello-output.txt PASSED (5.206s) @@ -534,10 +574,10 @@ https://www.nf-test.com Test Workflow main.nf - Test [1d4aaf12] 'Should run successfully with correct number of processes' PASSED (1.567s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (2.876s) -SUCCESS: Executed 1 tests in 1.588s +SUCCESS: Executed 1 tests in 2.879s ``` Başarılı! Pipeline başarıyla çalışıyor ve test geçiyor. Artık pipeline'ın genel durumunun yanı sıra ayrıntılarını da test etmeye başladık. @@ -619,11 +659,11 @@ https://www.nf-test.com Test Workflow main.nf - Test [f0e08a68] 'Should run successfully with correct number of processes' PASSED (8.144s) - Test [d7e32a32] 'Should produce correct output files' PASSED (6.994s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.055s) + Test [44ba6e13] 'Should produce correct output files' PASSED (2.941s) -SUCCESS: Executed 2 tests in 15.165s +SUCCESS: Executed 2 tests in 6.004s ``` Başarılı! Pipeline başarıyla tamamlandığı, doğru sayıda süreç çalıştığı ve çıktı dosyaları oluşturulduğu için testler geçiyor. Bu aynı zamanda testleriniz için bu bilgilendirici adları sağlamanın ne kadar yararlı olduğunu da gösteriyor. @@ -730,6 +770,8 @@ Test Process sayHello Nextflow stdout: Process `sayHello` declares 1 input but was called with 0 arguments + + -- Check script '/workspaces/training/side-quests/nf-test/.nf-test-1eaad118145a1fd798cb07e7dd75d087.nf' at line: 30 or see '/workspaces/training/side-quests/nf-test/.nf-test/tests/1eaad118145a1fd798cb07e7dd75d087/meta/nextflow.log' file for more details Nextflow stderr: FAILURE: Executed 1 tests in 4.884s (1 failed) @@ -800,7 +842,7 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.604s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (2.729s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -808,7 +850,7 @@ Test Process sayHello Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.611s +SUCCESS: Executed 1 tests in 2.733s ``` Başarılı! `sayHello` süreci başarıyla çalıştığı ve çıktı oluşturulduğu için test geçiyor. @@ -858,10 +900,10 @@ https://www.nf-test.com Test Process sayHello - Test [f91a1bcd] 'Should run without failures and produce correct output' PASSED (1.675s) + Test [d6837883] 'Should run without failures and produce correct output' PASSED (3.092s) -SUCCESS: Executed 1 tests in 1.685s +SUCCESS: Executed 1 tests in 3.097s ``` Başarılı! `sayHello` süreci başarıyla çalıştığı ve çıktı snapshot ile eşleştiği için test geçiyor. @@ -951,10 +993,10 @@ https://www.nf-test.com Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (7.196s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (2.459s) -SUCCESS: Executed 1 tests in 7.208s +SUCCESS: Executed 1 tests in 2.461s ``` ### 2.4. `convertToUpper` sürecini test etme @@ -998,10 +1040,10 @@ Bu, `sayHello` sürecine benzer bir test, ancak `convertToUpper` sürecini test Şimdi `convertToUpper` sürecine büyük harfe dönüştürmek istediğimiz bir metin içeren tek bir girdi dosyası sağlamamız gerekiyor. Bunu yapmanın pek çok yolu vardır: - Test için özel bir dosya oluşturabiliriz -- Mevcut `data/greetings.csv` dosyasını yeniden kullanabiliriz +- Mevcut `greetings.csv` dosyasını yeniden kullanabiliriz - Test içinde anında oluşturabiliriz -Şimdilik, pipeline düzeyindeki testte kullandığımız örneği kullanarak mevcut `data/greetings.csv` dosyasını yeniden kullanalım. Daha önce olduğu gibi, neyi test ettiğimizi daha iyi yansıtmak için testi adlandırabiliriz; ancak bu sefer (diğer süreçte yaptığımız gibi belirli dizeler kontrol etmek yerine) içeriği 'snapshot' olarak bırakalım. +Şimdilik, pipeline düzeyindeki testte kullandığımız örneği kullanarak mevcut `greetings.csv` dosyasını yeniden kullanalım. Daha önce olduğu gibi, neyi test ettiğimizi daha iyi yansıtmak için testi adlandırabiliriz; ancak bu sefer (diğer süreçte yaptığımız gibi belirli dizeler kontrol etmek yerine) içeriği 'snapshot' olarak bırakalım. === "Sonra" @@ -1070,7 +1112,7 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.755s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Snapshots: 1 created [Should run without failures and produce correct output] @@ -1078,7 +1120,7 @@ Test Process convertToUpper Snapshot Summary: 1 created -SUCCESS: Executed 1 tests in 1.764s +SUCCESS: Executed 1 tests in 3.478s ``` `convertToUpper` süreci için `tests/main.converttoupper.nf.test.snap` konumunda bir snapshot dosyası oluşturduğumuza dikkat edin. Testi tekrar çalıştırırsak, nf-test'in yeniden geçtiğini görmeliyiz. @@ -1097,10 +1139,10 @@ https://www.nf-test.com Test Process convertToUpper - Test [c59b6044] 'Should run without failures and produce correct output' PASSED (1.798s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (2.387s) -SUCCESS: Executed 1 tests in 1.811s +SUCCESS: Executed 1 tests in 2.39s ``` ### Özetle @@ -1139,19 +1181,19 @@ https://www.nf-test.com Test Process convertToUpper - Test [3d26d9af] 'Should run without failures and produce correct output' PASSED (4.155s) + Test [f8de7d71] 'Should run without failures and produce correct output' PASSED (3.472s) Test Workflow main.nf - Test [f183df37] 'Should run successfully with correct number of processes' PASSED (3.33s) - Test [d7e32a32] 'Should produce correct output files' PASSED (3.102s) + Test [8a64acb3] 'Should run successfully with correct number of processes' PASSED (3.156s) + Test [44ba6e13] 'Should produce correct output files' PASSED (3.124s) Test Process sayHello - Test [58df4e4b] 'Should run without failures and contain expected greeting' PASSED (2.614s) + Test [c1d07f15] 'Should run without failures and contain expected greeting' PASSED (5.782s) -SUCCESS: Executed 4 tests in 13.481s +SUCCESS: Executed 4 tests in 15.746s ``` Buna bakın! Tek bir komutla her süreç için 1 ve tüm pipeline için 2 olmak üzere toplam 4 test çalıştırdık. Büyük bir kod tabanında bunun ne kadar güçlü olduğunu hayal edin! @@ -1193,7 +1235,7 @@ Daha gelişmiş test özellikleri ve en iyi uygulamalar için [nf-test belgeleri - Testlerinize daha kapsamlı assertion'lar ekleme - Uç durumlar ve hata koşulları için testler yazma - Testleri otomatik olarak çalıştırmak için sürekli entegrasyon kurma -- İş akışı ve modül testleri gibi diğer test türleri hakkında bilgi edinme +- İş akışı, performans ve stres testleri gibi diğer test türleri hakkında bilgi edinme - Daha gelişmiş içerik doğrulama tekniklerini keşfetme **Unutmayın:** Testler, kodunuzun nasıl davranması gerektiğinin yaşayan bir dokümantasyonudur. Ne kadar çok test yazarsanız ve assertion'larınız ne kadar spesifik olursa, pipeline'ınızın güvenilirliğinden o kadar emin olabilirsiniz. diff --git a/docs/tr/docs/side_quests/plugin_development/01_plugin_basics.md b/docs/tr/docs/side_quests/plugin_development/01_plugin_basics.md index 720b838c40..bddb4540e4 100644 --- a/docs/tr/docs/side_quests/plugin_development/01_plugin_basics.md +++ b/docs/tr/docs/side_quests/plugin_development/01_plugin_basics.md @@ -511,7 +511,7 @@ Herhangi bir pipeline kodunu değiştirmenize gerek yoktur; yalnızca yapıland plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -534,7 +534,7 @@ Eklenti, yürütme sırasında çeşitli INFO ve WARN mesajları üretir. Bunlar, yerel bir makinede çalışan küçük bir örnek için normaldir: ```console title="Output (partial)" -nf-co2footprint plugin ~ version 1.2.0 +nf-co2footprint plugin ~ version 1.3.0 WARN - [nf-co2footprint] Target zone null not found. Attempting to retrieve carbon intensity for fallback zone GLOBAL. INFO - [nf-co2footprint] Using fallback carbon intensity from GLOBAL from CI table: 480.0 gCO₂eq/kWh. WARN - [nf-co2footprint] Executor 'null' not mapped. @@ -600,7 +600,7 @@ nf-co2footprint eklentisi, coğrafi konumunuzu ayarlayabileceğiniz bir `co2foot plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } co2footprint { @@ -614,7 +614,7 @@ nf-co2footprint eklentisi, coğrafi konumunuzu ayarlayabileceğiniz bir `co2foot plugins { id 'nf-hello@0.5.0' id 'nf-schema@2.6.1' - id 'nf-co2footprint@1.2.0' + id 'nf-co2footprint@1.3.0' } ``` @@ -635,11 +635,6 @@ INFO - [nf-co2footprint] Using fallback carbon intensity from GB from CI table: Bölge uyarısı artık görünmüyor. Eklenti artık küresel yedek değer (480.0 gCO₂eq/kWh) yerine GB'ye özgü karbon yoğunluğunu (163.92 gCO₂eq/kWh) kullanmaktadır. -!!! note "Not" - - `WARN: Unrecognized config option 'co2footprint.location'` mesajını da görebilirsiniz. - Bu görsel bir uyarıdır ve güvenle yoksayılabilir; eklenti değeri yine de doğru şekilde okur. - Bölüm 6'da kendi eklentiniz için bir yapılandırma kapsamı oluşturacaksınız. Bu eklenti tamamen observer mekanizması aracılığıyla çalışır; iş akışı yaşam döngüsü olaylarına bağlanarak kaynak ölçümlerini toplar ve pipeline tamamlandığında raporunu oluşturur. diff --git a/docs/tr/docs/side_quests/plugin_development/02_create_project.md b/docs/tr/docs/side_quests/plugin_development/02_create_project.md index 9d1fa72243..4f82ca6e27 100644 --- a/docs/tr/docs/side_quests/plugin_development/02_create_project.md +++ b/docs/tr/docs/side_quests/plugin_development/02_create_project.md @@ -63,15 +63,15 @@ tree ```console . -├── build.gradle ├── COPYING +├── Makefile +├── README.md +├── build.gradle ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew -├── Makefile -├── README.md ├── settings.gradle └── src ├── main @@ -131,13 +131,13 @@ En önemlisi `nextflowPlugin` bloğudur: ```groovy title="build.gradle" plugins { - id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.10' + id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.15' } version = '0.1.0' nextflowPlugin { - nextflowVersion = '24.10.0' // (1)! + nextflowVersion = '25.10.0' // (1)! provider = 'training' // (2)! className = 'training.plugin.GreetingPlugin' // (3)! @@ -170,7 +170,7 @@ Tam uyumluluk için kurulu Nextflow sürümünüzle eşleşecek şekilde güncel ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '25.10.0' + nextflowVersion = '26.04.0' provider = 'training' ``` @@ -179,7 +179,7 @@ Tam uyumluluk için kurulu Nextflow sürümünüzle eşleşecek şekilde güncel ```groovy title="build.gradle" hl_lines="2" nextflowPlugin { - nextflowVersion = '24.10.0' + nextflowVersion = '25.10.0' provider = 'training' ``` @@ -248,7 +248,7 @@ make install Deprecated Gradle features were used in this build... BUILD SUCCESSFUL in 23s - 5 actionable tasks: 5 executed + 6 actionable tasks: 6 executed ``` **Uyarılar beklenen bir durumdur.** diff --git a/docs/tr/docs/side_quests/plugin_development/03_custom_functions.md b/docs/tr/docs/side_quests/plugin_development/03_custom_functions.md index f35224bd4c..bbadfd5d7d 100644 --- a/docs/tr/docs/side_quests/plugin_development/03_custom_functions.md +++ b/docs/tr/docs/side_quests/plugin_development/03_custom_functions.md @@ -266,16 +266,16 @@ nextflow run greet.nf ??? example "Çıktı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Output: Hello @@ -443,16 +443,16 @@ nextflow run greet.nf ??? example "Çıktı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `greet.nf` [elated_marconi] DSL2 - revision: cd8d52c97c + Launching `greet.nf` [elated_marconi] revision: cd8d52c97c Pipeline is starting! 🚀 executor > local (5) - [fe/109754] process > SAY_HELLO (5) [100%] 5 of 5 ✔ + [fe/109754] SAY_HELLO (5) | 5 of 5 ✔ Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH Decorated: *** Hello *** diff --git a/docs/tr/docs/side_quests/plugin_development/04_build_and_test.md b/docs/tr/docs/side_quests/plugin_development/04_build_and_test.md index b3ef2fc834..4519051ffd 100644 --- a/docs/tr/docs/side_quests/plugin_development/04_build_and_test.md +++ b/docs/tr/docs/side_quests/plugin_development/04_build_and_test.md @@ -215,7 +215,7 @@ make test ```console BUILD SUCCESSFUL in 5s - 6 actionable tasks: 6 executed + 7 actionable tasks: 7 executed ``` **Test sonuçları nerede?** Gradle, tüm testler geçtiğinde ayrıntılı çıktıyı gizler. diff --git a/docs/tr/docs/side_quests/plugin_development/05_observers.md b/docs/tr/docs/side_quests/plugin_development/05_observers.md index ffbd8f050a..0e53a9195d 100644 --- a/docs/tr/docs/side_quests/plugin_development/05_observers.md +++ b/docs/tr/docs/side_quests/plugin_development/05_observers.md @@ -310,12 +310,12 @@ nextflow run greet.nf -ansi-log false ??? example "Çıktı" ```console - N E X T F L O W ~ version 25.10.4 - Launching `greet.nf` [pensive_engelbart] DSL2 - revision: 85fefd90d0 + N E X T F L O W ~ version 26.04.4 + Launching `greet.nf` [pensive_engelbart] - revision: 85fefd90d0 Pipeline is starting! 🚀 Reversed: olleH Reversed: ruojnoB - Reversed: àloH + Reversed: aloH Reversed: oaiC Reversed: ollaH [be/bd8e72] Submitted process > SAY_HELLO (2) diff --git a/docs/tr/docs/side_quests/plugin_development/06_configuration.md b/docs/tr/docs/side_quests/plugin_development/06_configuration.md index e7ba62dcbb..3167b50e08 100644 --- a/docs/tr/docs/side_quests/plugin_development/06_configuration.md +++ b/docs/tr/docs/side_quests/plugin_development/06_configuration.md @@ -97,12 +97,12 @@ Derleme başarısız olur: ```console > Task :compileGroovy FAILED -GreetingExtension.groovy: 30: [Static type checking] - The variable [prefix] is undeclared. - @ line 30, column 9. +GreetingExtension.groovy: 34: [Static type checking] - The variable [prefix] is undeclared. + @ line 34, column 9. prefix = session.config.navigate('greeting.prefix', '***') as String ^ -GreetingExtension.groovy: 31: [Static type checking] - The variable [suffix] is undeclared. +GreetingExtension.groovy: 35: [Static type checking] - The variable [suffix] is undeclared. ``` Groovy'de (ve Java'da), bir değişkeni kullanmadan önce _bildirmeniz_ gerekir. diff --git a/docs/tr/docs/side_quests/plugin_development/index.md b/docs/tr/docs/side_quests/plugin_development/index.md index 45580f87b0..09e22a051d 100644 --- a/docs/tr/docs/side_quests/plugin_development/index.md +++ b/docs/tr/docs/side_quests/plugin_development/index.md @@ -27,6 +27,12 @@ Bu eğitim boyunca mevcut plugin'leri nasıl kullanacağınızı ve isteğe bağ **Çalışma dizini:** `side-quests/plugin_development` +#### Eğitim kod alanını açın + +Henüz yapmadıysanız, eğitim ortamını [Ortam Kurulumu](../../envsetup/index.md) bölümünde açıklandığı şekilde açtığınızdan emin olun. + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nextflow-io/training?quickstart=1&ref=master) + ## Öğrenme hedefleri Bu eğitimin sonunda şunları yapabileceksiniz: diff --git a/docs/tr/docs/side_quests/splitting_and_grouping/index.md b/docs/tr/docs/side_quests/splitting_and_grouping/index.md index 91eef6d6a7..e6f3002d6c 100644 --- a/docs/tr/docs/side_quests/splitting_and_grouping/index.md +++ b/docs/tr/docs/side_quests/splitting_and_grouping/index.md @@ -154,7 +154,7 @@ workflow { === "Sonra" - ```groovy title="main.nf" linenums="2" hl_lines="2-6" + ```groovy title="main.nf" linenums="2" hl_lines="1-6" ch_samples = channel.fromPath("./data/samplesheet.csv") .splitCsv(header: true) .map{ row -> @@ -178,9 +178,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [deadly_mercator] DSL2 - revision: bd6b0224e9 + Launching `main.nf` [deadly_mercator] revision: bd6b0224e9 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] @@ -234,9 +234,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [admiring_brown] DSL2 - revision: 194d61704d + Launching `main.nf` [admiring_brown] revision: 194d61704d [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -297,9 +297,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [trusting_poisson] DSL2 - revision: 639186ee74 + Launching `main.nf` [trusting_poisson] revision: 639186ee74 [[id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam] [[id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam] @@ -340,9 +340,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -389,9 +389,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [maniac_boltzmann] DSL2 - revision: 3636b6576b + Launching `main.nf` [maniac_boltzmann] revision: 3636b6576b Tumor sample: [[id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [[id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -444,9 +444,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mad_lagrange] DSL2 - revision: 9940b3f23d + Launching `main.nf` [mad_lagrange] revision: 9940b3f23d Tumor sample: [patientA, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] Tumor sample: [patientA, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -502,9 +502,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_wiles] DSL2 - revision: 3bc1979889 + Launching `main.nf` [soggy_wiles] revision: 3bc1979889 [patientA, [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [patientA, [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -531,7 +531,7 @@ Sonraki adımda, birden fazla alana göre birleştirmek istediğiniz durumu ele ### 3.2. Birden fazla alana göre birleştirme -sampleA için 2 replikatımız var, ancak sampleB ve sampleC için yalnızca 1 replikat bulunuyor. Bu durumda `id` alanını kullanarak bunları etkili biçimde birleştirebildik; peki senkronizasyon bozulursa ne olur? Farklı replikatlardan normal ve tümör örneklerini karıştırabiliriz! +patientA için 2 replikatımız var, ancak patientB ve patientC için yalnızca 1 replikat bulunuyor. Bu durumda `id` alanını kullanarak bunları etkili biçimde birleştirebildik; peki senkronizasyon bozulursa ne olur? Farklı replikatlardan normal ve tümör örneklerini karıştırabiliriz! Bunu önlemek için birden fazla alana göre birleştirebiliriz. Bunu başarmanın aslında birden fazla yolu vardır; ancak hem örnek `id`'sini hem de `replicate` numarasını içeren yeni bir birleştirme anahtarı oluşturmaya odaklanacağız. @@ -568,9 +568,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_wing] DSL2 - revision: 3bebf22dee + Launching `main.nf` [prickly_wing] revision: 3bebf22dee [[patientA, 1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[patientA, 2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -617,9 +617,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [reverent_wing] DSL2 - revision: 847016c3b7 + Launching `main.nf` [reverent_wing] revision: 847016c3b7 [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] @@ -704,16 +704,18 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_meninsky] DSL2 - revision: 2edc226b1d + Launching `main.nf` [evil_swartz] revision: 5ef9b852a4 - [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], patientA_rep1_tumor.bam] - [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], patientA_rep2_tumor.bam] - [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], patientB_rep1_tumor.bam] - [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], patientC_rep1_tumor.bam] + [[id:patientA, repeat:1], [id:patientA, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [id:patientA, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] + [[id:patientA, repeat:2], [id:patientA, repeat:2, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [id:patientA, repeat:2, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] + [[id:patientB, repeat:1], [id:patientB, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [id:patientB, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] + [[id:patientC, repeat:1], [id:patientC, repeat:1, type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_normal.bam, [id:patientC, repeat:1, type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientC_rep1_tumor.bam] ``` + Closure artık her yolu `file()` ile sardığından, dosya girişleri örnek sayfasındaki yalın dosya adları yerine çözümlenmiş mutlak yollar olarak görünür. + Adlandırılmış closure kullanmak, aynı dönüşümü birden fazla yerde yeniden kullanmamıza olanak tanır; bu da hata riskini azaltır ve kodu daha okunabilir ve sürdürülebilir hale getirir. ### 3.5. Veri tekrarını azaltma @@ -723,21 +725,21 @@ Adlandırılmış closure kullanmak, aynı dönüşümü birden fazla yerde yeni ```groovy [ [ - "id": "sampleC", + "id": "patientC", "repeat": "1", ], [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "normal", ], - "sampleC_rep1_normal.bam" + "patientC_rep1_normal.bam", [ - "id": "sampleC", + "id": "patientC", "repeat": "1", "type": "tumor", ], - "sampleC_rep1_tumor.bam" + "patientC_rep1_tumor.bam" ] ``` @@ -766,6 +768,10 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console + N E X T F L O W ~ version 26.04.4 + + Launching `main.nf` [lonely_perlman] revision: 36bb08c483 + [[id:patientA, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep1_tumor.bam] [[id:patientA, repeat:2], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientA_rep2_tumor.bam] [[id:patientB, repeat:1], [type:normal], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_normal.bam, [type:tumor], /workspaces/training/side-quests/splitting_and_grouping/patientB_rep1_tumor.bam] @@ -803,9 +809,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [confident_leavitt] DSL2 - revision: a2303895bd + Launching `main.nf` [confident_leavitt] revision: a2303895bd [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:2], patientA_rep2_normal.bam, patientA_rep2_tumor.bam] @@ -881,9 +887,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [mighty_tesla] DSL2 - revision: ae013ab70b + Launching `main.nf` [mighty_tesla] revision: ae013ab70b [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr1] [[id:patientA, repeat:1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam, chr2] @@ -963,9 +969,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [sad_hawking] DSL2 - revision: 1f6f6250cd + Launching `main.nf` [sad_hawking] revision: 1f6f6250cd [[id:patientA, repeat:1, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, repeat:1, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -996,7 +1002,7 @@ Bu bölümde şunları öğrendiniz: ## 5. `groupTuple` kullanarak örnekleri toplama -Önceki bölümlerde, bir girdi dosyasından verileri nasıl böleceğimizi ve belirli alanlara göre (bizim durumumuzda normal ve tümör örnekleri) nasıl filtreleyeceğimizi öğrendik. Ancak bu yalnızca tek bir birleştirme türünü kapsar. Örnekleri belirli bir özniteliğe göre gruplamak istersek ne olur? Örneğin, eşleştirilmiş normal-tümör çiftlerini birleştirmek yerine, türlerinden bağımsız olarak "sampleA"dan gelen tüm örnekleri birlikte işlemek isteyebiliriz. Bu desen, sonunda sonuçları karşılaştırmadan veya birleştirmeden önce verimlilik nedeniyle ilgili örnekleri ayrı ayrı işlemek isteyebileceğiniz biyoinformatik iş akışlarında yaygındır. +Önceki bölümlerde, bir girdi dosyasından verileri nasıl böleceğimizi ve belirli alanlara göre (bizim durumumuzda normal ve tümör örnekleri) nasıl filtreleyeceğimizi öğrendik. Ancak bu yalnızca tek bir birleştirme türünü kapsar. Örnekleri belirli bir özniteliğe göre gruplamak istersek ne olur? Örneğin, eşleştirilmiş normal-tümör çiftlerini birleştirmek yerine, türlerinden bağımsız olarak "patientA"dan gelen tüm örnekleri birlikte işlemek isteyebiliriz. Bu desen, sonunda sonuçları karşılaştırmadan veya birleştirmeden önce verimlilik nedeniyle ilgili örnekleri ayrı ayrı işlemek isteyebileceğiniz biyoinformatik iş akışlarında yaygındır. Nextflow bunu yapmak için yerleşik yöntemler içerir; inceleyeceğimiz ana yöntem `groupTuple`'dır. @@ -1008,7 +1014,7 @@ Bunu yapmak için gruplama değişkenlerimizi yalıtmamız gerekir; böylece bun ```groovy title="main.nf" linenums="1" { - "id": "sampleA", + "id": "patientA", "repeat": "1", "interval": "chr1" } @@ -1064,9 +1070,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [hopeful_brenner] DSL2 - revision: 7f4f7fea76 + Launching `main.nf` [hopeful_brenner] revision: 7f4f7fea76 [[id:patientA, interval:chr1], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] [[id:patientA, interval:chr2], patientA_rep1_normal.bam, patientA_rep1_tumor.bam] @@ -1128,9 +1134,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_jang] DSL2 - revision: a1bee1c55d + Launching `main.nf` [friendly_jang] revision: a1bee1c55d [[id:patientA, interval:chr1], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] [[id:patientA, interval:chr2], [patientA_rep1_normal.bam, patientA_rep2_normal.bam], [patientA_rep1_tumor.bam, patientA_rep2_tumor.bam]] @@ -1191,7 +1197,7 @@ Bu kanal işlemlerinde ustalaşmak, döngülere veya yinelemeli programlamaya ba 2. **Verileri ayrı kanallara bölme:** `type` alanına göre verileri bağımsız akışlara bölmek için `filter` kullandık ```groovy - channel.filter { it.type == 'tumor' } + channel.filter { meta, file -> meta.type == 'tumor' } ``` 3. **Eşleştirilmiş örnekleri birleştirme:** `id` ve `repeat` alanlarına göre ilgili örnekleri yeniden birleştirmek için `join` kullandık @@ -1199,31 +1205,31 @@ Bu kanal işlemlerinde ustalaşmak, döngülere veya yinelemeli programlamaya ba - İki kanalı anahtara göre birleştirme (demetin ilk öğesi) ```groovy - tumor_ch.join(normal_ch) + ch_normal_samples.join(ch_tumor_samples) ``` - Birleştirme anahtarını çıkarma ve bu değere göre birleştirme ```groovy - tumor_ch.map { meta, file -> [meta.id, meta, file] } + ch_normal_samples.map { meta, file -> [meta.id, meta, file] } .join( - normal_ch.map { meta, file -> [meta.id, meta, file] } + ch_tumor_samples.map { meta, file -> [meta.id, meta, file] } ) ``` - - subMap kullanarak birden fazla alana göre birleştirme + - `subMap` kullanarak birden fazla alana göre birleştirme ```groovy - tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_normal_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } .join( - normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } + ch_tumor_samples.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] } ) ``` 4. **Aralıklara dağıtma:** Paralel işleme için örneklerin genomik aralıklarla Kartezyen çarpımlarını oluşturmak amacıyla `combine` kullandık. ```groovy - samples_ch.combine(intervals_ch) + ch_joined_samples.combine(ch_intervals) ``` 5. **Gruplama anahtarlarına göre toplama:** Her demetteki ilk öğeye göre gruplamak, böylece `id` ve `interval` alanlarını paylaşan örnekleri toplayarak teknik replikatları birleştirmek için `groupTuple` kullandık. diff --git a/docs/tr/docs/side_quests/workflows_of_workflows/index.md b/docs/tr/docs/side_quests/workflows_of_workflows/index.md index aabc2cb2d6..0c3bf61c4b 100644 --- a/docs/tr/docs/side_quests/workflows_of_workflows/index.md +++ b/docs/tr/docs/side_quests/workflows_of_workflows/index.md @@ -140,19 +140,35 @@ nextflow run workflows/greeting.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [peaceful_montalcini] DSL2 - revision: 90f61b7093 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [loving_cuvier] revision: 22e91263dd executor > local (9) - [51/4f980f] process > VALIDATE_NAME (validating Bob) [100%] 3 of 3 ✔ - [2b/dd8dc2] process > SAY_HELLO (greeting Bob) [100%] 3 of 3 ✔ - [8e/882565] process > TIMESTAMP_GREETING (adding timestamp to greeting) [100%] 3 of 3 ✔ + [54/ec2442] VAL…TE_NAME (validating Alice) | 3 of 3 ✔ + [a5/3cf2ab] SAY_HELLO (greeting Charlie) | 3 of 3 ✔ + [df/6689ec] TIM…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - Alice-output.txt + - Bob-output.txt + - Charlie-output.txt + + timestamped: + - timestamped_Alice-output.txt + - timestamped_Bob-output.txt + - timestamped_Charlie-output.txt ``` Diğer iş akışlarıyla birleştirilebilir hale getirmek için birkaç değişiklik yapmamız gerekiyor. ### 1.2. İş akışını birleştirilebilir hale getirin -Bir iş akışını birleştirilebilir hale getirmek için dört şeyin değişmesi gerekir: iş akışına bir ad verilir, girdiler `take:` bloğuna taşınır, çıktılar `emit:` bloğuna taşınır ve bağımsız `publish:`/`output {}` blokları kaldırılır (bunlar giriş iş akışına aittir). +Bir iş akışını birleştirilebilir hale getirmek için üç şeyin değişmesi gerekir: +iş akışına bir ad verilir, girdiler `take:` bloğuna taşınır ve çıktılar `emit:` bloğuna taşınır +(bağımsız `publish:`/`output {}` blokları kaldırılır; bunlar giriş iş akışına aittir). Bu değişiklikleri tek tek inceleyelim. @@ -274,8 +290,8 @@ nextflow run workflows/greeting.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/greeting.nf` [high_brahmagupta] DSL2 - revision: 8f5857af25 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/greeting.nf` [ridiculous_mandelbrot] revision: e619235cf1 No entry workflow specified ``` @@ -358,12 +374,21 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [goofy_mayer] DSL2 - revision: 543f8742fe + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [berserk_lalande] revision: 9a841b3c7f executor > local (9) - [05/3cc752] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Char... [100%] 3 of 3 ✔ - [b1/b56ecf] process > GREETING_WORKFLOW:SAY_HELLO (greeting Charlie) [100%] 3 of 3 ✔ - [ea/342168] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ + [31/c2931b] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [2a/50592c] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [09/35e2d5] GRE…ing timestamp to greeting) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt ``` ??? abstract "Dizin içeriği" @@ -450,11 +475,25 @@ nextflow run workflows/transform.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 24.10.0 - Launching `workflows/transform.nf` [blissful_curie] DSL2 - revision: 4e7b1c9f02 + N E X T F L O W ~ version 26.04.4 + Launching `workflows/transform.nf` [cranky_banach] revision: c040a64fcf executor > local (6) - [3e/a14c29] process > SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [c8/51b9e3] process > REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [c8/cd04d9] SAY…estamped_Alice-output.txt) | 3 of 3 ✔ + [3d/2252c3] REV…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + upper: + - UPPER-timestamped_Bob-output.txt + - UPPER-timestamped_Charlie-output.txt + - UPPER-timestamped_Alice-output.txt + + reversed: + - REVERSED-UPPER-timestamped_Bob-output.txt + - REVERSED-UPPER-timestamped_Charlie-output.txt + - REVERSED-UPPER-timestamped_Alice-output.txt ``` `GREETING_WORKFLOW` ile birleştirilebilir hale getirmek için 1.2. bölümündeki üç değişikliğin aynısı geçerlidir. @@ -579,14 +618,33 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 24.10.0 - Launching `main.nf` [sick_kimura] DSL2 - revision: 8dc45fc6a8 + N E X T F L O W ~ version 26.04.4 + Launching `main.nf` [focused_venter] revision: 03b08f23fc executor > local (15) - [83/1b51f4] process > GREETING_WORKFLOW:VALIDATE_NAME (validating Alice) [100%] 3 of 3 ✔ - [68/556150] process > GREETING_WORKFLOW:SAY_HELLO (greeting Alice) [100%] 3 of 3 ✔ - [de/511abd] process > GREETING_WORKFLOW:TIMESTAMP_GREETING (adding tim... [100%] 3 of 3 ✔ - [cd/e6a7e0] process > TRANSFORM_WORKFLOW:SAY_HELLO_UPPER (converting t... [100%] 3 of 3 ✔ - [f0/74ba4a] process > TRANSFORM_WORKFLOW:REVERSE_TEXT (reversing UPPER... [100%] 3 of 3 ✔ + [f6/cd1e04] GRE…TE_NAME (validating Alice) | 3 of 3 ✔ + [07/1139ba] GRE…SAY_HELLO (greeting Alice) | 3 of 3 ✔ + [d2/25e304] GRE…ing timestamp to greeting) | 3 of 3 ✔ + [90/64c33c] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + [bf/2f23b0] TRA…estamped_Alice-output.txt) | 3 of 3 ✔ + + Outputs: + + /workspaces/training/side-quests/workflows_of_workflows/results + + greetings: + - greetings/Charlie-output.txt + - greetings/Bob-output.txt + - greetings/Alice-output.txt + + upper: + - upper/UPPER-timestamped_Charlie-output.txt + - upper/UPPER-timestamped_Bob-output.txt + - upper/UPPER-timestamped_Alice-output.txt + + reversed: + - reversed/REVERSED-UPPER-timestamped_Charlie-output.txt + - reversed/REVERSED-UPPER-timestamped_Bob-output.txt + - reversed/REVERSED-UPPER-timestamped_Alice-output.txt ``` ??? abstract "Dizin içeriği" @@ -610,7 +668,7 @@ nextflow run main.nf ??? abstract "Dosya içeriği" ```console title="results/reversed/REVERSED-UPPER-timestamped_Alice-output.txt" - !ECILA ,OLLEH ]04:50:71 60-30-5202[ + !ECILA ,OLLEH ]71:15:11 32-60-6202[ ``` Pipeline uçtan uca çalışıyor: selamlama büyük harfe dönüştürülmüş ve tersine çevrilmiştir. diff --git a/docs/tr/docs/side_quests/working_with_files/index.md b/docs/tr/docs/side_quests/working_with_files/index.md index be4b80bba2..b7f016b2fe 100644 --- a/docs/tr/docs/side_quests/working_with_files/index.md +++ b/docs/tr/docs/side_quests/working_with_files/index.md @@ -163,11 +163,17 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [romantic_chandrasekhar] DSL2 - revision: 5a4a89bc3a + Launching `main.nf` [romantic_chandrasekhar] revision: 5a4a89bc3a data/patientA_rep1_normal_R1_001.fastq.gz is of class class java.lang.String + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Gördüğünüz gibi, Nextflow dize yolunu tam olarak yazdığımız şekilde yazdırdı. @@ -211,11 +217,17 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [kickass_coulomb] DSL2 - revision: 5af44b1b59 + Launching `main.nf` [kickass_coulomb] revision: 5af44b1b59 /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz is of class class sun.nio.fs.UnixPath + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Bu sefer, girdi olarak verdiğimiz göreli yol yerine tam mutlak yolu görüyorsunuz. @@ -275,15 +287,21 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [ecstatic_ampere] DSL2 - revision: f3fa3dcb48 + Launching `main.nf` [ecstatic_ampere] revision: f3fa3dcb48 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Yukarıda konsola yazdırılan çeşitli dosya özelliklerini görebilirsiniz. @@ -392,9 +410,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [cheeky_hypatia] DSL2 - revision: 281d13c414 + Launching `main.nf` [cheeky_hypatia] revision: 281d13c414 File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -402,9 +420,15 @@ nextflow run main.nf Extension: gz Parent directory: /workspaces/training/side-quests/working_with_files/data executor > local (1) - [e9/341c05] COUNT_LINES [100%] 1 of 1 ✔ - Processing file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + [e9/341c05] COUNT_LINES | 1 of 1 ✔ + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Bu, dosya üzerinde bir süreç içinde uygun şekilde işlem yapabildiğimizi göstermektedir. @@ -475,10 +499,11 @@ nextflow run main.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [friendly_goodall] DSL2 - revision: ae50609b20 + Launching `main.nf` [friendly_goodall] revision: ae50609b20 + File object class: class java.lang.String [- ] COUNT_LINES - ERROR ~ Error executing process > 'COUNT_LINES' @@ -487,9 +512,9 @@ nextflow run main.nf - Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out` + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Önemli olan kısım şudur: @@ -543,12 +568,13 @@ nextflow run main.nf ??? failure "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [soggy_golick] DSL2 - revision: ae50609b20 + Launching `main.nf` [soggy_golick] revision: ae50609b20 + File object class: class java.lang.String executor > local (1) - [b3/b3023c] COUNT_LINES [ 0%] 0 of 1 ✘ + [b3/b3023c] COUNT_LINES | 0 of 1 ✘ ERROR ~ Error executing process > 'COUNT_LINES' Caused by: @@ -576,9 +602,9 @@ nextflow run main.nf Work dir: /workspaces/training/side-quests/working_with_files/work/b3/b3023cb2ccb986851301d8e369e79f - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Süreç yukarıda belirtildiği gibi hata ayıklama bilgisi çıktısı verecek şekilde ayarlandığından, hata hakkında çok sayıda ayrıntı gösterilmektedir. @@ -692,9 +718,9 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d File object class: class nextflow.file.http.XPath File name: patientA_rep1_normal_R1_001.fastq.gz @@ -702,9 +728,15 @@ nextflow run main.nf Extension: gz Parent directory: /nextflow-io/training/master/side-quests/working_with_files/data executor > local (1) - [8a/2ab7ca] COUNT_LINES [100%] 1 of 1 ✔ + [8a/2ab7ca] COUNT_LINES | 1 of 1 ✔ Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Çalışıyor! Çok az şeyin değiştiğini görebilirsiniz. @@ -813,16 +845,11 @@ Bunu yapmanın naif bir yolu, `file()` metodunu [`channel.of()`](https://www.nex ```groovy title="Syntax example" ch_files = channel.of([file('data/patientA_rep1_normal_R1_001.fastq.gz')], - [file('data/patientA_rep1_normal_R1_001.fastq.gz')]) + [file('data/patientA_rep1_normal_R2_001.fastq.gz')]) ``` Bu çalışır; ancak hantaldır. -!!! tip "`file()` ile `channel.fromPath()` ne zaman kullanılır?" - - - Doğrudan işleme için tek bir Path nesnesine ihtiyaç duyduğunuzda `file()` kullanın (bir dosyanın var olup olmadığını kontrol etmek, özelliklerine erişmek veya tek bir süreç çağrısına iletmek için) - - Özellikle glob desenleriyle birden fazla dosya tutabilen bir kanala ihtiyaç duyduğunuzda ya da dosyalar birden fazla süreçten geçecekse `channel.fromPath()` kullanın - İşte burada [`channel.fromPath()`](https://www.nextflow.io/docs/latest/reference/channel.html#frompath) devreye girer: bir veya daha fazla statik dosya dizesinden ve glob desenlerinden kanal oluşturmak için ihtiyaç duyduğumuz tüm işlevselliği bir araya getiren kullanışlı bir kanal fabrikasıdır. ### 3.1. Kanal fabrikasını ekleme @@ -877,11 +904,17 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [grave_meucci] DSL2 - revision: b09964a583 + Launching `main.nf` [grave_meucci] revision: b09964a583 Found file: /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Gördüğünüz gibi, dosya yolu kanalda `Path` türünde bir nesne olarak yüklenmektedir. @@ -889,6 +922,11 @@ Bu, `file()`'ın yapacağına benzer; ancak şimdi istediğimizde daha fazla dos `channel.fromPath()` kullanmak, bir dosya listesiyle doldurulmuş yeni bir kanal oluşturmanın kullanışlı bir yoludur. +!!! tip "`file()` ile `channel.fromPath()` ne zaman kullanılır?" + + - Doğrudan işleme için tek bir Path nesnesine ihtiyaç duyduğunuzda `file()` kullanın (bir dosyanın var olup olmadığını kontrol etmek, özelliklerine erişmek veya tek bir süreç çağrısına iletmek için) + - Özellikle glob desenleriyle birden fazla dosya tutabilen bir kanala ihtiyaç duyduğunuzda ya da dosyalar birden fazla süreçten geçecekse `channel.fromPath()` kullanın + ### 3.2. Kanaldaki dosyaların özelliklerini görüntüleme Kanal fabrikasını ilk kullandığımızda kodu basitleştirip yalnızca dosya adını yazdırdık. @@ -934,12 +972,12 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [furious_swanson] DSL2 - revision: c35c34950d + Launching `main.nf` [furious_swanson] revision: c35c34950d executor > local (1) - [9d/6701a6] COUNT_LINES (1) [100%] 1 of 1 ✔ + [9d/6701a6] COUNT_LINES (1) | 1 of 1 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -947,6 +985,12 @@ nextflow run main.nf Parent directory: /workspaces/training/side-quests/working_with_files/data Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` İşte bu kadar; öncekiyle aynı sonuçlar, ancak artık dosya bir kanalda olduğu için daha fazlasını ekleyebiliriz. @@ -1003,12 +1047,12 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [boring_sammet] DSL2 - revision: d2aa789c9a + Launching `main.nf` [boring_sammet] revision: d2aa789c9a executor > local (2) - [3c/a65de5] COUNT_LINES (2) [100%] 2 of 2 ✔ + [3c/a65de5] COUNT_LINES (2) | 2 of 2 ✔ File object class: class sun.nio.fs.UnixPath File name: patientA_rep1_normal_R1_001.fastq.gz Simple name: patientA_rep1_normal_R1_001 @@ -1024,6 +1068,12 @@ nextflow run main.nf Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Gördüğünüz gibi, kanalımızda artık iki Path nesnesi var; bu, Nextflow'un dosya adı genişletmeyi doğru şekilde yaptığını ve her iki dosyayı da beklendiği gibi yükleyip işlediğini göstermektedir. @@ -1108,19 +1158,25 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [suspicious_mahavira] DSL2 - revision: ae8edc4e48 + Launching `main.nf` [suspicious_mahavira] revision: ae8edc4e48 executor > local (2) - [e9/55774b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e9/55774b] COUNT_LINES (2) | 2 of 2 ✔ [patientA_rep1_normal_R1_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] - Processing file: patientA_rep1_normal_R1_001.fastq.gz + [patientA_rep1_normal_R2_001, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 - Processing file: patientA_rep1_normal_R2_001.fastq.gz + Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Kanaldaki her öğe artık `simpleName`'i ve orijinal dosya nesnesini içeren bir demettir. @@ -1164,19 +1220,25 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [gigantic_gauss] DSL2 - revision: a39baabb57 + Launching `main.nf` [gigantic_gauss] revision: a39baabb57 executor > local (2) - [e7/da2f4b] COUNT_LINES (2) [100%] 2 of 2 ✔ - [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [e7/da2f4b] COUNT_LINES (2) | 2 of 2 ✔ [[patientA, rep1, normal, R1, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[patientA, rep1, normal, R2, 001], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Artık kanalımızdaki her öğenin demeti, üst veri listesini (_örn._ `[patientA, rep1, normal, R1, 001]`) ve orijinal dosya nesnesini içermektedir. @@ -1265,19 +1327,25 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [infallible_swartz] DSL2 - revision: 7f4e68c0cb + Launching `main.nf` [infallible_swartz] revision: 7f4e68c0cb executor > local (2) - [1b/e7fb27] COUNT_LINES (1) [100%] 2 of 2 ✔ - [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] + [1b/e7fb27] COUNT_LINES (1) | 2 of 2 ✔ [[id:patientA, replicate:1, type:normal, readNum:1], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz] + [[id:patientA, replicate:1, type:normal, readNum:2], /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz] Processing file: patientA_rep1_normal_R2_001.fastq.gz 40 Processing file: patientA_rep1_normal_R1_001.fastq.gz 40 + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Artık üst veri düzgün biçimde etiketlenmiştir (_örn._ `[id:patientA, replicate:1, type:normal, readNum:2]`); bu sayede neyin ne olduğunu anlamak çok daha kolaydır. @@ -1337,10 +1405,10 @@ Bu, daha önce kullandığımız glob desenine benzer; ancak bu, çiftin iki üy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Şimdilik eşleştirmeyi yorum satırına alalım, sonra geri döneceğiz! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1355,13 +1423,13 @@ Bu, daha önce kullandığımız glob desenine benzer; ancak bu, çiftin iki üy === "Önce" ```groovy title="main.nf" linenums="7" hl_lines="1-2" - // channel.fromFilePairs ile dosyaları yükle + // channel.fromPath ile dosyaları yükle ch_files = channel.fromPath('data/patientA_rep1_normal_R*_001.fastq.gz') ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1383,12 +1451,11 @@ nextflow run main.nf ??? failure "Komut çıktısı" - ```console hl_lines="7-8" - N E X T F L O W ~ version 25.10.4 + ```console hl_lines="6-7" + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [angry_koch] DSL2 - revision: 44fdf66105 + Launching `main.nf` [angry_koch] revision: 44fdf66105 - [- ] COUNT_LINES - [- ] COUNT_LINES - [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] ERROR ~ Error executing process > 'COUNT_LINES (1)' @@ -1398,9 +1465,9 @@ nextflow run main.nf - Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line + Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` - -- Check '.nextflow.log' file for details + -- Check '.nextflow.log' file for details ``` Eyvah, bu sefer çalıştırma başarısız oldu! @@ -1451,11 +1518,17 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console hl_lines="5" - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [fabulous_davinci] DSL2 - revision: 22b53268dc + Launching `main.nf` [fabulous_davinci] revision: 22b53268dc [patientA_rep1_normal_R, [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Yaşasın, bu sefer iş akışı başarılı oldu! @@ -1476,10 +1549,10 @@ Ancak `id` alanından geri kalan üst veriyi hâlâ çıkarmamız gerekiyor. // channel.fromFilePairs ile dosyaları yükle ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1496,10 +1569,10 @@ Ancak `id` alanından geri kalan üst veriyi hâlâ çıkarmamız gerekiyor. ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') /* Şimdilik eşleştirmeyi yorum satırına alalım, sonra geri döneceğiz! ch_files.map { myFile -> - def (sample, replicate, type, readNum) = myFile.simpleName.tokenize('_') + def (patient, replicate, type, readNum) = myFile.simpleName.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type, readNum: readNum, @@ -1526,11 +1599,17 @@ nextflow run main.nf ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [prickly_stonebraker] DSL2 - revision: f62ab10a3f + Launching `main.nf` [prickly_stonebraker] revision: f62ab10a3f [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` İşte bu: çıktı demetinin ilk konumunda üst veri map'i (`[id:patientA, replicate:1, type:normal]`), ardından tasarlandığı gibi eşleştirilmiş dosyaların demeti yer almaktadır. @@ -1642,10 +1721,10 @@ Ana iş akışında `.view()` operatörünü `#!groovy .set { ch_samples }` ile // channel.fromFilePairs ile dosyaları yükle ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1664,10 +1743,10 @@ Ana iş akışında `.view()` operatörünü `#!groovy .set { ch_samples }` ile // channel.fromFilePairs ile dosyaları yükle ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1686,11 +1765,17 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `main.nf` [goofy_kirch] DSL2 - revision: 3313283e42 + Launching `main.nf` [goofy_kirch] revision: 3313283e42 [[id:patientA, replicate:1, type:normal], [/workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R1_001.fastq.gz, /workspaces/training/side-quests/working_with_files/data/patientA_rep1_normal_R2_001.fastq.gz]] + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: ``` Bu, artık kanala adıyla başvurabildiğimizi doğrulamaktadır. @@ -1714,10 +1799,10 @@ Ana iş akışında aşağıdaki kod değişikliklerini yapın: // channel.fromFilePairs ile dosyaları yükle ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1747,10 +1832,10 @@ Ana iş akışında aşağıdaki kod değişikliklerini yapın: // channel.fromFilePairs ile dosyaları yükle ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') [ [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], @@ -1784,12 +1869,19 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [shrivelled_cori] DSL2 - revision: b546a31769 + Launching `main.nf` [shrivelled_cori] revision: b546a31769 executor > local (1) - [b5/110360] process > ANALYZE_READS (patientA) [100%] 1 of 1 ✔ + [b5/110360] ANALYZE_READS (patientA) | 1 of 1 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] ``` Çıktılar bir `results` dizinine yayımlanmaktadır; bu nedenle oraya bir göz atın. @@ -1849,12 +1941,26 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [big_stonebraker] DSL2 - revision: f7f9b8a76c + Launching `main.nf` [big_stonebraker] revision: f7f9b8a76c executor > local (8) - [d5/441891] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [d5/441891] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: tumor}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, patientC/patientC_stats.txt] + - [{id: patientB, replicate: '1', type: normal}, patientB/patientB_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, patientA/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, patientA/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, patientC/patientC_stats.txt] ``` Sonuçlar dizini artık mevcut tüm veriler için sonuçlar içermelidir. @@ -1885,7 +1991,7 @@ Hasta üst verisine erişimimiz olduğundan, bunu yayımlanan dosyaları benzers === "Sonra" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.type}/${meta.id}/${meta.replicate}" } } @@ -1893,7 +1999,7 @@ Hasta üst verisine erişimimiz olduğundan, bunu yayımlanan dosyaları benzers === "Önce" - ```groovy title="main.nf" hl_lines="3" + ```groovy title="main.nf" hl_lines="2" analysis_results { path { meta, file -> "${meta.id}" } } @@ -1911,12 +2017,26 @@ nextflow run main.nf ??? success "Komut çıktısı" ```console - N E X T F L O W ~ version 25.10.4 + N E X T F L O W ~ version 26.04.4 - Launching `./main.nf` [insane_swartz] DSL2 - revision: fff18abe6d + Launching `main.nf` [insane_swartz] revision: fff18abe6d executor > local (8) - [e3/449081] process > ANALYZE_READS (patientC) [100%] 8 of 8 ✔ + [e3/449081] ANALYZE_READS (patientC) | 8 of 8 ✔ + + Outputs: + + /workspaces/training/side-quests/working_with_files/results + + analysis_results: + - [{id: patientB, replicate: '1', type: normal}, normal/patientB/1/patientB_stats.txt] + - [{id: patientB, replicate: '1', type: tumor}, tumor/patientB/1/patientB_stats.txt] + - [{id: patientC, replicate: '1', type: normal}, normal/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '1', type: tumor}, tumor/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '1', type: normal}, normal/patientA/1/patientA_stats.txt] + - [{id: patientA, replicate: '2', type: normal}, normal/patientA/2/patientA_stats.txt] + - [{id: patientC, replicate: '1', type: tumor}, tumor/patientC/1/patientC_stats.txt] + - [{id: patientA, replicate: '2', type: tumor}, tumor/patientA/2/patientA_stats.txt] ``` Şimdi results dizinini kontrol edin: @@ -2069,7 +2189,7 @@ Bu teknikleri kendi çalışmalarınızda uygulamak, özellikle karmaşık adlan 5. **`channel.fromFilePairs` ile basitleştirme:** İlgili dosyaları otomatik olarak eşleştirmek ve eşleştirilmiş dosya kimliklerinden üst veri çıkarmak için `channel.fromFilePairs()` kullandık. ```groovy - ch_pairs = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') + ch_files = channel.fromFilePairs('data/*_R{1,2}_001.fastq.gz') ``` 6. **Süreçlerde Dosya İşlemlerini Kullanmak:** Dosya işlemlerini uygun girdi yönetimiyle Nextflow süreçlerine entegre ettik; çıktıları üst veriye göre düzenlemek için `output {}` bloğunu kullandık. @@ -2079,10 +2199,10 @@ Bu teknikleri kendi çalışmalarınızda uygulamak, özellikle karmaşık adlan ```groovy ch_files = channel.fromFilePairs('data/patientA_rep1_normal_R{1,2}_001.fastq.gz') ch_samples = ch_files.map { id, files -> - def (sample, replicate, type, readNum) = id.tokenize('_') + def (patient, replicate, type) = id.tokenize('_') tuple( [ - id: sample, + id: patient, replicate: replicate.replace('rep', ''), type: type ], From 6f023ad36764b51f1fd677f66e9451426dd87697 Mon Sep 17 00:00:00 2001 From: Geraldine Van der Auwera Date: Mon, 13 Jul 2026 17:13:23 -0400 Subject: [PATCH 2/2] Exclude plugin_development index page from heading check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Turkish translation phrases "Part N" as "N. Bölüm", which matches the numbered-heading regex and gets flagged as a heading-level mismatch (h4 vs expected h2). The Part N labels are TOC-style links to separate lesson files, not part of a sequential numbering scheme, so the page doesn't need heading-number validation in any language. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/check-headings.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-headings.yml b/.github/workflows/check-headings.yml index a5aa36b48d..6eba0e3b8f 100644 --- a/.github/workflows/check-headings.yml +++ b/.github/workflows/check-headings.yml @@ -27,6 +27,7 @@ jobs: files_ignore: | **/transcripts/**/*.md .claude/**/*.md + **/side_quests/plugin_development/index.md - name: Run check_headings.py if: steps.changed-files.outputs.any_changed == 'true'