Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Rabix support exclusive parameters? #432

Open
lfaller-zymergen opened this issue Nov 10, 2018 · 2 comments
Open

Does Rabix support exclusive parameters? #432

lfaller-zymergen opened this issue Nov 10, 2018 · 2 comments

Comments

@lfaller-zymergen
Copy link

I have a toy example that requires an exclusive parameter and a regular parameter and it seems to run fine when I try cwl-runner (see copied below). I would like to adapt a tool in Rabix to use the same logic for the input files but it complains:

document.inputs[0].type: should be equal to one of the allowed values: null,boolean,int,long,float,string,File,Directory

I believe it is not happy with type: record

What is the best way to implement exclusive parameters in Rabix?

$> cat exclusive_params.yml
exclusive_parameters:
  input_file_2:
    class: File
    path: ./two_file.txt
another_parameter: just_a_string_for_a_parameter

$> cat exclusive_params.cwl
cwlVersion: v1.0
class: CommandLineTool
inputs:
  exclusive_parameters:
    type:
      - type: record
        name: input_file_1
        fields:
          input_file_1:
            type: File
            inputBinding:
              prefix: -file-one
            label: this is a file of type 1
      - type: record
        name: input_file_2
        fields:
          input_file_2:
            type: File
            inputBinding:
              prefix: -file-two
            label: this is a file of type 2
  another_parameter:
    type: string
    id: input_another_parameter
    inputBinding:
      position: 1
      prefix: -another_parameter
    label: This is a regular string parameter.
outputs: []
baseCommand: echo

$> cwl-runner exclusive_params.cwl exclusive_params.yml
/Users/lfaller/playground/venv/bin/cwl-runner 1.0.20181012180214
Resolved 'exclusive_params.cwl' to 'file:///Users/lfaller/playground/exclusive_params.cwl'
[job exclusive_params.cwl] /private/tmp/docker_tmpA5dP3M$ echo \
    -file-two \
    /private/var/folders/vg/0brt5dt962j9p26_rhxn8_4w0000gn/T/tmpDeAbeL/stge33acf73-7edc-40d4-bd55-46ad2d7dc987/two_file.txt \
    -another_parameter \
    just_a_string_for_a_parameter
-file-two /private/var/folders/vg/0brt5dt962j9p26_rhxn8_4w0000gn/T/tmpDeAbeL/stge33acf73-7edc-40d4-bd55-46ad2d7dc987/two_file.txt -another_parameter just_a_string_for_a_parameter
[job exclusive_params.cwl] completed success
{}
Final process status is success

Edited to add my code in Rabix:

class: CommandLineTool
cwlVersion: v1.0
$namespaces:
  sbg: 'https://sevenbridges.com'
inputs:
  - exclusive_parameters:
    type:
      - type: record
        name: input_fasta_file_1
        fields:
          input_fasta_file_1:
            type: File
            inputBinding:
              position: 0
              prefix: -file1-raw
              secondaryFiles: []
            label: primary fasta reads
            'sbg:fileTypes': 'FASTA, FA, FASTQ, FQ, FASTA.GZ, FA.GZ, FASTQ.GZ, FQ.GZ'
      - type: record
        name: input_fasta_file_2
        fields:
          input_fasta_file_2:
            type: File
            inputBinding:
              position: 0
              prefix: -file2-raw
              secondaryFiles: []
            label: secondary fasta reads
            'sbg:fileTypes': 'FASTA, FA, FASTQ, FQ, FASTA.GZ, FA.GZ, FASTQ.GZ, FQ.GZ'
@ghost ghost transferred this issue from rabix/rabix Mar 11, 2019
@ghost
Copy link

ghost commented Mar 11, 2019

@bogdang989 would have some idea? Thanks!

@pvanheus
Copy link

pvanheus commented Sep 6, 2019

Is there any update on this? I am facing the same error when trying to edit a tool with exclusive parameters in Rabix Composer 1.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants