Learn R Programming

RnaSeqSampleSize

To solve these issues, we developed a sample size estimation method based on the distributions of gene read counts and dispersions from real data. Datasets from the user's preliminary experiments or the Cancer Genome Atlas (TCGA) can be used as reference. The read counts and their related dispersions will be selected randomly from the reference based on their distributions, and from that, the power and sample size will be estimated and summarized.

#Running the following codes in your R
library(devtools)
install_github("slzhao/RnaSeqSampleSizeData")
install_github("slzhao/RnaSeqSampleSize")
#Load package
library("RnaSeqSampleSize")
#View vignette
browseVignettes(package="RnaSeqSampleSize")
#View help files
?sample_size
#Examples for sample size or power estimation by single read count and dispersion
sample_size(power=0.8, f=0.01,rho=2, lambda0=5, phi0=0.5)
est_power(n=63, rho=2, lambda0=5, phi0=0.5,f=0.01)
#Examples for power estimation by prior real data, may use 3 minutes
est_power_distribution(n=65,f=0.01,rho=2,distributionObject="TCGA_READ",repNumber=5)
sample_size_distribution(power=0.918,f=0.01,rho=2,distributionObject="TCGA_READ",repNumber=5)
#Examples for power curve generation
result1<-est_power_curve(n=63, f=0.01, rho=2, lambda0=5, phi0=0.5)
result2<-est_power_curve(n=63, f=0.05, rho=2, lambda0=5, phi0=0.5)
plot_power_curve(list(result1,result2))

Copy Link

Version

Version

1.4.2

License

GPL (>= 2)

Maintainer

Shilin Zhao

Last Published

February 15th, 2017

Functions in RnaSeqSampleSize (1.4.2)

est_power_distribution

est_power_distribution
est_power

est_power
sample_size_distribution

sample_size_distribution
sample_size

sample_size
optimize_parameter

optimize_parameter
convertIdOneToOne

convertId
est_count_dispersion

est_count_dispersion
plot_power_curve

plot_power_curve
est_power_curve

est_power_curve