Skip to content

Refactor task definition #75

@tiagofilipe12

Description

@tiagofilipe12

Current implementation on task definition by the user is somehow javascript dependent.
Example:

const gunzipIt = task({
    input: '*_genomic.fna.gz',
    output: '*.fa',
    params: { output: 'uncompressed.fa' }
  }, ({ params, input}) => `gunzip -c ${input} > ${params.output}`
)

It would be nice to abstract the user from this object, function task shape, to something more user-friendly. For example:

const gunzipIt = { task:
  { input:  '*_genomic.fna.gz',
    output: 'uncompressed.fa',
    function: '`gunzip -c ${input} > ${params.output}`'
  }
}

Notice that I removed params.output, because that can be tricky for the user to understand, and instead this check of the output pattern could be done by the api.
This could be integrated with #74 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions