3.5. Transforming your data

3.5.1. Built-in transformations

Caryoscope provides two common calculations on your data as built-in features.

Important

Note that Caryoscope will plot the values computed by the calculations. However, values for the same annotation shown by the Feature tooltip expression and Feature URL expression will be the original annotations in the data file.

3.5.1.1. Logarithm calculation

Caryoscope allows you compute the logarithm of your data before plotting. The Lograrithm enabled and Logarithm base options enable and parametrize this operation. The fact that a logarithm is being computed, and the base of the logarithm, will be shown in the dataset names:

With logarithm (base 10)Without logarithm

3.5.1.2. Moving average calculation

The moving average calculation operates in genomic coordinates to smooth your data by averaging each feature's data value with the values of features to its left and right on the chromosome.

With moving average (window width = 7)Without moving average

To describe the mathematical formulae used to compute the moving average, we define the following variables:

k = Moving average half window width.

d = distance in base pairs along the chromosome.

dh = Moving average half decay distance.

i = the index, in the data series (as ordered along the chromosome), of the data element for which we are currently computing the averaged value.

v = data values that are plotted or computed in Caryoscope.

vi = the original value of the ith data element.

dj = the absolute value of the distance in base pairs from the centerpoint of the ith data element to the centerpoint of the i+jth data element. It follows that d0 = 0.

w(d) = an exponential weighting function used in computing the averaged values.

The averaged value for the ith data element is computed based on (2k + 1) elements arranged as follows:

The averaged value for the ith data element is then computed as:

Where:

Important

The moving average calculation will cause a few of your data points to not be plotted. Specifically, the first and last k data points on each choromosome will be used in the averaging calculation, but will not be displayed.

3.5.2. External calculations

To perform external calculations on your data, we suggest that you represent your data in a comma- or tab-delimited spreadsheet compatible text file (see Section 3.4.2, “Spreadsheet-compatible text”). Edit the file in your favorite spreadsheet program, and add or recompute columns as you choose. When you wish to see your data in Caryoscope, open the file and view it as you wish.

Important

If you modify the file that Caryoscope is currently viewing, and then change your display to view another dataset, Caryoscope will display incorrect data. After modifying a file using a separate program, you should always reopen the file, using the File | Reopen Current menu item, before trying to do any further work with it.