Learn R Programming

RNAither (version 2.20.0)

replicatesSpearmancor: Compute the correlation coefficient betwenn replicates or experiments

Description

Computes Spearman's rank correlation coefficient for each replicate - either inside each experiment, or between experiments.

Usage

replicatesSpearmancor(header, dataset, flag, col4val, col4anno, fileNameSuffix)

Arguments

header
the header of a dataset file generated with generateDatasetFile
dataset
an R data frame generated with generateDatasetFile
flag
1 or 2. 1 will compute the coefficient for a maximum of 3 replicates, for each experiment available in the dataset. 2 will summarize the replicates from each experiment with their root mean square and compute the correlation coefficient between experiments.
col4val
a character string specifying the column whose values will be used to compute the correlation coefficient
col4anno
a character string specifying the name of the dataset column to be used to define the replicate, e.g. "GeneName" or "Internal_GeneID"
fileNameSuffix
a character string that will be used to name the output file containing a table with the correlation coefficients.

Value

For flag==1, the correlation coefficients are printed out to the shell and saved in a text file named after the experiment name specified in the header concatenated with the character string filenamesuffix and "Spearmancor.txt".For flag==2, the correlation coefficients are printed out to the shell and saved in a text file named after the experiment name specified in the header concatenated with the character string filenamesuffix and "Spearmancor\_AllExp.txt".The function returns a table containing the correlation coefficients.

Examples

Run this code
data(exampleHeader, package="RNAither")
data(exampleDataset, package="RNAither")

replicatesSpearmancor(header, dataset, 1, "SigIntensity", "GeneName", "testfile1_")

Run the code above in your browser using DataLab