Learn R Programming

PoweREST (version 0.1.2)

fit_powerest: Fit the power surface

Description

This function loads the power values with corresponding avg_log2FC and avg_PCT derived from bootstrap sampling and utilizes the scam package to fit two dimensional smoothing splines under monotone constraints: 1.positive relationship between power and avg_log2FC; 2.positive relationship between power and avg_PCT. The values of avg_log2FC and avg_PCT can be either from the averages of the bootstrap samples or from the original spatial transcriptomics data.

Usage

fit_powerest(power,avg_log2FC,avg_PCT,filter_zero=TRUE)

Value

A 'scam' object is the result of scam function. More information about the content of a 'scam' object can be found at the document of R package scam.

Arguments

power

The raw power values.

avg_log2FC

The corresponding log2FC values.

avg_PCT

The corresponding PCT values.

filter_zero

Whether the user would like to filter to remove the power values being 0, default=TRUE.

Author

Lan Shui lshui@mdanderson.org

Examples

Run this code
data(result_example)
 b<-fit_powerest(result_example$power,result_example$avg_logFC,result_example$avg_PCT)

Run the code above in your browser using DataLab