Learn R Programming

MSstats (version 2.4.0)

designSampleSize: Planning future experimental designs of label-free and label-based LC-MS, SRM, DIA experiments in sample size calculation

Description

Calculate sample size for future experiments of a label-free and label-based LC-MS, SRM and DIA experiment based on intensity-based linear model. Four options of the calculation: (1) number of biological replicates per condition, (2) number of peptides per protein, and (3) number of transitions per peptide, (4) power.

Usage

designSampleSize(data=data,numSample=numSample,numPep=numPep,numTran=numTran,desiredFC=desiredFC,FDR=FDR,power=power,scopeOfBioReplication="restricted",interference=TRUE)

Arguments

data
name of the data set.
numSample
minimal number of biological replicates per condition. TRUE represents you require to calculate the sample size for this category, else you should input the exact number of biological replicates.
numPep
minimal number of peptides per protein. TRUE represents you require to calculate the sample size for this category, else you should input the exact number of peptides.
numTran
minimal number of transitions per peptide. TRUE represents you require to calculate the sample size for this category, else you should input the exact number of transitions.
desiredFC
the range of a desired fold change which includes the lower and upper values of the desired fold change.
FDR
a pre-specified false discovery ratio (FDR) to control the overall false positive.
power
a pre-specified statistical power which defined as the probability of detecting a true fold change. TRUE represent you require to calculate the power for this category, else you should input the average of power you expect.
scopeOfBioReplication
choice of scope of biological replication. "restricted"(default) represents restricted scope of biological replication to the selected individuals. "expanded" represents expanded scope of biological replication to the whole population.
interference
choice of interference data. TRUE(default) means data contain interference transitions and need additional model interaction to address the interference. FALSE means data contain no interference transitions and no need additional model interaction to address the interference.

Value

Warning

It can only obtain either one of the categories of the sample size calculation (numSample, numPep, numTran, power) at the same time.

Details

The function fits the model and uses variance components to calculate sample size. The underlying model fitting with intensity-based linear model with technical MS run replication. Data in the example is QuantData. Estimated sample size is rounded to 0 decimal.

References

Ching-Yun Chang, Paola Picotti, Ruth Huttenhain, Viola Heinzelmann-Schwarz, Marko Jovanovic, Ruedi Aebersold, Olga Vitek. "Protein significance analysis in selected reaction monitoring (SRM) measurements." Molecular & Cellular Proteomics, 11:M111.014662, 2012.

Timothy Clough, Safia Thaminy, Susanne Ragg, Ruedi Aebersold, Olga Vitek. "Statistical protein quantification and significance analysis in label-free LC-M experiments with complex designs" BMC Bioinformatics, 13:S16, 2012.

Examples

Run this code
# Consider quantitative data (i.e. QuantData) from yeast study.
# A time course study with ten time points of interests and three biological replicates.

head(QuantData)

## Calculate sample size for future experiments:

#(1) Minimal number of biological replicates per condition

designSampleSize(data=QuantData,numSample=TRUE,numPep=3,numTran=4,
desiredFC=c(1.25,1.75),FDR=0.05,power=0.8)

#(2) Minimal number of peptides per protein

designSampleSize(data=QuantData,numSample=2,numPep=TRUE,numTran=4,
desiredFC=c(1.25,1.75),FDR=0.05,power=0.8)	

#(3) Minimal number of transitions per peptide

designSampleSize(data=QuantData,numSample=2,numPep=3,numTran=TRUE,
desiredFC=c(1.25,1.75),FDR=0.05,power=0.8)	

#(4) Power calculation

designSampleSize(data=QuantData,numSample=2,numPep=3,numTran=4,
desiredFC=c(1.25,1.75),FDR=0.05,power=TRUE)

Run the code above in your browser using DataLab