.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Genome::Model::Tools::Music::PathScan::PathScan 3pm" .TH Genome::Model::Tools::Music::PathScan::PathScan 3pm "2020-11-06" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PathScan \- the Path\-Scan significance test for mutations in groups of putative cancer genes .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use PathScan; \& \& my $pmobj = PathScan\->new ($list_of_gene_lengths); \& my $pval = $pmobj\->path_scan ($actual_hits, $background_mutation_rate); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This package calculates the so-called path-scan statistic P\-value for sets of putative cancer genes under the null hypothesis that somatic mutations found in data are the result of a random process characterized by the background mutation rate. This test is applied to, for example, a biologically-relevant group of genes, say all the genes in a particular pathway, for which somatic mutation data are available. A low p\-value would imply that the null hypothesis should be rejected. In other words, the result suggests that the mutation configuration in this pathway is probably not the result of a strictly random process. .SS "Nature of the Path-Scan Test" .IX Subsection "Nature of the Path-Scan Test" This statistic considers individual genes in a \*(L"binary\*(R" fashion, i.e. a gene is either mutated (has one or more mutations) or it is not mutated. \&\fIThe number of mutations in a mutated gene is not considered.\fR This is the \*(L"path-scan\*(R" aspect of the test. .PP Why is such information discarded? The somatic background mutation rate is typically very small compared to the size of the average gene. Consequently, the expected number of mutations in any given gene is very low, much less than one, in fact. Under the null hypothesis, most genes will have no mutations. Genes with one (or just a few) may be interesting, but when many genes in a biologically-relevant group (say a pathway) have one (or just a few) mutations, that could be a sign of some underlying \fInon-random\fR process. In other words, this test is useful in cases where many genes in a group might each contribute a small component (i.e. a small fitness advantage) in the context of the disease process. What this test is not concerned with (and will \fInot\fR detect) is the case where a single, specific gene has a non-random association and it reflects this fact via a large number of mutations. Other single-gene tests should presumably flag such cases. The path-scan test should, therefore, be thought of as just one tool within a larger statistical \&\*(L"toolbox\*(R". .SS "Assumptions in the Test" .IX Subsection "Assumptions in the Test" The main assumption is that a single background mutation rate applies to the set of genes of interest. That is, the rate does not vary among genes, among chromosomes (if more than one hosts genes of interest), etc. .SH "BUGS AND OPPORTUNITIES FOR EXTENSION" .IX Header "BUGS AND OPPORTUNITIES FOR EXTENSION" Coefficients are recalculated for every individual test, but it would be good for these to persist between tests, adding more as necessary (i.e. if a subsequent test involves more genes than the current one). .SH "AUTHOR" .IX Header "AUTHOR" Michael C. Wendl .PP mwendl@wustl.edu .PP Copyright (C) 2007, 2008 Washington University .PP This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \&\s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place \- Suite 330, Boston, \s-1MA 02111\-1307, USA.\s0 .SH "METHODS" .IX Header "METHODS" The available methods are as follows. .SS "new" .IX Subsection "new" This is the usual object constructor, which optionally takes all the gene-length data as input. If you want to use the exact probability solution or the asymptotic approximate solution, pass all lengths in a single list reference .PP .Vb 1 \& my $pmobj = PathScan\->new ([3434, 54565, 6445, ...]); .Ve .PP but if you want to use the convolution approximation method, divide the list of gene sizes into the desired number of bins and pass each of these as a reference .PP .Vb 1 \& my $pmobj = PathScan\->new ([3434, 54565], [6445, ...]); .Ve .PP In other words, the way you pass these arguments at partially determines the context in which you will obtain your P\-value for this set of genes. The latter choice is typically betetr, as it gives good accuracy and good computational efficiency. Conversely, the exact solution is identically correct, but can be difficult to compute. The asymptotic approximation is always computationally efficient, but not necessarily accurate for small test sets. .SS "path_scan" .IX Subsection "path_scan" This function calculates the path-scan statistic in one of the appropriate contexts (exact or convolution approximation, as described above). It takes the actual number of \*(L"hits\*(R" you've observed in the data, i.e. the number of genes that have a mutated status. .PP .Vb 1 \& my $pval = $pmobj\->path_scan (7); .Ve .PP If you have not yet done the pre-processing with respect to the background mutation rate (see below), then pre-processing can be executed implicitly by passing the rate as the second argument. .PP .Vb 1 \& my $pval = $pmobj\->path_scan (7, 0.000001); .Ve .SS "cdf_truncated" .IX Subsection "cdf_truncated" This function returns the cumulative distribution in the context of the convolution approximation \fItruncated\fR such that it contains only enough information to process the given number of hits. .PP .Vb 1 \& my $pvals_list = $pmobj\->cdf_truncated ($hits); .Ve .PP The list is ordered from most extreme to least extreme probability tail values, i.e. the last value in the list is always unity. However, tailed p\-values more extreme than that associated with the argument are not, in fact, calculated, but rather are replaced with the flag \&\-1. This saves processing time and also reduces the chances of numerical overflow for large pathways, as the full \s-1CDF\s0 must ultimately raise an \*(L"mval\*(R" (>1) to a power equal to the number of genes in the pathway. The method assumes you have already done the pre-processing with respect to the background mutation rate. .SS "cdf" .IX Subsection "cdf" This function returns the cumulative distribution in one of the appropriate contexts (exact or convolution approximation, as described above). There are no arguments, .PP .Vb 1 \& my $pvals_list = $pmobj\->cdf; .Ve .PP unless you have not yet done the pre-processing with respect to the background mutation rate (see below), in which case the pre-processing can be executed implicitly by passing the rate as the sole argument. .PP .Vb 1 \& my $pvals_list = $pmobj\->cdf (0.000001); .Ve .PP The list is ordered from most extreme to least extreme probability tail values, i.e. the last value in the list is always unity. .SS "cdf_asymptot" .IX Subsection "cdf_asymptot" This function returns the cumulative distribution based on asymptotic analysis. There are no arguments, i.e. .PP .Vb 1 \& my $pvals_list = $pmobj\->cdf_asymptot; .Ve .PP unless you have not yet done the pre-processing with respect to the background mutation rate (see below), in which case the pre-processing can be executed implicitly by passing the rate as the sole argument. .PP .Vb 1 \& my $pvals_list = $pmobj\->cdf_asymptot (0.000001); .Ve .PP The list is ordered from most extreme to least extreme probability tail values, i.e. the last value in the list is always unity. .PP Note that asymptotic analysis gives a function (the Poisson) having infinite support. The infinite tail probability for all values past the most extreme physical case are all bundled into that most extreme p\-value. .SS "path_scan_asymptot" .IX Subsection "path_scan_asymptot" This function calculates the path-scan statistic in the asymptotic (Poisson) context. It takes the actual number of \*(L"hits\*(R" you've observed in the data, i.e. the number of genes that have a mutated status. .PP .Vb 1 \& my $pval = $pmobj\->path_scan_asymptot (7); .Ve .PP If you have not yet done the pre-processing with respect to the background mutation rate (see below), then pre-processing can be executed implicitly by passing the rate as the second argument. .PP .Vb 1 \& my $pval = $pmobj\->path_scan_asymptot (7, 0.000001); .Ve .PP You must set up the object, somewhat paradoxically, \&\fIas if you will be doing the calculation in the exact context\fR. (This is a consequence of how data are stored internally within the object.) .SS "additional methods" .IX Subsection "additional methods" The basic functionality of this package is encompassed in the methods described above. However, some lower-level functions can also sometimes be useful. .PP \fIp_value_exact\fR .IX Subsection "p_value_exact" .PP This function returns the exact value of the probability \fImass\fR for a specific number of hits. .PP .Vb 1 \& $pval_exact = $pmobj\->p_value_exact (7); .Ve .PP You must make sure to call this only if you've configured the object in the exact context (see above). .PP \fIp_value_binomial_approx\fR .IX Subsection "p_value_binomial_approx" .PP This function returns the convolution approximated value (i.e. using the binomial binning approximation) of the probability \fImass\fR for a specific number of hits. .PP .Vb 1 \& $pval_exact = $pmobj\->p_value_binomial_approx (7); .Ve .PP You must make sure to call this only if you've configured the object in the approximate binomial context (see above). Also, you must explicitly calculate the necessary binomial coefficients beforehand (see \f(CW\*(C`binom_coeffs\*(C'\fR). .PP \fIp_value_asymptot_approx\fR .IX Subsection "p_value_asymptot_approx" .PP This function returns the asymptotic approximated value (i.e. using the Poisson limit approximation) of the probability \fImass\fR for a specific number of hits. .PP .Vb 1 \& $pval_exact = $pmobj\->p_value_asymptot_approx (7); .Ve .PP Somewhat paradoxically, you must make sure to call this only if you've configured the object in the exact context (see above). .PP \fIstore_genes\fR .IX Subsection "store_genes" .PP Stores the raw gene length data. Use this if you did not pass these data to \&\f(CW\*(C`new\*(C'\fR before you call any calculation methods. Works in the same way as \f(CW\*(C`new\*(C'\fR, described above. Specifically, the context is partially determined by whether you pass a single list (exact context or asymptotic approximation) .PP .Vb 1 \& $pmobj\->store_genes ([3434, 54565, 6445, ...]); .Ve .PP or more than one list (convolution approximate context) .PP .Vb 1 \& $pmobj\->store_genes ([3434, 54565], [6445, ...]); .Ve .PP \fIbinom_coeffs\fR .IX Subsection "binom_coeffs" .PP Calculates the binomial coefficients needed in the binomial (convolution) approximate solution. .PP .Vb 1 \& $pmobj\->binom_coeffs; .Ve .PP The internal data structure is essentially the symmetric half of the appropriately-sized Pascal triangle. Considerable memory is saved by not storing the full triangle. .PP \fIpreprocess\fR .IX Subsection "preprocess" .PP Calculates the Bernoulli kernel probabilities for the individual genes or gene bins .PP .Vb 1 \& $pmobj_binom\->preprocess ($background_mutation_rate); .Ve .PP The data structure can be re-configured to run the test with different background mutation rates by just re-calling this routine with a different value .PP .Vb 1 \& $pmobj_binom\->preprocess ($new_background_mutation_rate); .Ve .SH "EXAMPLES" .IX Header "EXAMPLES" The following examples may be helpful in using this package. In each case, assume we have first executed some required preliminary code. .PP .Vb 2 \& #_\|_USE THE PACKAGE \& use PathScan; \& \& #_\|_SOME DATA FOR AN "EXACT CONTEXT" CALCULATION \& my $genes_exact = [ \& 4000, 4000, 4000, 4000, 4000, \& 15000, 15000, 15000, 15000, 15000, \& 35000, 35000, 35000, 35000, 35000 \& ]; \& \& #_\|_SOME DATA FOR AN "APPROXIMATE CONTEXT" CALCULATION \& my @genes_binned = ( \& [4000, 4000, 4000, 4000, 4000], \& [15000, 15000, 15000, 15000, 15000], \& [35000, 35000, 35000, 35000, 35000] \& ); .Ve .SS "simple path-scan test" .IX Subsection "simple path-scan test" Here, we compare the values returned by both the exact and approximate algorithms over the whole domain of possible hits for a case where the answers should be identical. .PP .Vb 2 \& #_\|_SET BACKGROUND MUTATION RATE \& my $rho = 0.00002; \& \& #_\|_CONFIGURE OBJECTS IN "EXACT" AND "APPROXIMATE" CONTEXTS \& my $pmobj_exact = PathScan\->new ($genes_exact); \& $pmobj_exact\->preprocess ($rho); \& \& my $pmobj_binom = PathScan\->new (@genes_binned); \& $pmobj_binom\->preprocess ($rho); \& \& #_\|_CALCULATE AND TALLY THE MAXIMUM DIFFERENCE \& my $maxdiff = 0; \& for (my $i = 0; $i <= scalar @{$genes_exact}; $i++) { \& my $pm_pval_exact = $pmobj_exact\->path_scan($i); \& my $pm_pval_binom = $pmobj_binom\->path_scan($i); \& my $diff = abs ($pm_pval_exact \- $pm_pval_binom); \& $maxdiff = $diff if $diff > $maxdiff; \& print "$i hits: $pm_pval_exact $pm_pval_binom $diff\en"; \& } \& print "MAXIMUM DIFFERENCE IS $maxdiff\en"; .Ve .SS "testing at different background rates" .IX Subsection "testing at different background rates" This example shows how to run the test for a fixed number of hits, say 7 in this case, for various different background mutation rates. .PP .Vb 2 \& #_\|_CONFIGURE OBJECT \& my $pmobj_binom = PathScan\->new (@genes_binned); \& \& #_\|_CALCULATE \& for (my $rho = 0.00001; $rho <= 0.0001; $rho += 0.00001) { \& my $pm_pval_binom = $pmobj_binom\->path_scan(7, $rho); \& print "7 hits at background $rho : P = $pm_pval_binom\en"; \& } .Ve .PP Note that we did not run \f(CW\*(C`preprocess\*(C'\fR explicitly, but rather let the \f(CW\*(C`path_scan\*(C'\fR method call it implicitly for each new value of the background mutation rate. .SS "computing asymptotic approximate solution" .IX Subsection "computing asymptotic approximate solution" The asymptotic (Poisson) approximate probabiltiy value is straightforward to compute. .PP .Vb 2 \& #_\|_SET BACKGROUND MUTATION RATE \& my $rho = 0.00002; \& \& #_\|_CONFIGURE OBJECT \& my $pmobj_poisson = PathScan\->new ($genes_exact); \& $pmobj_poisson\->preprocess ($rho); \& \& #_\|_P\-VALUE FOR 7 OBSERVED MUTATED GENES \& my $pm_pval_poisson = $pmobj_exact\->path_scan_asymptot (7); .Ve .SS "accessing individual probability masses" .IX Subsection "accessing individual probability masses" The probability masses for specific numbers of hits can also be calculated. .PP .Vb 2 \& #_\|_SET BACKGROUND MUTATION RATE \& my $rho = 0.00002; \& \& #_\|_CONFIGURE OBJECT \& my $pmobj_exact = PathScan\->new ($genes_exact); \& $pmobj_exact\->preprocess ($rho); \& \& #_\|_CALCULATE MASSES \& my $total_prob = 0; \& for (my $i = 0; $i <= scalar @{$genes_exact}; $i++) { \& my $pval_exact = $pmobj_exact\->p_value_exact ($i); \& $total_prob += $pval_exact; \& print "$i hits : probability mass = $pval_exact\en"; \& } \& print "total probability = $total_prob\en"; .Ve