Question: Combining Tables With Different Numbers Of Columns
0
gravatar for Peter Cock
7.6 years ago by
Peter Cock1.4k
European Union
Peter Cock1.4k wrote:
Hi all, I'm having a little trouble understanding the best way to perform some tabular file manipulations in Galaxy. I have several tabular files, which contain different numbers of columns, which I want to combine using a single column containing an identifier (which must match for the rows to be combined). e.g. File 1 contains, c1 = ID c2 = Score1a File 2 contains, c1 = ID c2 = Score2a c3 = Score2b c4 = Score2c File 3 contains, c1 = ID c2 = Score3a c3 = Score3b Desired combined file containing: c1 = ID c2 = Score1a c3 = Score2a c4 = Score2b c4 = Score2c c6 = Score3a c7 = Score3b I have worked out how to do this with two calls to the "Join two Datasets" tool, but this results in the repetition of the join column (ID in this example), so a final clean-up is required using the "Cut" tool (which breaks the column assignments). The more flexible "Column Join" tool would let me combine an arbitrary number of files, but is designed for input files containing the same column structure. Is there a better way to do this with Galaxy as it stands? Alternatively, would adding an option to the "Join two Datasets" tool not to bother with the redundant column be widely useful? Peter
galaxy • 1.2k views
ADD COMMENTlink modified 7.6 years ago by Jennifer Hillman Jackson25k • written 7.6 years ago by Peter Cock1.4k
0
gravatar for Jennifer Hillman Jackson
7.6 years ago by
United States
Jennifer Hillman Jackson25k wrote:
Hi Peter, Another option would be to pad out the files so that all desired columns in the final result are present before you do the join with "Column Join". For now, this and the method you describe are the available choices. If you wanted to open an issue in bitbucket, the team would have a log of the enhancement request. Or, I can open one, just let me know, Useful idea! Thanks, Jen Galaxy team -- Jennifer Jackson http://usegalaxy.org http://galaxyproject.org
ADD COMMENTlink written 7.6 years ago by Jennifer Hillman Jackson25k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 176 users visited in the last hour