{"id":17285405,"url":"https://github.com/mribeirodantas/nextflowsnippets","last_synced_at":"2026-01-06T22:11:38.231Z","repository":{"id":148388288,"uuid":"619303903","full_name":"mribeirodantas/NextflowSnippets","owner":"mribeirodantas","description":"This repository hosts a large collection of Nextflow snippets","archived":false,"fork":false,"pushed_at":"2025-01-26T13:50:58.000Z","size":88,"stargazers_count":57,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-26T14:29:47.556Z","etag":null,"topics":["nextflow","nextflow-language","pipeline","programming","snippets","workflow"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mribeirodantas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-26T20:58:03.000Z","updated_at":"2025-01-26T13:51:02.000Z","dependencies_parsed_at":"2023-05-20T10:15:36.814Z","dependency_job_id":"a109ba7e-afa9-4d41-bea1-d9d6e0312304","html_url":"https://github.com/mribeirodantas/NextflowSnippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mribeirodantas%2FNextflowSnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mribeirodantas%2FNextflowSnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mribeirodantas%2FNextflowSnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mribeirodantas%2FNextflowSnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mribeirodantas","download_url":"https://codeload.github.com/mribeirodantas/NextflowSnippets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245697828,"owners_count":20657971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextflow","nextflow-language","pipeline","programming","snippets","workflow"],"created_at":"2024-10-15T09:56:30.549Z","updated_at":"2026-01-06T22:11:38.191Z","avatar_url":"https://github.com/mribeirodantas.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg width=25 height=25 src=\"https://github.com/nextflow-io/trademark/blob/master/nextflow-icon-128x128.png?raw=true\"\u003e Nextflow Snippets\n\nSnippet is a programming term for a small region of re-usable source code, machine code, or text, and Nextflow is both a Domain-Specific Language for writing data pipelines and a pipeline orchestrator. For more information about Nextflow, check the official [site](https://www.nextflow.io) and [documentation](https://www.nextflow.io/docs/latest/). For community training material, [this link](https://training.nextflow.io) is a greaaaaaat place to start! :smiley:\n\nThis repository contains a collection of numerous solutions I have worked on throughout the past months as a Nextflow and nf-core Developer Advocate at [Seqera Labs](https://seqera.io) providing community support to numerous users around the world. I haven't saved all the snippets I created, but as I have now answered over 500 questions in this period, there are indeed quite a few I have kept when I found the solution interesting enough :satisfied:\n\n## List of snippets by category\nBelow, you'll find links to Markdown documents in this repository explaining the issue followed by the snippet that solves it.\n\n### Using Channel Operators and Factories\n  - [Get first N elements from a channel](snippets/get_first_N_from_channel.md)\n  - [Get last N elements from a channel](snippets/get_last_N_from_channel.md)\n  - [Filter items within a list in tuples within your channels](snippets/filter_items_within_tuples_within_your_channel.md)\n  - [Filter tuples within your channel](snippets/filter_tuples_within_your_channel.md)\n  - [Flatten multiple-item tuple to 2-item tuple keeping key](snippets/flatten_multiple_item_tuples_to_simple_tuple.md)\n  - [Recreate `countBy` operator for channels consisting of single elements or tuples](snippets/countBy.md)\n  - [Set operations with channels](snippets/set_operations.md)\n  - [Filter output channel elements based on file size or file content](snippets/filter_based_on_size_content.md)\n  - [Sort lexicographically paths in a list within a tuple](snippets/sort_lexicographically_list_in_tuple.md)\n  - [Provide multiple paths from a channel as a string to a command](snippets/joining_paths_as_string_to_command.md)\n  - [Guarantee tuple structure in a channel](snippets/guarantee_tuple_structure.md)\n  - [Group based on two keys, sort based on another one](snippets/grouptuple_sort_metamap.md) \n  - [Add ending condition to `watchPath`](snippets/end_condition_watchpath.md)\n### Misc\n  - [Prepare assets without running the pipeline](snippets/prepare_assets_wo_running_pipeline.md)\n  - [Organize output files according to some pattern, and organize everything else in a different path](snippets/organize_publishdir_rest.md)\n  - [Capture multiple values provided with a pipeline parameter](snippets/capture_multi_values_pipeline_parameter.md)\n  - [Query attributes of objects](snippets/query_object_attributes.md)\n  - [Piping with multiple processes at the same time](snippets/pipe_multiple_processes.md)\n  - [Get the `publishDir` paths for a specific task](snippets/get_task_publishDir.md)\n  - [Request the maximum number of available CPU cores for a process](snippets/get_max_avail_cpus.md)\n  - [Pass config settings as a command line argument instead of a config file](snippets/config_cmd_instead_file.md)\n  - [Multiple instances of the same file provided to the same task](snippets/same_file_multiple_times.md)\n  - [Save configuration files used in a specific run](snippets/save_configs.md)\n  - [Compose configurations in the `nextflow.config` file](snippets/composing_nextflow_config.md)\n  - [Run some processes outside containers](snippets/no_container_per_process.md)\n  - [Run containers of specific processes without root access](snippets/container_no_root.md)\n  ## Nextflow Patterns\n  If you're looking for more snippets, you can find plenty at [Nextflow Patterns](https://nextflow-io.github.io/patterns/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmribeirodantas%2Fnextflowsnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmribeirodantas%2Fnextflowsnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmribeirodantas%2Fnextflowsnippets/lists"}