Aligning Data Sets Together

Study Forum (Inactive)
Aligning Data Sets Together Ng.B  2013-06-20 10:28
Status: Closed
 
Hi All,

Here is my situation that I hope the community can help me out with. Lets say I've done two experiments, x and y. I generated two files, x.xls and y.xls. Each of these files contain a list of Gene IDs and their expression. After uploading the two files as lists, is it possible to join these two files and aligning them based upon Gene ID. The end result would be a column of Gene IDs and their expression across the two different experiments.
 
 
jeckels responded:  2013-06-20 13:49
Hello,

Yes, this is very possible.

One of the easiest things to do, if it works with your data, would be to make the GeneID column the key field for each of your lists. In the list designer, you can then edit the Type of the GeneID field so that it's a lookup to the other list. Then, when viewing the grid of data for the list, you can join in information from the other list by going to Views->Customize View. This should work well if you have just two lists.

If you have multiple rows of data within a given list, you'd need to write a custom SQL query that handles the join, and how you want to combine those rows.

Thanks,
Josh
 
Ng.B responded:  2013-06-21 07:26
Thanks for your response but I don't think I quite understand your method (Sorry I'm still new to LabKey).

So I uploaded both files as a list and made the GeneID column as a primary key for each file. I don't see how the lists are being "joined" using Views->Customize View. It will only show results only for that list and not show the expression across each experiment.
 
jeckels responded:  2013-06-25 13:08
Hello again,

In order to let users add columns from the other list, you'll need to configure the lists in the List Designer:

Go to Admin->Manage Lists.
For one of the lists, click on the View Design link.
Click on the Edit Design button.
Click on the drop-down in the Type column for the GeneID field.
Choose "Lookup" in the dialog box.
The "lists" schema will likely already be selected. Choose the other list's name in the "Table" drop-down.
Click Apply.
Click Save.

Do the same for the second list.

Then, when viewing one of the list's data as a grid, select Views->Customize View.
Expand the GeneId node in the tree.
You will see the fields from the other lists. Choose one or more of them.
Click View Grid (or Save to create a saved view).

You should then see data from both lists in the same data grid.

Thanks,
Josh