Its is posible to change the column headers of a tabular file in my galaxy histtory

Hello
In my galaxy history Im currently working with multiple text tabular files but i like to add or change te headers from some of them. Its possible to change or add the header within galaxy? I looked in the forum and didnt find a solution yet

Hi @Nicolas_Romero_Villa

Yes, data files can be manipulated with many tools. The most commonly used are covered in this tutorial, see Data Manipulation Olympics

The idea would be to:

  1. Remove the existing header, if any
  2. Create a new file with the header you want to use instead
  3. “Concatenate” the two files together

If you get stuck, you can post back the first few lines of your existing file and explain what you want to replace it with. The format will be important, so just copy/paste into a block quote. But try yourself first. Learning how to do this is a core bioinformatics skill you’ll use over and over.

I got a question in this case the labels named as “Columns” from 1 to 17 by Multijoin are headers? When i download the file and open it in excel that labels seams to dissapear

Hi @Nicolas_Romero_Villa

Excel sometimes “tries” to interpret headers, and doesn’t always get it right.

Putting actual headers on your file inside Galaxy, then exporting that file as text will help Excel to read them in better, preserving the structure.

This is pretty easy to do, and we can show you and then it will be easier next time. Want to post back what the dataset looks like in Galaxy (eye icon) for more help? Also post back the first few lines (not just the header but also a few data lines) as a copy/paste and try to preserve the formatting by quoting the text here-- or just leave it exact from the paste and I can fix it up. Any spaces/tabs are important to keep for this.

Yes please i’ll apreciate the help because im a little bit confuse about that thank you JennaJ

Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 Column 7 Column 8 Column 9 Column 10 Column 11 Column 12 Column 13 Column 14 Column 15 Column 16 Column 17
LOC130612030 0 0 1 1 0 0 0 0 0 0 0 2 0 0 1 1
LOC130612031 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
LOC130612032 28 28 62 30 65 90 51 94 29 39 29 53 51 108 104 66
LOC130612033 11 11 28 22 28 27 21 26 12 8 14 20 15 28 22 12
LOC130612034 14 14 38 15 25 44 19 41 18 14 15 24 17 31 33 30
LOC130612035 19 19 27 20 26 19 8 28 12 17 16 19 27 16 20 5
LOC130612036 243 243 413 184 301 163 263 305 270 557 533 352 425 358 267 319
LOC130612037 2 2 2 2 3 5 2 4 2 1 3 4 3 0 1 0
LOC130612038 73 73 109 77 99 185 103 111 109 166 129 178 213 215 186 119
LOC130612039 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
LOC130612040 21 21 15 13 12 24 15 36 7 11 5 18 2 10 8 15
LOC130612042 36 36 53 47 68 58 35 46 31 63 53 115 105 70 87 53
LOC130612043 23 23 18 24 49 32 18 28 22 30 12 16 37 38 40 29
LOC130612044 0 0 1 0 0 1 0 0 1 0 0 0 2 0 1 0
LOC130612045 54 54 59 43 72 77 49 72 37 47 47 90 74 102 98 72

Ok, thanks @Nicolas_Romero_Villa

Try this:

  1. Upload a plain text file that has nine tab separated terms. Don’t use Excel for this, instead use whatever plain text editor your OS supports. On MacOS, the app is name “text editor” and is already on your computer by default :slight_smile: Not sure what is good for a PC but an internet search should find it.
  2. Use the tool Concatenate to “stack” the header-only text file on top of the current text file
  3. Click on the eye icon to make sure the result is Ok

Hope that helps!