Use first row as header

Hi everyone,
I have a tabular file as output of my tool and I would like to use the first row as header (displayed in blue in the view tab).
I read an old discussion where they suggested to use the ‘#’ on the first row to let galaxy knowing that this is the header row but it seems that it is not working since the header is still considered part of the data.
Thank you for the help

Hi @Andrea_Furlani

That is correct. In the “peek view”, it will look like this for a tabular datatype with one header row starting with a #.

How to interpret:

  • Columns are numbered with a dark blue background.
  • Technically, and the header is counted up as a header line, other lines are counted as data lines.
  • tabular is one of the most general datatypes.
    • The header line and data lines are passed to downstream tools.
    • Some tools will have an option on the form where you can specify the input has a header line, or how many rows to consider as a header line. Other tools won’t, and for these, the user would need to strip header lines out first.
    • There are other defined datatypes that have “built in” headers. Example: bed. What is seen in the “peek view” for that datatype, under the dark blue background, is defined in the bed datatype specification (built into Galaxy), and not included in the file contents.

If you know what tools are likely to consume the output of your tool, you can test out how those interpret your header. Why? Several of the tools under “Data Manipulation” expect no header lines in any data. If you want people to be able to use those tools without extra formatting steps, consider not including a header or making it an optional output on your tool’s form. Maybe put some examples in your tool’s help section to alert users about how to use the output with example tools that interpret it differently.

Thank you very much, your answer was completely clear.