Parent Samples: Derivation and Lineage

_Documentation
LabKey Server understands relationships between different samples, including when a sample is an aliquot from a larger parent sample, or when a mixture is created from multiple parent samples. Visualizations of these relationships are shown using "Lineage Graphs".

The following topics explain how to capture these sample-to-sample relationships in LabKey Server.

Indicate Sample Parentage Using the User Interface

You can capture sample aliquoting using the user interface.

  • From a Sample Set, select one or more samples to use as parents, and click Derive samples.
  • Specify Source Materials:
    • Name. The source samples are listed here.
    • Role. Roles allow you to label each input with a unique purpose.
  • Number of Derived Samples. You can create multiple derived samples at once.
  • Target Sample Set. You have the option to make derived samples part of an existing sample set.
  • Click Next.
  • Enter properties specific to the Output Sample(s) if needed.
  • Click Submit.

There is also a link to Derive samples from this sample link on the details view of each individual sample.

Indicate Sample Parentage On Import

When importing samples, you can indicate a parent sample by including a column named "MaterialInputs/<NameOfSampleSet>", where <NameOfSampleSet> refers to some existing sample set, either a different sample set, or the current one. For example, the following indicates that DerivedSample-1 has a parent named M-100 in the sample set RawMaterials.

NameMaterialInputs/RawMaterials
DerivedSample-1M-100

You can point to parents in the same or different sample sets. The following shows child and parent samples both residing in the sample set MySampleSet:

NameMaterialInputs/MySampleSet
ParentSample-1 
ChildSample-1ParentSample-1

To indicate multiple parents, provide a list separated by commas. The following indicates that DerivedSample-2 is a mixture of two materials M-100 and M-200 in the RawMaterials sample set.

NameMaterialInputs/RawMaterials
DerivedSample-2M-100, M-200

You can indicate parents across multiple sample sets by adding multiple MaterialInput columns. The following indicates that DerivedSample-3 has three parents, two from RawMaterials, and one from Reagents:

NameMaterialInputs/RawMaterialsMaterialInputs/Reagents
DerivedSample-3M-100, M-200R-100

Samples can be linked to DataClasses using a similar syntax. The following indicates that DerivedSample-4 is derived from an expression system ES-100

NameDataInputs/ExpressionSystems
DerivedSample-4ES-100

Indicate Sample Parentage Through the API

You can create a LABKEY.Exp.Run with parent samples as inputs and child derivatives as outputs.

Display the Parent Column

By default a sample set does not display the parent columns, either the Material Inputs or the Data Inputs. To show these columns:

  • Go the relevant sample set.
  • In the panel Sample Set Contents, click Grid Views > Customize Grid.
  • Select Show Hidden Fields.
  • Open the nodes Inputs > Data or the nodes Inputs > Materials.
  • Select the field you would like to show.
  • Save the grid, either for your own viewing, or for sharing with others.

Lineage Graphs

Derived samples are represented graphically using "lineage graphs". Sample are represented as rectangles and the derivation steps are shown as diamonds. Note that elements in the graph are clickable links that navigate to details pages for other samples.

To view a derivation graph:

  • Go to the sample set of interest.
  • Click the individual sample name or id.
  • On the sample details page, under Standard Properties > Lineage Graph, click the link Lineage for <Your Sample>. If there is no parentage information, there will be no link and no graph.

Note that lineage graphs can differ depending on the way that the data is entered. When you manually derive multiple child samples from a parent via the Derive Samples button, the lineage graph summary view will show these child samples on one graph, as shown below in a case where two additional samples have been derived from the "Derived Yeast Sample".

When the sample parent/child relationships are imported via copy-and-paste or via the API, separate lineage graphs will be rendered for each parent/child relationship, as shown below. A single graph showing all the child sample simultaneously will not be available.

Related Topics


previousnext
 
expand allcollapse all