{"id":17285212,"url":"https://github.com/bentsherman/nf-boost","last_synced_at":"2025-04-14T10:42:12.323Z","repository":{"id":229248437,"uuid":"776232423","full_name":"bentsherman/nf-boost","owner":"bentsherman","description":"Experimental features for Nextflow","archived":false,"fork":false,"pushed_at":"2025-03-19T17:08:36.000Z","size":203,"stargazers_count":40,"open_issues_count":5,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-27T23:51:09.527Z","etag":null,"topics":["nextflow"],"latest_commit_sha":null,"homepage":"","language":"Groovy","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/bentsherman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2024-03-23T00:28:50.000Z","updated_at":"2025-03-19T17:08:39.000Z","dependencies_parsed_at":"2024-07-16T00:58:43.055Z","dependency_job_id":"aa6a99f5-96dc-499f-bd16-a6d4fc8acfac","html_url":"https://github.com/bentsherman/nf-boost","commit_stats":null,"previous_names":["bentsherman/nf-cleanup","bentsherman/nf-boost"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentsherman%2Fnf-boost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentsherman%2Fnf-boost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentsherman%2Fnf-boost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentsherman%2Fnf-boost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bentsherman","download_url":"https://codeload.github.com/bentsherman/nf-boost/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248867315,"owners_count":21174711,"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"],"created_at":"2024-10-15T09:56:03.846Z","updated_at":"2025-04-14T10:42:12.317Z","avatar_url":"https://github.com/bentsherman.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nf-boost\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003ewhile we wait for \u003ca href=\"https://github.com/nextflow-io/nextflow/issues/452\"\u003efour five two\u003c/a\u003e\u003c/em\u003e\n  \u003cbr\u003e\n  \u003cem\u003ea very special plugin, just for you\u003c/em\u003e\n\u003c/p\u003e\n\nNextflow plugin for experimental features that want to become core features!\n\nCurrently includes the following features:\n\n- automatic deletion of temporary files (`boost.cleanup`)\n\n- `fromJson` and `toJson` functions to read and write JSON\n\n- `fromYaml` and `toYaml` functions to read and write YAML\n\n- `mergeCsv` function for saving records to a CSV file\n\n- `mergeText` function for saving items to a text file (similar to `collectFile` operator)\n\n- `request` function for making HTTP requests\n\n- `template` function for rendering templates\n\n- `scan` operator for, well, scan operations\n\n- `then` operator for defining custom operators in your pipeline\n\n## Getting Started\n\nTo use `nf-boost`, include it in your Nextflow config and add any desired settings:\n\n```groovy\nplugins {\n  id 'nf-boost'\n}\n\nboost {\n  cleanup = true\n}\n```\n\nThe plugin requires Nextflow version `23.10.0` or later.\n\n*New in version `0.4.0`: requires Nextflow `24.04.0` or later.*\n\n*New in version `0.5.0`: requires Nextflow `24.10.0` or later.*\n\nIf a release hasn't been published to the main registry yet, you can still use it by specifying the following environment variable so that Nextflow can find the plugin:\n\n```bash\nexport NXF_PLUGINS_TEST_REPOSITORY=\"https://github.com/bentsherman/nf-boost/releases/download/0.3.2/nf-boost-0.3.2-meta.json\"\n```\n\n## Examples\n\nCheck out the `examples` directory for example pipelines that demonstrate how to use the features in this plugin.\n\n## Reference\n\n### Configuration\n\n**`boost.cleanup`**\n\nSet to `true` to enable automatic cleanup (default: `false`). Temporary files will be automatically deleted as soon as they are no longer needed.\n\nThe default cleanup observer uses `publishDir` directives to determine whether a file should be published before it is deleted. Setting `boost.cleanup = 'v2'` will use an alternate cleanup observer which uses the new workflow publish definition instead of `publishDir` to track publishing.\n\nLimitations:\n\n- Resume is not supported with automatic cleanup at this time. Deleted tasks will be re-executed on a resumed run. Resume will be supported when this feature is finalized in Nextflow.\n\n- Helper files and log files created by Nextflow (e.g. `.command.run`, `.command.log`) are not deleted. Consider using a cleanup policy on the underlying filesystem or object storage to delete these files automatically over time.\n\n- Input files that are staged into the work directory (e.g. from an HTTP/FTP server or S3 bucket) are not deleted.\n\n- Files created by operators (e.g. `collectFile`, `splitFastq`) cannot be tracked and so are not deleted. For optimal performance, consider refactoring such operators into processes:\n\n  - Splitter operators such as `splitFastq` can also be used as functions in a native process:\n\n    ```groovy\n    process SPLIT_FASTQ {\n      input:\n      val(fastq)\n\n      output:\n      path(chunks)\n\n      exec:\n      chunks = splitFastq(fastq, file: true)\n    }\n    ```\n\n  - The `collectFile` operator can be replaced with `mergeText` (in this plugin) in a native process. See the `examples` directory for example usage.\n\n**`boost.cleanupInterval`**\n\nSpecify how often to scan for cleanup (default: `'60s'`).\n\n### Functions\n\n**`fromJson( source: Path | String )`**\n\nLoad a value from JSON.\n\n**`toJson( value, pretty: boolean = false ) -\u003e String`**\n\nConvert a value to JSON.\n\n**`fromYaml( source: Path | String )`**\n\nLoad a value from YAML.\n\n**`toYaml( value ) -\u003e String`**\n\nConvert a value to YAML.\n\n**`mergeCsv( records: List, path: Path, [opts] )`**\n\nSave a list of records (i.e. tuples or maps) to a CSV file.\n\nAvailable options:\n\n- `header: boolean | List\u003cString\u003e`\n\n  When `true`, the keys of the first record are used as the column names (default: `false`). Can also be a list of column names.\n\n- `sep: String`\n\n  The character used to separate values (default: `','`).\n\n**`mergeText( items: List\u003cPath\u003e | List\u003cString\u003e, path: Path, [opts] )`**\n\nSave a list of items (i.e. files or strings) to a text file.\n\nAvailable options:\n\n- `keepHeader: boolean`\n\n  Prepend the resulting file with the header of the first file (default: `false`). The number of header lines can be specified using the `skip` option, to determine how many lines to remove from each file.\n\n- `newLine: boolean`\n\n  Append a newline character after each entry (default: `false`).\n\n- `skip: int`\n\n  The number of lines to skip at the beginning of each entry (default: `1` when `keepHeader` is true, `0` otherwise).\n\n**`request( url: String, [opts] )`**\n\nMake an HTTP request. Returns the underlying [HttpURLConnection](https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html).\n\nAvailable options:\n\n- `body: String`\n\n  The request body.\n\n- `headers: Map\u003cString,String\u003e`\n\n  Map of request headers.\n\n- `method: String`\n\n  The request method, can be `'get'`, `'post'`, `'head'`, `'options'`, `'put'`, `'delete'`, or `'trace'` (default: `'get'`).\n\n**`template( source: Path | String, binding: Map ) -\u003e String`**\n\nRender a template with the given binding.\n\n### Operators\n\n**`exec( name, body )`**\n\nThe `exec` operator was removed in version 0.5.0. Use an `exec` process instead.\n\n**`scan( [seed], accumulator )`**\n\nThe `scan` operator is similar to `reduce` -- it applies an accumulator function sequentially to each value in a channel -- however, whereas `reduce` only emits the final result, `scan` emits each partially accumulated value.\n\n**`then( onNext, [opts] )`**\n\n**`then( [others...], opts )`**\n\nThe `then` operator is a generic operator that can be used to implement nearly any operator you can imagine.\n\nIt accepts any of three event handlers: `onNext`, `onComplete`, and `onError` (similar to `subscribe`). Each event handler has access to the following methods:\n\n- `emit( value )`: emit a value to the output channel\n\n- `done()`: signal that no more values will be emitted\n\nWhen there is only one source channel, the `done()` method will be called automatically when the source channel sends the `onComplete` event. You can still call it manually, e.g. to finalize the output earlier. When there are multiple source channels, you are responsible for calling `done()` at the appropriate time -- if you don't call it, your operator will wait forever.\n\nWhen there are multiple source channels, `onNext` and `onComplete` events are *synchronized*. This way, you don't need to worry about making your event handlers thread-safe, because they will be invoked on one event at a time.\n\nAvailable options:\n\n- `onNext( value, [i] )`: Closure that is invoked when a value is emitted by a source channel. Equivalent to providing a closure as the first argument. When there are multiple source channels, the closure is invoked with a second argument corresponding to the index of the source channel.\n\n- `onComplete( [i] )`: Closure that is invoked after the last value is emitted by a source channel. When there are multiple source channels, the closure is invoked with the index of the source channel.\n\n- `onError( error )`: Closure that is invoked when an exception is raised while handling an `onNext` event. It is invoked the exception that caused the error. No further calls will be made to `onNext` or `onComplete` after this event. By default, the error is logged and the workflow is terminated.\n\n- `singleton`: Whether the output channel should be a value (i.e. *singleton*) channel. By default, it is determined by the source channel, i.e. if the source is a value channel then the output will also be a value channel and vice versa.\n\n## Development\n\nBuild and install the plugin to your local environment:\n\n```bash\nmake install\n```\n\nRun with Nextflow as usual:\n\n```bash\nnextflow run hello -plugins nf-boost@\u003cversion\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentsherman%2Fnf-boost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbentsherman%2Fnf-boost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentsherman%2Fnf-boost/lists"}