LIMS - Guide

This chapter explains how to use the LIMS functionality. You are assumed to already know how to create new documents, and have read the LIMS theory chapter.

Creating new tables

New tables are created in a new document, using the "LIMS Table declaration" section. Below two tables are created, one for strain definitions and one for keeping track of frozen tubes of the strain:

One table is created at a time and the name is mandatory. In case you have signed your document and cannot modify the table record, it is possible to override the old one by creating a new declaration at the end with the same name. When you create a new attribute you will get the following window. You are strongly discouraged from changing the short name once you have created the table and inserted values. Likewise also the type, but all other fields are decently safe to edit at any moment.

If you want to cross-reference another table (again, see the general theory chapter), you can create foreign keys. Pressing the “Add foreign key” button, you will see the following window:

On the top you select which table to reference, below the attributes to include. You need to include at least one attribute to create a key. The window will try to automatically match up attributes having the same name, thus consistent naming will make you more productive.

Inserting values

To insert values, create a document containing “LIMS Insert records” sections. You are discouraged from creating a table and inserting values into it, in the same document. One insertion section with two records is shown below:

You can insert multiple records into multiple databases, but for clarity you are recommended to make one section for each type of database. In particular this enables you display more compact tables of multiple insertions (which is impossible if you mix record types). Click "Add record" to add more records. In addition, it will use the foreign keys to let you create a hierarchy of related entries immediately. For example, if you enter a sample record, you can immediately also add records where it has been frozen, or how it has been further processed. To do this, click "Create subrecord" and a list of suggested referencing tables will be shown. By doing subrecords immediately you also ensure that the cross-referencing is done correctly as those values for subrecords are filled in automatically.

Managing tables

Once you have documents defining tables and inserting data, they will be indexed by the system. To display which tables you have, in go the “LIMS Tables” tab in the main window. You will get to the following view:

"View" will open a display of the table contents. The other options are for managing off-line use of the table.

"Copy from server" will create a copy of the table in your local client. Thus, you need not download all the documents to keep the table content when browsing off-line.

"Continuously copy" means to have the client synchronize with the server every time it connects. This operation is costly (CPU and bandwidth) and thus you must explicitly enable it for the tables you are interested in

"Lease keys" is used for tables with a narrow key space. Tables set to generate GUID keys do not need key leasing, but for example, the table might be set to generate small integers as ID:s. In such cases, to be able to generate ID:s off-line you need to tell the server that you are reserving a set of ID:s for future use. Since you should not lease keys for tables you will never edit, you have to explicitly enable leasing for your tables.

Viewing tables

If you double-click a table in the table list, you will open a display of the content: If the result table is too long it may be truncated, in which case you may wish to filter the result, or you can explicitly load a larger part of the table.

In the view you can also show merged (joined) tables. Use "Add table" to include more data. However, you will need to tell how the tables should be merged. By default, "Use foreign keys implicitly" is checked, meaning that any foreign keys you have declared will be used to match up the rows. In case however wish to cross-reference your data with another table it was not originally meant to reference (e.g. data from another research group), you can specify new merging rules using "Add join".

Deleting and modifying values

Deleting values is more complicated than inserting values, and it is encouraged to design tables in such a way that a deletion is never necessary. To modify, you need to delete the old record and then insert a new record in it's place. Thus tables requiring modifications are also discouraged. To delete a value, you will actually be undoing the insertion. Thus you need to find a reference to the insertion first. Start by viewing the table (or a merge of tables). Select cells from the table you wish to delete. One cell per entry is enough – if you only display a single unmerged table then you can use any column. Then press "Erase records". This will not immediately erase the records but you have to create a new document that does it. So create a document or continue with one you are editing. Then use the button “Paste new section”. This will cause a new delete section to be inserted. Once the document is saved the delete will be executed.

Searching with SQL expressions

Filtering is done using SQL boolean queries. For example, you execute:
	sampleid LIKE "%ce%" AND strainSource="CGC"
This is a pure boolean query, similar to filtering documents using the advanced search. However, SQL allows you to search with cross-referencing, e.g.:
sampleid LIKE “%ce%” AND NOT (sampleid in SELECT sampleid from “..... :: frozen”)
Here pulling our samples containing "ce" in the name, and which are not yet frozen.