Basic statistics
constant operator
Description
constant
operator allows for a value equal to a constant to be generated
Usage
Input projection | . |
---|---|
none |
Input parameters | . |
---|---|
value |
numeric, the constant value to be generated, default is 0 |
Output relations | . |
---|---|
constant |
numeric, one constant is generated per cell |
Details
A constant
value is generated for all the data. All factors are therefore associated with this constant. A typical use of this operator is when you require to generate fixed boundary values to be used as a grid line in a later (i.e. downstream) step. The grid line is created in a layer
using the h-grid view type
. An example would be to create a zero grid line, where theconstant
operator is used to generate a zero value and a zero line is then available for later visuals.
References
See Also
GitHub link
count operator
Description
count
operator counts the number of data points.
Usage
Input projection | . |
---|---|
y-axis |
is the input data to be counted, per cell |
Output relations | . |
---|---|
count |
numeric, count of the input values |
Details
The operator takes all the values of a cell and counts them. The computation is done per cell. There is one value calculated and returned for each of the input cell.
References
Examples
GitHub link
cv operator
Description
cv
operator calculates the coefficient of variance on a set of input values.
Usage
Input projection | . |
---|---|
y-axis |
values to be used for the calculation of the cv, per cell |
Output relations | . |
---|---|
cv |
numeric, coefficient of variation result per cell |
Details
The coefficcient of variation is a measure of variaton, it is equivalent to standard deviation divided by the mean.
The cv
is returned as a fraction.
References
see the https://en.wikipedia.org/wiki/Coefficient_of_variation
Examples
GitHub link
density operator
Description
density
operator performs a density caculations on x and y input values.
Usage
Input projection | . |
---|---|
x-axis |
indicates the values of the x |
y-axis |
indicates the values of the y |
Output relations | . |
---|---|
density |
numeric, density calculation, calculated per cell |
Details
A density calculation is performed per cell with the input values defined by the x and y-axis, the result are density
values associated with each cell. The density
operator is typically used in a pairwise plot and the returned density
values are usually used as a coloring in a pairwise plot of the original input values.
References
See Also
Examples
GitHub link
foldchange operator
Description
foldchange
operator performs a fold change (i.e. ratio) caculation between two values.
Usage
Input projection | . |
---|---|
x-axis |
contains the grouping factor for the fold change calculation, |
y-axis |
values |
Input parameter | . |
---|---|
reverse |
logical, to reverse the calculation, default is FALSE |
Output relations | . |
---|---|
FoldChange |
numeric, foldchange, calculated per cell |
Details
A foldchange operation is performed per cell. Each cell has values defined by the y-axis and seperated by the x-axis. The result of the foldchange is the ratio of the first divided by the second. If reverse is selected then the order of the ratio is changed.
References
See Also
ratio,logfoldchange ##### Examples
GitHub link
IQR operator
Description
The IQR
operator returns the interquartile range of a set of data points.
Usage
Input projection | . |
---|---|
y-axis |
numeric, input data, per cell |
Output relations | . |
---|---|
iqr |
numeric, median of the input data |
Details
The operator takes all the values of a cell and returns the IQR value. The computation is done per cell and a single value is returned for each of the input cell.
See Also
GitHub link
logfoldchange operator
Description
logfoldchange
operator performs a fold change (i.e. ratio) caculation between two values.
Usage
Input projection | . |
---|---|
x-axis |
contains the grouping factor for the log2 fold change calculation, |
y-axis |
values |
Input parameter | . |
---|---|
reverse |
logical, to reverse the calculation, default is FALSE |
Output relations | . |
---|---|
logFC |
numeric, logfoldchange calculated per cell |
Details
A logfoldchange
operation is performed per cell. Each cell has values defined by the y-axis and seperated by the x-axis. The result of the logfoldchange is the log2 values where of the first is substrated by the second. If reverse is selected then the order of the substraction is changed.
References
See Also
ratio,foldchange ##### Examples
GitHub link
max operator
Description
max
operator returns the maximum of a set of data points.
Usage
Input projection | . |
---|---|
y-axis |
numeric, input data, per cell |
Output relations | . |
---|---|
max |
numeric, max of the input data |
Details
The operator takes all the values of a cell and returns the value which is the maximum. The computation is done per cell (one value is returned for each input cell).
References
Based on the max R function.
See Also
GitHub link
Mean imputation operator
Description
mean_imputation
operator replaces missing values by the column mean.
Usage
Input projection | . |
---|---|
row |
factor, observations |
column |
factor, variables |
y-axis |
numeric, input data, per cell |
Output relations | . |
---|---|
mean_imputed |
numeric, measurements with imputed values |
Details
The operator replaces missing values (NA
) by the column mean.
References
See also
GitHub link
mean operator
Description
mean
operator computes the mean of a set of data points.
Usage
Input projection | . |
---|---|
y-axis |
is the input data for the mean, per cell |
Output relations | . |
---|---|
mean |
numeric, mean of the input values |
Details
The operator takes all the values of a cell and calculates their mean. The computation is done per cell. There is one value calculated and returned for each of the input cell.
References
See Also
Examples
GitHub link
mean sd operator
Description
mean sd
operator computes the mean and standard deviation of a set of data points.
Usage
Input projection | . |
---|---|
y-axis |
numeric, input data, per cell |
Output relations | . |
---|---|
mean |
numeric, mean of the input data |
sd |
numeric, standard deviation of the input data |
Details
The operator takes all the values of a cell and calculates their mean and standard deviation. The computation is done per cell. There are two value calculated and returned for each of the input cell.
References
See Also
Examples
GitHub link
Median operator
Description
Median
operator returns the median of a set of data points.
Usage
Input projection | . |
---|---|
y-axis |
numeric, input data, per cell |
Output relations | . |
---|---|
median |
numeric, median of the input data |
Details
The operator takes all the values of a cell and returns the value which is the median.The computation is done per cell. There is one value returned for each of the input cell.
References
See Also
mean_operator ##### Examples
GitHub link
negative operator
Description
negative
operator performs a negative of values
Usage
Input projection | . |
---|---|
y-axis |
values to be negated |
Output relations | . |
---|---|
negative |
numeric, negative per data point |
Details
A negative of values is performed.
References
See Also
Examples
GitHub link
Pairwise RMSD operator
Description
The pairwise_RMSD
operator returns the Relative Mean Squared Deviation computed between pairs of variables.
Usage
Input projection | . |
---|---|
row |
factor, input variables |
col |
factor, observations |
.y |
numeric, measurements |
Output relations | . |
---|---|
rmsd |
numeric, RMSD |
to |
numeric, variable to be projected against the initial one for pairwise distance visualisation |
Details
References
See Also
Examples
GitHub link
pearson operator
Description
pearson
operator performs a person correlation of two input sets of data per cell
Usage
Input projection | . |
---|---|
x-axis |
value of one group of data |
y-axis |
value of other group of data |
Output relations | . |
---|---|
cor |
numeric, pearson correlation calculated per cell |
pv |
numeric, p-value calculated per cell |
Details
A pearson correlation is performed per cell where the two groups of data to be correlated are found on the x-axis
and y-axis
.
This operator is ideally suited as an operator for multiple pairwise projections in Tercen.
References
see the base::cor.test
function of the R package for the documentation,
See Also
Examples
GitHub link
Percentile operator
Description
percentile
operator returns the percentile of a set of data points.
Usage
Input projection | . |
---|---|
y-axis |
numeric, input data, per cell |
Input parameters | . |
---|---|
percentile |
numeric, the percentile to use, default is 0.01, 1% percentile |
Output relations | . |
---|---|
percentile |
numeric, percentile of the input data |
Details
The operator takes all the values of a cell and returns the precentile value. The computation is done per cell. There is one value returned for each of the input cell.
References
See Also
Examples
GitHub link
Introduction
This is a template repository.
Use this template repository during the first step of developing a tercen operator (in R) on github.
An overview of steps for developing an operator are:
- create a github repo
- install tercen_studio
- login to tercen_studio
- git clone the newly created repo
- start developing in R in tercen_studio
- add R packages to the repo
- push to the github repo
- go to tercen and install the operator
For step 1, when creating the repo on github, you will notice the option to use a template repository, choose the templateR_operator
repository and select it as the template repository.
After creation, you now have a new repository with all the convenient files for making a new operator (in R) for tercen.
Use tercen_studio
to clone the new repository and start programming in tercen_studio
it includes the skeleton files
main.R
workspace.R
operator.json
README_template.md
doc
directory
please remember to change the README_template.md
to README.template.md
inside the doc
there is a dev_commands.md
file which contains useful development command lines.
GitHub link
RMSD operator
Description
RMSD
operator returns the Relative Mean Square Deviation of two variables.
Usage
Input projection | . |
---|---|
x-axis |
numeric, input data, per cell |
y-axis |
numeric, input data, per cell |
Output relations | . |
---|---|
rmsd |
numeric, RMSD of the input data |
Details
References
See Also
Examples
GitHub link
Sample operator
Description
Sample
operator returns a sample of the specified size from the set of data points using either with or without replacement.
Usage
Input projection | . |
---|---|
y-axis |
numeric, input data |
cols |
numeric, observations, the sample factor(s) |
Input parameters | . |
---|---|
size |
numeric, the fraction to sample, default is 1 (100% percent) |
replace |
boolean, should replacement be used? , default is false (no replacement) |
Output relations | . |
---|---|
sample |
numeric, sample of the input data |
Details
The operator randomly selects columns (i.e. samples)
References
See the sample
function in base R.
See Also
Examples
GitHub link
scale operator
Description
scale
operator performs a scaling of the data
Usage
Input projection | . |
---|---|
row |
represents the variables (e.g. channels, markers, genes) |
col |
represents the observations (e.g. cells, samples, indviduals) |
y-axis |
measurement value |
Input parameters | . |
---|---|
scale |
logical, if scale is TRUE then scaling is done by dividing the (centered) row of x by their standard deviations if center is TRUE, and the root mean square otherwise. If scale is FALSE , no scaling is done. |
center |
If center is TRUE then centering is done by subtracting the row means (omitting NAs) of x from their corresponding columns, and if center is FALSE , no centering is done. |
Output relations | . |
---|---|
scale |
numeric, per cell |
Details
The operator is the scale
function in base R.
References
See the base::scale
function of the R package for more details.
GitHub link
sd operator
Description
sd
operator computes the standard deviation of a set of data points.
Usage
Input projection | . |
---|---|
y-axis |
is the input data for the sd, per cell |
Output relations | . |
---|---|
sd |
numeric, sd of the input values |
Details
The operator takes all the values of a cell and calculates their standard deviation. The computation is done per cell. There is one value calculated and returned for each of the input cell.
References
See Also
Examples
GitHub link
Seqlen operator
Description
Seqlen
operator creates a sequence annotation for a data series
Usage
Input projection | . |
---|---|
y-axis |
numeric, input data, per cell |
x-axis |
numeric, input data, ordering of the data series |
Output relations | . |
---|---|
seq |
numeric, sequence of the input data |
Details
The operator takes all the values of a cell ordered by the ’x-axis’and gives a sequence number to each data point in the cell.
References
See Also
Examples
GitHub link
Shift operator
Description
shift
operator performs a shift by a constant value.
Usage
Input projection | . |
---|---|
y-axis |
values as input to the shift operator |
Input parameters | . |
---|---|
constant |
numeric, the shift value, default is 0 |
Output relations | . |
---|---|
shift |
numeric, output shift transformation per data point |
References
See Also
Examples
GitHub link
signchange operator
Description
signchange
operator negates the data value, i.e. sign changes
Usage
Input projection | . |
---|---|
y-axis |
value of data to be sign changed |
Output relations | . |
---|---|
signchange |
numeric, the opposite sign of the value |
Details
The sigchange
operator changes the sign of the data by negating the value.
References
See Also
Examples
GitHub link
topn operator
Description
topn
operator returns data points.
Usage
Input projection | . |
---|---|
y-axis |
numeric, input data, per cell |
Output relations | . |
---|---|
elements |
numeric, choosen elements of the input data |
Details
The operator takes all the values of a cell and returns the top n elements.
References
See Also
Examples
GitHub link
Upper and lower bounds operator
Description
upperandlowerbounds
operator computes an upper and lower bound values as a fraction of a given data point.
Usage
Input projection | . |
---|---|
y-axis |
is the input data for the multiplication per cell |
Input parameters | . |
---|---|
fraction |
numeric, fraction value |
percentage |
boolean, the relative values are returned as percentages |
Output relations | . |
---|---|
upperbound_absolute |
numeric, upper absolute bound value |
lowbound_absolute |
numeric, lower absolute bound value |
upperbound_relative |
numeric, upper relative bound value |
lowbound_relative |
numeric, lower relative bound value |
Details
The operator takes the mean value of a cell and calculates an upper bound and a lowerbound. The computation is done per cell. There are four values colculated and returned for each of the input cell.
The operator takes the mean value and calculates an upper bound by adding to it
upperbound_absolute = value + (value * fraction)
lowerbound_absolute = value + (value * fraction)
upperbound_relative = (value * fraction)
lowerbound_relative = (value * fraction)
Use this operator when wanting to determine upper and lower bounds. These generated bounds are usually used in a downstream data step for a graphics representation using grid lines which correspond to the boundary values (see horizontal grid lines feature)
GitHub link
Word count operator
Description
Word count
operator count the occurences of each words in one or more documents.
Usage
Input projection | . |
---|---|
row |
is the documentId |
Output relations | . |
---|---|
count |
numeric, mean of the input values |
word |
character, the word |
documentId |
character, the id of the document |
Details
The operator count the occurences of each words in one or more documents.