calculate.p.values {OutSeekR} | R Documentation |
Calculate p-values
Description
Calculate p-values for each sample of a single transcript.
Usage
calculate.p.values(
x,
x.distribution,
x.zrange.mean,
x.zrange.median,
x.zrange.trimmean,
x.fraction.kmeans,
x.cosine.similarity,
null.zrange.mean,
null.zrange.median,
null.zrange.trimmean,
null.fraction.kmeans,
null.cosine.similarity,
kmeans.nstart = 1
)
Arguments
x |
A numeric vector of values for an observed transcript. |
x.distribution |
A numeric code corresponding to the optimal distribution of |
x.zrange.mean |
A number, the range of the z-scores calculated using the mean and standard deviation of |
x.zrange.median |
A number, the range of the z-scores calculated using the median and median absolute deviation of |
x.zrange.trimmean |
A number, the range of the z-scores calculated using the trimmed mean and trimmed standard deviation of |
x.fraction.kmeans |
A number, the k-means fraction of |
x.cosine.similarity |
A number, the cosine similarity of |
null.zrange.mean |
A numeric vector, the ranges of the z-scores calculated using the mean and standard deviation of each transcript in the null data. |
null.zrange.median |
A numeric vector, the ranges of the z-scores calculated using the median and median absolute deviation of each transcript in the null data. |
null.zrange.trimmean |
A numeric vector, the ranges of the z-scores calculated using the trimmed mean and trimmed standard deviation of each transcript in the null data. |
null.fraction.kmeans |
A numeric vector, the k-means fraction of each transcript in the null data. |
null.cosine.similarity |
A numeric vector, the cosine similarity of each transcript in the null data. |
kmeans.nstart |
The number of random starts when computing k-means fraction; default is 1. See |
Value
A list consisting of the following entries:
-
p.values
: a vector of p-values for the outlier test run on each sample (up until the p-value exceedsp.value.threshold
); and -
outlier.statistics.list
, a list of vectors containing the values of the outlier statistics calculated from the remaining samples. The list will be of length equal to one plus the total number of outliers (i.e., the number of samples with an outlier test p-value less thanp.value.threshold
) and will contain entriesoutlier.statistics.N
, whereN
is between zero and the total number of outliers.outlier.statistics.N
is the vector of outlier statistics after excluding theN
th outlier sample, withoutlier.statistics.0
being for the complete transcript.
Examples
data(example.data.for.calculate.p.values);
i <- 1; # row index of transcript to test
calculate.p.values(
x = example.data.for.calculate.p.values$data[i,],
x.distribution = example.data.for.calculate.p.values$x.distribution[i],
x.zrange.mean = example.data.for.calculate.p.values$x.zrange.mean[i],
x.zrange.median = example.data.for.calculate.p.values$x.zrange.median[i],
x.zrange.trimmean = example.data.for.calculate.p.values$x.zrange.trimmean[i],
x.fraction.kmeans = example.data.for.calculate.p.values$x.fraction.kmeans[i],
x.cosine.similarity = example.data.for.calculate.p.values$x.cosine.similarity[i],
null.zrange.mean = example.data.for.calculate.p.values$null.zrange.mean,
null.zrange.median = example.data.for.calculate.p.values$null.zrange.median,
null.zrange.trimmean = example.data.for.calculate.p.values$null.zrange.trimmean,
null.fraction.kmeans = example.data.for.calculate.p.values$null.fraction.kmeans,
null.cosine.similarity = example.data.for.calculate.p.values$null.cosine.similarity,
kmeans.nstart = example.data.for.calculate.p.values$kmeans.nstart
);