{"id":13296962,"url":"https://github.com/anton-khodak/cwl-expression-library","last_synced_at":"2025-04-07T20:12:46.400Z","repository":{"id":71658987,"uuid":"88871328","full_name":"anton-khodak/cwl-expression-library","owner":"anton-khodak","description":"A collection of handy Javascript functions which can be imported in a CWL expression and used for manipulating CWL File objects","archived":false,"fork":false,"pushed_at":"2019-01-31T14:48:22.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T21:36:35.839Z","etag":null,"topics":["cwl"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/anton-khodak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-04-20T13:54:32.000Z","updated_at":"2019-01-31T14:48:18.000Z","dependencies_parsed_at":"2023-05-13T11:15:22.586Z","dependency_job_id":null,"html_url":"https://github.com/anton-khodak/cwl-expression-library","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"958a73f2c6f61384571a8dcee0e54e672d185286"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-khodak%2Fcwl-expression-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-khodak%2Fcwl-expression-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-khodak%2Fcwl-expression-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-khodak%2Fcwl-expression-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anton-khodak","download_url":"https://codeload.github.com/anton-khodak/cwl-expression-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247721900,"owners_count":20985084,"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":["cwl"],"created_at":"2024-07-29T17:21:20.559Z","updated_at":"2025-04-07T20:12:46.360Z","avatar_url":"https://github.com/anton-khodak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"CWL expression library aims to provide a collection of handy Javascript functions which can be imported \nin a CWL expression and used for manipulating CWL File objects.\n\n# Usage \n\nTo use the library you need to copy file *file_utils.js* to your repository and then import it into your CWL code\nin the `expressionLib` field of `InlineJavascriptRequirement`\n\n```\ncwlVersion: v1.0\nclass: Workflow\n\nrequirements:\n - class: InlineJavascriptRequirement\n   expressionLib:\n    - $import: file_utils.js\n```\n\nafter that you can use the functions from `file_utils.js` inside your expressions. Example:\n```\noutputs:\n  sortedFiles:\n    type: File[]\n    outputBinding:\n      outputEval: $(orderBy(inputs.fastqSeqs, \"treatment\", \"asc\"))\n```\n\n# API\nFile **updateMetadata(File, key, value)** - returns File object with updated metadata *key* with a new *value*\n\nFile **inheritMetadata(File, [sourceFiles])** - returns File object with updated metadata with set of metadata keys \nwhich are same for all *sourceFiles* in list\n\n[File] **toArray(File or [File])** - wraps a File object into Array if not Array already\n\n[[File]] **groupBy([File], key)** - returns list of list of Files grouped by metadata *key*\n\n[File] **orderBy([File], key)** - order list by metadata *key*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanton-khodak%2Fcwl-expression-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanton-khodak%2Fcwl-expression-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanton-khodak%2Fcwl-expression-library/lists"}