replicatesSpearmancor: Compute the correlation coefficient betwenn replicates or...

Description Usage Arguments Value Examples

View source: R/quality_control.R

Description

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

Usage

1
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

1
2
3
4
data(exampleHeader, package="RNAither")
data(exampleDataset, package="RNAither")

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

RNAither documentation built on Nov. 8, 2020, 8:06 p.m.