diff --git a/man/ratiometric.bbd.power.Rd b/man/ratiometric.bbd.power.Rd new file mode 100644 index 0000000..7f0af2b --- /dev/null +++ b/man/ratiometric.bbd.power.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ratioMetric.R +\name{ratiometric.bbd.power} +\alias{ratiometric.bbd.power} +\title{Calculates the power in a ratio-metric approach using +a beta-binomial power model.} +\usage{ +ratiometric.bbd.power(my.alpha, my.beta, N, mu, Df = 1, Leff = 1500 * 3/4, + r = 0.02, signif.level = 5e-06) +} +\arguments{ +\item{my.alpha}{alpha parameter for beta binomial} + +\item{my.beta}{beta parameter for beta binomial} + +\item{N}{vector of sample sizes} + +\item{mu}{per base rate of mutation} + +\item{Leff}{length of gene in bases} + +\item{r}{effect size for power analysis} + +\item{signif.level}{alpha level for power analysis} +} +\value{ +vector containing power for each sample size +} +\description{ +The alpha and beta parameterize a proportion out of the +total mutations in a gene, rather than a mutation rate per base. +} + diff --git a/man/ratiometric.binom.false.pos.Rd b/man/ratiometric.binom.false.pos.Rd new file mode 100644 index 0000000..3b8bd33 --- /dev/null +++ b/man/ratiometric.binom.false.pos.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ratioMetric.R +\name{ratiometric.binom.false.pos} +\alias{ratiometric.binom.false.pos} +\title{calculates the false positives for a binomial model of +a ratio-metric feature.} +\usage{ +ratiometric.binom.false.pos(my.alpha, my.beta, N, mu, Leff = 1500 * 3/4, + num.genes = 18500, signif.level = 5e-06) +} +\arguments{ +\item{my.alpha}{alpha parameter for beta binomial} + +\item{my.beta}{beta parameter for beta binomial} + +\item{N}{vector of # samples to calculate power for} + +\item{mu}{mutation rate per base} + +\item{num.genes}{number of genes that are tested} + +\item{signif.level}{alpha level for power analysis} + +\item{L}{gene CDS length in bases} +} +\description{ +calculates the false positives for a binomial model of +a ratio-metric feature. +} + diff --git a/man/ratiometric.binom.power.Rd b/man/ratiometric.binom.power.Rd new file mode 100644 index 0000000..14fac34 --- /dev/null +++ b/man/ratiometric.binom.power.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ratioMetric.R +\name{ratiometric.binom.power} +\alias{ratiometric.binom.power} +\title{calculates the power in a binomial power model +for ratio-metric approach} +\usage{ +ratiometric.binom.power(p, N, mu, Df = 1, Leff = 1500 * 3/4, r = 0.02, + signif.level = 5e-06) +} +\arguments{ +\item{p}{background proportion of total mutations falling into specific category} + +\item{N}{vector of sample sizes} + +\item{mu}{per base rate of mutation} + +\item{Df}{fraction of driver mutations that are the specific one of interest} + +\item{Leff}{gene length in bases} + +\item{r}{effect size for power analysis} + +\item{signif.level}{alpha level for power analysis} +} +\value{ +vector containing power for each sample size +} +\description{ +calculates the power in a binomial power model +for ratio-metric approach +} + diff --git a/man/ratiometricBbdPoweredEffectSize.Rd b/man/ratiometricBbdPoweredEffectSize.Rd new file mode 100644 index 0000000..6d93f5d --- /dev/null +++ b/man/ratiometricBbdPoweredEffectSize.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ratioMetric.R +\name{ratiometricBbdPoweredEffectSize} +\alias{ratiometricBbdPoweredEffectSize} +\title{Calculates the effect size of a driver gene according to a beta-binomial model +of ratio-metric features for which there is sufficient power.} +\usage{ +ratiometricBbdPoweredEffectSize(possible.effect.sizes, desired.power, p, cv, mu, + samp.size, Df = 1, signif.level = 5e-06, Leff = 1500 * 3/4) +} +\arguments{ +\item{possible.effect.sizes}{vector of effect sizes} + +\item{desired.power}{A floating point number indicating desired power} + +\item{p}{the background fraction of total mutations represented by the ratio-metric feature (e.g. inactivating mutations / total)} + +\item{cv}{the coefficient of variation for the parameter p} + +\item{mu}{Mutation rate per base} + +\item{samp.size}{number of cancer samples in study} + +\item{signif.level}{significance level for binomial test} + +\item{Leff}{effective gene length of CDS in bases for an average gene} +} +\value{ +List containing the smallest effect size with sufficient power +} +\description{ +Effect size is measures as the fraction of sample/patient cancers with a +mutation in a driver gene above the background mutation rate. +} + diff --git a/man/ratiometricBbdRequiredSampleSize.Rd b/man/ratiometricBbdRequiredSampleSize.Rd new file mode 100644 index 0000000..92d337f --- /dev/null +++ b/man/ratiometricBbdRequiredSampleSize.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ratioMetric.R +\name{ratiometricBbdRequiredSampleSize} +\alias{ratiometricBbdRequiredSampleSize} +\title{Calculates the smallest sample size to detect driver genes for which +there is sufficient power using a beta-binomial model for ratio-metric features.} +\usage{ +ratiometricBbdRequiredSampleSize(p, cv, desired.power, possible.samp.sizes, mu, + effect.size, Df = 1, signif.lvl = 5e-06, Leff = 1500 * 3/4) +} +\arguments{ +\item{p}{the background fraction of total mutations represented by the ratio-metric feature (e.g. inactivating mutations / total)} + +\item{cv}{the coefficient of variation for the parameter p} + +\item{desired.power}{A floating point number indicating desired power} + +\item{possible.samp.sizes}{vector of possible number of cancer samples in study} + +\item{mu}{mutation rate per base} + +\item{effect.size}{fraction of samples above background mutation rate} + +\item{signif.level}{significance level for binomial test} + +\item{L}{gene length of CDS in bases for an average gene} +} +\value{ +List containing the smallest effect size with sufficient power +} +\description{ +Effect size is measures as the fraction of sample/patient cancers with a non-silent +mutation in a driver gene above the background mutation rate. +} + diff --git a/man/ratiometricBinomPoweredEffectSize.Rd b/man/ratiometricBinomPoweredEffectSize.Rd new file mode 100644 index 0000000..ee7608d --- /dev/null +++ b/man/ratiometricBinomPoweredEffectSize.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ratioMetric.R +\name{ratiometricBinomPoweredEffectSize} +\alias{ratiometricBinomPoweredEffectSize} +\title{Calculates the effect size of a driver gene according to a binomial model +of ratio-metric features for which there is sufficient power.} +\usage{ +ratiometricBinomPoweredEffectSize(possible.effect.sizes, desired.power, p, mu, + samp.size, Df = 1, signif.level = 5e-06, Leff = 1500 * 3/4) +} +\arguments{ +\item{possible.effect.sizes}{vector of effect sizes} + +\item{desired.power}{A floating point number indicating desired power} + +\item{p}{the background fraction of total mutations represented by the ratio-metric feature (e.g. inactivating mutations / total)} + +\item{mu}{Mutation rate per base} + +\item{samp.size}{number of cancer samples in study} + +\item{signif.level}{significance level for binomial test} + +\item{Leff}{effective gene length of CDS in bases for an average gene} +} +\value{ +List containing the smallest effect size with sufficient power +} +\description{ +Effect size is measures as the fraction of sample/patient cancers with a +mutation in a driver gene above the background mutation rate. +} + diff --git a/man/ratiometricBinomRequiredSampleSize.Rd b/man/ratiometricBinomRequiredSampleSize.Rd new file mode 100644 index 0000000..cdf9ee2 --- /dev/null +++ b/man/ratiometricBinomRequiredSampleSize.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ratioMetric.R +\name{ratiometricBinomRequiredSampleSize} +\alias{ratiometricBinomRequiredSampleSize} +\title{Calculates the smallest sample size to detect driver genes for which +there is sufficient power using a binomial model for ratio-metric features.} +\usage{ +ratiometricBinomRequiredSampleSize(p, desired.power, possible.samp.sizes, mu, + effect.size, Df = 1, signif.lvl = 5e-06, Leff = 1500 * 3/4) +} +\arguments{ +\item{p}{the background fraction of total mutations represented by the ratio-metric feature (e.g. inactivating mutations / total)} + +\item{desired.power}{A floating point number indicating desired power} + +\item{possible.samp.sizes}{vector of possible number of cancer samples in study} + +\item{mu}{mutation rate per base} + +\item{effect.size}{fraction of samples above background mutation rate} + +\item{signif.level}{significance level for binomial test} + +\item{L}{gene length of CDS in bases for an average gene} +} +\value{ +List containing the smallest effect size with sufficient power +} +\description{ +Effect size is measures as the fraction of sample/patient cancers with a non-silent +mutation in a driver gene above the background mutation rate. +} + diff --git a/man/runAnalysisList.Rd b/man/runAnalysisList.Rd index 01a9984..36811bc 100644 --- a/man/runAnalysisList.Rd +++ b/man/runAnalysisList.Rd @@ -7,8 +7,7 @@ rate, effect.size, and significance level. The purpose of this function is paral code running over a list of parameters. If you are not parallelizing, then use the runAnalysis function.} \usage{ -runAnalysisList(x, samp.sizes, desired.power = 0.9, Leff = 1500 * 3/4, - possible.cvs = c()) +runAnalysisList(x, analysisType = "smg", Leff = 1500 * 3/4, Df = 1, ...) } \description{ This function unpacks a vector x which contains many combinations of the mutation diff --git a/man/runRatiometricAnalysis.Rd b/man/runRatiometricAnalysis.Rd new file mode 100644 index 0000000..990cb67 --- /dev/null +++ b/man/runRatiometricAnalysis.Rd @@ -0,0 +1,13 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/cancerSeqStudy.R +\name{runRatiometricAnalysis} +\alias{runRatiometricAnalysis} +\title{Runs the entire power and false positive analysis pipeline.} +\usage{ +runRatiometricAnalysis(p, mu, effect.size, signif.level, samp.sizes, + desired.power = 0.9, Leff = 1500 * 3/4, Df = 1, possible.cvs = c()) +} +\description{ +Runs the entire power and false positive analysis pipeline. +} + diff --git a/man/runAnalysis.Rd b/man/runSmgAnalysis.Rd similarity index 70% rename from man/runAnalysis.Rd rename to man/runSmgAnalysis.Rd index bdb16c9..8d32b6d 100644 --- a/man/runAnalysis.Rd +++ b/man/runSmgAnalysis.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/cancerSeqStudy.R -\name{runAnalysis} -\alias{runAnalysis} +\name{runSmgAnalysis} +\alias{runSmgAnalysis} \title{Runs the entire power and false positive analysis pipeline.} \usage{ -runAnalysis(pi, effect.size, signif.level, samp.sizes, desired.power = 0.9, +runSmgAnalysis(mu, effect.size, signif.level, samp.sizes, desired.power = 0.9, Leff = 1500 * 3/4, possible.cvs = c()) } \description{ diff --git a/man/bbd.power.Rd b/man/smg.bbd.power.Rd similarity index 56% rename from man/bbd.power.Rd rename to man/smg.bbd.power.Rd index ea43e84..05707b8 100644 --- a/man/bbd.power.Rd +++ b/man/smg.bbd.power.Rd @@ -1,10 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cancerSeqStudy.R -\name{bbd.power} -\alias{bbd.power} -\title{calculates the power in a beta-binomial model} +% Please edit documentation in R/smg.R +\name{smg.bbd.power} +\alias{smg.bbd.power} +\title{calculates the power in a beta-binomial model for +significantly mutated genes.} \usage{ -bbd.power(my.alpha, my.beta, N, Leff = 1500 * 3/4, r = 0.02, +smg.bbd.power(my.alpha, my.beta, N, Leff = 1500 * 3/4, r = 0.02, signif.level = 5e-06) } \arguments{ @@ -21,6 +22,7 @@ bbd.power(my.alpha, my.beta, N, Leff = 1500 * 3/4, r = 0.02, \item{signif.level}{alpha level for power analysis} } \description{ -calculates the power in a beta-binomial model +calculates the power in a beta-binomial model for +significantly mutated genes. } diff --git a/man/binom.false.pos.Rd b/man/smg.binom.false.pos.Rd similarity index 58% rename from man/binom.false.pos.Rd rename to man/smg.binom.false.pos.Rd index 8c46f8c..fbff2f8 100644 --- a/man/binom.false.pos.Rd +++ b/man/smg.binom.false.pos.Rd @@ -1,12 +1,13 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cancerSeqStudy.R -\name{binom.false.pos} -\alias{binom.false.pos} +% Please edit documentation in R/smg.R +\name{smg.binom.false.pos} +\alias{smg.binom.false.pos} \title{calculates the false positives in a binomial model -if there is over-diserspion} +for identifying significantly mutated genes if +there is over-diserspion.} \usage{ -binom.false.pos(my.alpha, my.beta, N, Leff = 1500 * 3/4, num.genes = 18500, - signif.level = 5e-06) +smg.binom.false.pos(my.alpha, my.beta, N, Leff = 1500 * 3/4, + num.genes = 18500, signif.level = 5e-06) } \arguments{ \item{my.alpha}{alpha parameter for beta binomial} @@ -23,6 +24,7 @@ binom.false.pos(my.alpha, my.beta, N, Leff = 1500 * 3/4, num.genes = 18500, } \description{ calculates the false positives in a binomial model -if there is over-diserspion +for identifying significantly mutated genes if +there is over-diserspion. } diff --git a/man/binom.power.Rd b/man/smg.binom.power.Rd similarity index 56% rename from man/binom.power.Rd rename to man/smg.binom.power.Rd index bb85eae..65bceec 100644 --- a/man/binom.power.Rd +++ b/man/smg.binom.power.Rd @@ -1,10 +1,12 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cancerSeqStudy.R -\name{binom.power} -\alias{binom.power} -\title{calculates the power in a binomial power model} +% Please edit documentation in R/smg.R +\name{smg.binom.power} +\alias{smg.binom.power} +\title{calculates the power in a binomial power model +for significantly mutated genes} \usage{ -binom.power(my.mu, N, Leff = 1500 * 3/4, r = 0.02, signif.level = 5e-06) +smg.binom.power(my.mu, N, Leff = 1500 * 3/4, r = 0.02, + signif.level = 5e-06) } \arguments{ \item{my.mu}{per base rate of mutation for binomial} @@ -20,5 +22,6 @@ vector containing power for each sample size } \description{ calculates the power in a binomial power model +for significantly mutated genes } diff --git a/man/bbdPoweredEffectSize.Rd b/man/smgBbdPoweredEffectSize.Rd similarity index 74% rename from man/bbdPoweredEffectSize.Rd rename to man/smgBbdPoweredEffectSize.Rd index 23654fb..e174b43 100644 --- a/man/bbdPoweredEffectSize.Rd +++ b/man/smgBbdPoweredEffectSize.Rd @@ -1,11 +1,12 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cancerSeqStudy.R -\name{bbdPoweredEffectSize} -\alias{bbdPoweredEffectSize} +% Please edit documentation in R/smg.R +\name{smgBbdPoweredEffectSize} +\alias{smgBbdPoweredEffectSize} \title{Calculates the smallest effect size in a driver gene for which -there is sufficient power using a beta-binomial model.} +there is sufficient power using a significantly mutated gene +approach with a beta-binomial model.} \usage{ -bbdPoweredEffectSize(possible.effect.sizes, desired.power, mu, cv, samp.size, +smgBbdPoweredEffectSize(possible.effect.sizes, desired.power, mu, cv, samp.size, signif.level = 5e-06, Leff = 1500 * 3/4) } \arguments{ diff --git a/man/bbdRequiredSampleSize.Rd b/man/smgBbdRequiredSampleSize.Rd similarity index 79% rename from man/bbdRequiredSampleSize.Rd rename to man/smgBbdRequiredSampleSize.Rd index a5eff89..d1ae322 100644 --- a/man/bbdRequiredSampleSize.Rd +++ b/man/smgBbdRequiredSampleSize.Rd @@ -1,12 +1,12 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cancerSeqStudy.R -\name{bbdRequiredSampleSize} -\alias{bbdRequiredSampleSize} +% Please edit documentation in R/smg.R +\name{smgBbdRequiredSampleSize} +\alias{smgBbdRequiredSampleSize} \title{Calculates the smallest sample size to detect driver genes for which there is sufficient power using a beta-binomial model.} \usage{ -bbdRequiredSampleSize(desired.power, mu, cv, possible.samp.sizes, effect.size, - signif.level = 5e-06, Leff = 1500 * 3/4) +smgBbdRequiredSampleSize(desired.power, mu, cv, possible.samp.sizes, + effect.size, signif.level = 5e-06, Leff = 1500 * 3/4) } \arguments{ \item{desired.power}{A floating point number indicating desired power} diff --git a/man/binomPoweredEffectSize.Rd b/man/smgBinomPoweredEffectSize.Rd similarity index 67% rename from man/binomPoweredEffectSize.Rd rename to man/smgBinomPoweredEffectSize.Rd index 6c9972d..8177966 100644 --- a/man/binomPoweredEffectSize.Rd +++ b/man/smgBinomPoweredEffectSize.Rd @@ -1,11 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cancerSeqStudy.R -\name{binomPoweredEffectSize} -\alias{binomPoweredEffectSize} -\title{Calculates the effect size of a driver gene according to a binomial for which -there is sufficient power.} +% Please edit documentation in R/smg.R +\name{smgBinomPoweredEffectSize} +\alias{smgBinomPoweredEffectSize} +\title{Calculates the minimum effect size (with sufficient power) of a driver gene according to a binomial model +for significantly mutated genes.} \usage{ -binomPoweredEffectSize(possible.effect.sizes, desired.power, mu, samp.size, +smgBinomPoweredEffectSize(possible.effect.sizes, desired.power, mu, samp.size, signif.level = 5e-06, Leff = 1500 * 3/4) } \arguments{ diff --git a/man/binomRequiredSampleSize.Rd b/man/smgBinomRequiredSampleSize.Rd similarity index 76% rename from man/binomRequiredSampleSize.Rd rename to man/smgBinomRequiredSampleSize.Rd index fe6336e..008e6f9 100644 --- a/man/binomRequiredSampleSize.Rd +++ b/man/smgBinomRequiredSampleSize.Rd @@ -1,11 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cancerSeqStudy.R -\name{binomRequiredSampleSize} -\alias{binomRequiredSampleSize} +% Please edit documentation in R/smg.R +\name{smgBinomRequiredSampleSize} +\alias{smgBinomRequiredSampleSize} \title{Calculates the smallest sample size to detect driver genes for which -there is sufficient power using a binomial model.} +there is sufficient power using a binomial model for mutation rate.} \usage{ -binomRequiredSampleSize(desired.power, mu, possible.samp.sizes, effect.size, +smgBinomRequiredSampleSize(desired.power, mu, possible.samp.sizes, effect.size, signif.level = 5e-06, Leff = 1500 * 3/4) } \arguments{ diff --git a/man/thisfile.Rd b/man/thisfile.Rd new file mode 100644 index 0000000..5c31559 --- /dev/null +++ b/man/thisfile.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/cancerSeqStudy.R +\name{thisfile} +\alias{thisfile} +\title{Utility function to get location of script when +executing Rscript.} +\usage{ +thisfile() +} +\description{ +Utility function to get location of script when +executing Rscript. +} +