Skip to content

Optional secondary files #100

Closed
Closed

Description

@StarvingMarvin

Currently, reference implementation fails when it cant find declared secondary files. What is supposed to be the way to declare optional secondary file (e.g. Picard sort only outputs bai file when given a certain parameter).

Activity

  1. tetron commented on Aug 8, 2015

    @tetron
    Member

    Currently there is no way to declare optional secondary files. That's an oversight in the specification. How do you think we should fix it?

  2. portah commented on Sep 20, 2015

    @portah
    Member

    I have not declared an optional SecondaryFile but lets put it in the other way I declared when a secondary file is required.

    inputs:
      - id: "#input"
        type: File
        description: |
          The input file can be in BAM format
              (Note: BAM _must_ be sorted by position)
          or <bed/gff/vcf>
        inputBinding:
          position: 1
          secondaryFiles:
            - engine: node-engine.cwl
              script: |
               {
                if ((/.*\.bam$/i).test($job['input'].path))
                   return {"path": $job['input'].path+".bai", "class": "File"};
                return [];
               }
          valueFrom:
            engine: node-engine.cwl
            script: |
              {
                var prefix = ((/.*\.bam$/i).test($job['input'].path))?'-ibam':'-i';
                return [prefix,$job['input'].path];
              }
    
    
  3. mr-c commented on Nov 4, 2015

    @mr-c
    Member

    Peter agrees with "Perhaps failing to find the secondary file should yield a warning rather than error".

  4. ghost added this to the milestone on Apr 17, 2016
  5. removed this from the milestone on Jun 23, 2016
  6. mr-c commented on Oct 11, 2016

    @mr-c
    Member

    @ntijanic Can you propose a better syntax than that long javascript line?

  7. mr-c commented on Oct 11, 2016

    @mr-c
    Member

    @tetron proposed adding a question mark to indicate optionality.

  8. added this to the milestone on Oct 11, 2016
  9. added a commit that references this issue on Jul 20, 2017
  10. added a commit that references this issue on Mar 21, 2018
  11. mr-c commented on Jul 8, 2019

    @mr-c
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions