How can I connect data points from the same sample by lines in views?

From Array Suite Wiki

Jump to: navigation, search

Here is an example in which each subject has two different time points. The design information can be found in the following design table, 12 subjects, each subject has two time point 1 and 2.

Contents

Method 1

Connection1.png

The key trick here is change the column mode of subject so Array Studio would know how to connect different data points from the same samples:

Connection2.png

And change the mode to “Subject”:

Connection3.png

Then you can add variable view:

Connection4.png

And “Specify Profile Column” to Time point:

Connection5.png

Change the Profile Gallery to:

Connection6.png

Then you will have a plot like this:

Connection7.png

Method 2

Instead of using the Subject mode to automatically match subjects in the R BoxPlot, the data can be manually split by Subject and Treatment, allowing customized colors for lines.

In this example, 18 subjects were sampled at the time of treatment, then again one month later.

Step 1: Profile by Treatment

Select your metadata column that separates samples within each subject, e.g. Treatment, TreatmentTime, Infection, etc.

SpecifyProfileColumns.png

SamplesProfiledByTreatment.png

Step 2: Split by SubjectID

Split By is a specialized option to further subset data within each profile column, such as SubjectID:

SpecifySplitColumns.png

SamplesProfiledByTreatmentSplitBySubject.png

Step 3: Connect SubjectIDs with LineScatter

Change the Profile Column to LineScatter (for a clean look without individual data points, try Line):

SpecifyProfileView.png

ConnectedSamplesProfiledByTreatmentSplitBySubject.png