datirium / scidap

Scientific Data Analysis Platform
https://scidap.com/
Apache License 2.0
0 stars 3 forks source link

Update IGV plugin: set IGV track name from workflow input/output #24

Open michael-kotliar opened 4 years ago

michael-kotliar commented 4 years ago

Is your feature request related to a problem? Please describe. Currently, to set a title for IGV track we use field name. In case of applying this plugin for an array of files, hardcoded in name value is used for all added tracks making it impossible to identify which file is displayed.

outputs:
  genome_coverage_cond_1:
    type: File[]
    format: "http://edamontology.org/format_3006"
    label: "Genome coverage(s) for biological condition 1"
    doc: "Genome coverage bigWig file(s) for biological condition 1"
    outputSource: pipe/coverage_files_cond_1
    'sd:visualPlugins':
    - igvbrowser:
        tab: 'IGV Genome Browser'
        id: 'igvbrowser'
        type: 'wig'
        name: "Genome coverage for biological condition 1"
        height: 120

Describe the solution you'd like Being able to set name from the workflow inputs or outputs would allow us to have proper names for IGV tracks.

inputs:
  sample_names_cond_1:
    type:
      - "null"
      - string[]
    label: "Biological condition 1 sample names"
    doc: "Aliases for biological condition 1 samples"
    'sd:upstreamSource': "first_biological_condition/alias"

outputs:
  genome_coverage_cond_1:
    type: File[]
    format: "http://edamontology.org/format_3006"
    label: "Genome coverage(s) for biological condition 1"
    doc: "Genome coverage bigWig file(s) for biological condition 1"
    outputSource: pipe/coverage_files_cond_1
    'sd:visualPlugins':
    - igvbrowser:
        tab: 'IGV Genome Browser'
        id: 'igvbrowser'
        type: 'wig'
        name: inputs.sample_names_cond_1
        height: 120

Additional context We should take into account that users, by mistake, can assign to name values from input or output of not appropriate type or size. The appropriate type should be string or string[] of the same size as array of files to be visualized in IGV. If any error occurs, the default value (output id) should be used.

tyomach commented 4 years ago

I think we want to get the name from workflow upstreams also. E.g. alias/name for ChIP/ATAC experiment in diffbind

michael-kotliar commented 4 years ago

Yep, if the input has upstream set as 'sd:upstreamSource': "first_biological_condition/alias" for example, we will get value from the alias of the upstream experiment