Skip to content

Need to import toscawidget to use bioscript command line tool #4

@yjarosz

Description

@yjarosz

Bioscript command line tool should not import any tw stuff, but this is the only way at this moment to get back the options for any list fields (assembly, radiochoice, singleselectfield, ...).

One way to prevent this is to create an optional mapping attribute in the plugin, such as (FileConvert):

info = {
        'title': 'Convert file',
        'description': 'Convert a file to a different format',
        'path': ['Files', 'Convert'],
        'output': FileConvertForm,
        'in': in_parameters,
        'out': out_parameters,
        'meta': meta,
        'mapping': mapping}
in_parameters = [{'id': 'infile', 'type': 'track', 'required': True},
                 {'id': 'to', 'type': 'list', 'required': True},
                 {'id': 'dtype', 'type': 'list'},
                 {'id': 'assembly', 'type': 'assembly'}]
mapping = {'to': ['bedgraph', 'wig', 'bed', 'sql', 'gff', 'sga', 'bigwig'], 
                   'dtype': ['quantitative', 'qualitative']}

Then the form will be::

...
to = twd.HidingSingleSelectField(label='Output format: ',
        options=mapping['to'],  prompt_text=None,
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions