#### docs update

Jasmina Bogojeska authored on 27/08/2009 09:08:41
Showing 1 changed files
 ... ... @@ -22,13 +22,7 @@ 22 22  } 23 23   24 24  \usage{ 25 -gps(model, ...) 26 - 27 -\method{gps}{model, data}(model, data, sampling.mode = "exponential", 28 - sampling.param = 1, no.sim = 10, seed = (-1)) 29 - 30 -\method{gps}{model}(model, sampling.mode = "exponential", 31 - sampling.param = 1, no.sim = 10, seed = (-1))  25 +gps(model, data, \dots)  32 26  } 33 27   34 28  \section{Methods}{\describe{ ... ... @@ -48,17 +42,19 @@ gps(model, ...) 48 42  containing the samples (patterns of genetic events) for which the GPS values 49 43  are to be calculated. The length of each of them has to be equal 50 44  to the number of genetic events in the \code{model}.} 51 - \item{sampling.mode}{A \code{character} that specifies the 45 + \item{\dots}{  46 + \code{sampling.mode} is a \code{character} that specifies the 52 47  sampling mode ("constant" or "exponential") used in the waiting time 53 - simulations. Its default value is "exponential".} 54 - \item{sampling.param}{A \code{numeric} that specifies the 48 + simulations. Its default value is "exponential". 49 + \code{sampling.param} is a \code{numeric} that specifies the 55 50  sampling parameter corresponding to the sampling mode given by 56 - \code{sampling.mode}. Its default value is 1.} 57 - \item{no.sim}{An \code{integer} larger than 0 giving the number of 58 - iterations for the waiting time simulations. Its default value is 10.} 59 - \item{seed}{A positive \code{integer} specifying the random generator 51 + \code{sampling.mode}. Its default value is 1. 52 + \code{no.sim} is an \code{integer} larger than 0 giving the number of 53 + iterations for the waiting time simulations. Its default value is 10. 54 + \code{seed} is a positive \code{integer} specifying the random generator 60 55  seed. Its default value is (-1) and then the time is used as a 61 - random generator.} 56 + random generator. 57 + } 62 58  } 63 59   64 60  \value{ ... ... @@ -76,7 +72,7 @@ gps(model, ...) 76 72  The mixture model used for deriving the GPS values should not have more than  77 73  20 genetic events. The reason for this is that the number of all possible patterns  78 74  for which the GPS values are calculated during a computationally intensive simulations  79 - is in this case $2^{20}$. This demands too much memory. 75 + is in this case $2^20$. This demands too much memory. 80 76  The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package. 81 77  For trying out the code please copy it and uncomment it. 82 78  }

#### modifed man files

Jasmina Bogojeska authored on 21/08/2009 20:38:31
Showing 1 changed files
 ... ... @@ -22,9 +22,13 @@ 22 22  } 23 23   24 24  \usage{ 25 -\S4method{gps}{RtreemixModel,RtreemixData}(model, data, ...) 26 -\S4method{gps}{RtreemixModel,matrix}(model, data, ...) 27 -\S4method{gps}{RtreemixModel,missing}(model, data, ...) 25 +gps(model, ...) 26 + 27 +\method{gps}{model, data}(model, data, sampling.mode = "exponential", 28 + sampling.param = 1, no.sim = 10, seed = (-1)) 29 + 30 +\method{gps}{model}(model, sampling.mode = "exponential", 31 + sampling.param = 1, no.sim = 10, seed = (-1))  28 32  } 29 33   30 34  \section{Methods}{\describe{ ... ... @@ -44,19 +48,17 @@ 44 48  containing the samples (patterns of genetic events) for which the GPS values 45 49  are to be calculated. The length of each of them has to be equal 46 50  to the number of genetic events in the \code{model}.} 47 - \item{...}{  48 - \code{sampling.mode} is a \code{character} that specifies the 51 + \item{sampling.mode}{A \code{character} that specifies the 49 52  sampling mode ("constant" or "exponential") used in the waiting time 50 - simulations. Its default value is "exponential". 51 - \code{sampling.param} is a \code{numeric} that specifies the 53 + simulations. Its default value is "exponential".} 54 + \item{sampling.param}{A \code{numeric} that specifies the 52 55  sampling parameter corresponding to the sampling mode given by 53 - \code{sampling.mode}. Its default value is 1. 54 - \code{no.sim} is an \code{integer} larger than 0 giving the number of 55 - iterations for the waiting time simulations. Its default value is 10. 56 - \code{seed} is a positive \code{integer} specifying the random generator 56 + \code{sampling.mode}. Its default value is 1.} 57 + \item{no.sim}{An \code{integer} larger than 0 giving the number of 58 + iterations for the waiting time simulations. Its default value is 10.} 59 + \item{seed}{A positive \code{integer} specifying the random generator 57 60  seed. Its default value is (-1) and then the time is used as a 58 - random generator. 59 - } 61 + random generator.} 60 62  } 61 63   62 64  \value{ ... ... @@ -74,7 +76,7 @@ 74 76  The mixture model used for deriving the GPS values should not have more than  75 77  20 genetic events. The reason for this is that the number of all possible patterns  76 78  for which the GPS values are calculated during a computationally intensive simulations  77 - is in this case $2^20$. This demands too much memory. 79 + is in this case $2^{20}$. This demands too much memory. 78 80  The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package. 79 81  For trying out the code please copy it and uncomment it. 80 82  }

#### updated man files

Jasmina Bogojeska authored on 24/04/2008 13:09:35
Showing 1 changed files
 ... ... @@ -7,6 +7,9 @@ 7 7  \alias{gps,RtreemixModel,matrix-method} 8 8  \alias{gps,RtreemixModel,missing-method} 9 9   10 + 11 + 12 + 10 13  \title{Methods for predicting the GPS of given dataset by 11 14  using a given mutagenetic trees mixture model} 12 15  \description{ ... ... @@ -19,17 +22,17 @@ 19 22  } 20 23   21 24  \usage{ 22 -\S4method{gps}{RtreemixModel,RtreemixData}(model, data, \dots) 23 -\S4method{gps}{RtreemixModel,matrix}(model, data, \dots) 24 -\S4method{gps}{RtreemixModel,missing}(model, data, \dots) 25 +\S4method{gps}{RtreemixModel,RtreemixData}(model, data, ...) 26 +\S4method{gps}{RtreemixModel,matrix}(model, data, ...) 27 +\S4method{gps}{RtreemixModel,missing}(model, data, ...) 25 28  } 26 29   27 30  \section{Methods}{\describe{ 28 - \item{model = "RtreemixModel", data = "RtreemixData", \dots}{A method for calculating 31 + \item{model = "RtreemixModel", data = "RtreemixData", ...}{A method for calculating 29 32  the GPS values of the data given as \code{RtreemixData} object.} 30 - \item{model = "RtreemixModel", data = "matrix", \dots}{A method for calculating 33 + \item{model = "RtreemixModel", data = "matrix", ...}{A method for calculating 31 34  the GPS values of the data given as 0-1 \code{matrix}.} 32 - \item{model = "RtreemixModel", data = "missing", \dots}{A method for calculating 35 + \item{model = "RtreemixModel", data = "missing", ...}{A method for calculating 33 36  the GPS values of the set of all possible patterns.}  34 37  }} 35 38   ... ... @@ -41,7 +44,7 @@ 41 44  containing the samples (patterns of genetic events) for which the GPS values 42 45  are to be calculated. The length of each of them has to be equal 43 46  to the number of genetic events in the \code{model}.} 44 - \item{\dots}{  47 + \item{...}{  45 48  \code{sampling.mode} is a \code{character} that specifies the 46 49  sampling mode ("constant" or "exponential") used in the waiting time 47 50  simulations. Its default value is "exponential". ... ... @@ -58,7 +61,7 @@ 58 61   59 62  \value{ 60 63  The function returns an object from the \code{RtreemixGPS} class that 61 - contains the calculated GPS values, the model used for the 64 + containes the calculated GPS values, the model used for the 62 65  computation, the data, and so on (see 63 66  \code{\link{RtreemixGPS-class}}). The GPS values are represented as a 64 67  \code{numeric} vector with length equal to the number of samples in \code{data}. ... ... @@ -71,7 +74,7 @@ 71 74  The mixture model used for deriving the GPS values should not have more than  72 75  20 genetic events. The reason for this is that the number of all possible patterns  73 76  for which the GPS values are calculated during a computationally intensive simulations  74 - is in this case $2^{20}$. This demands too much memory. 77 + is in this case $2^20$. This demands too much memory. 75 78  The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package. 76 79  For trying out the code please copy it and uncomment it. 77 80  }  ... ... @@ -94,19 +97,20 @@ 94 97  #show(mod) 95 98   96 99  ## Create an RtreemixGPS object by calculating the GPS for all possible patterns. 97 -#modGPS.all <- gps(model = mod, no.sim = 1000) ## time consuming computations 100 +#modGPS.all <- gps(model = mod, no.sim = 1000) ## time consuming copmutations 98 101  #show(modGPS.all) 99 102   100 103  ## See the GPS values for all possible data. 101 -#GPS(modGPS.all) ## time consuming computations 104 +#GPS(modGPS.all) ## time consuming copmutations 102 105   103 106  ## Create an RtreemixGPS object by calculating the GPS for the data based on the model mod. 104 107  #modGPS <- gps(model = mod, data = data, no.sim = 1000) 105 -#show(modGPS) ## time consuming computations 108 +#show(modGPS) ## time consuming copmutations 106 109   107 110  ## See the GPS values for data. 108 -#GPS(modGPS) ## time consuming computations 111 +#GPS(modGPS) ## time consuming copmutations 109 112  } 110 113   114 + 111 115  \keyword{methods} 112 116  \keyword{survival}

#### Fixed man files to allow creation of Rtreemix-manual.pdf document.

Patrick Aboyoun authored on 09/04/2008 18:34:51
Showing 1 changed files
 ... ... @@ -7,9 +7,6 @@ 7 7  \alias{gps,RtreemixModel,matrix-method} 8 8  \alias{gps,RtreemixModel,missing-method} 9 9   10 - 11 - 12 - 13 10  \title{Methods for predicting the GPS of given dataset by 14 11  using a given mutagenetic trees mixture model} 15 12  \description{ ... ... @@ -22,17 +19,17 @@ 22 19  } 23 20   24 21  \usage{ 25 -\S4method{gps}{RtreemixModel,RtreemixData}(model, data, ...) 26 -\S4method{gps}{RtreemixModel,matrix}(model, data, ...) 27 -\S4method{gps}{RtreemixModel,missing}(model, data, ...) 22 +\S4method{gps}{RtreemixModel,RtreemixData}(model, data, \dots) 23 +\S4method{gps}{RtreemixModel,matrix}(model, data, \dots) 24 +\S4method{gps}{RtreemixModel,missing}(model, data, \dots) 28 25  } 29 26   30 27  \section{Methods}{\describe{ 31 - \item{model = "RtreemixModel", data = "RtreemixData", ...}{A method for calculating 28 + \item{model = "RtreemixModel", data = "RtreemixData", \dots}{A method for calculating 32 29  the GPS values of the data given as \code{RtreemixData} object.} 33 - \item{model = "RtreemixModel", data = "matrix", ...}{A method for calculating 30 + \item{model = "RtreemixModel", data = "matrix", \dots}{A method for calculating 34 31  the GPS values of the data given as 0-1 \code{matrix}.} 35 - \item{model = "RtreemixModel", data = "missing", ...}{A method for calculating 32 + \item{model = "RtreemixModel", data = "missing", \dots}{A method for calculating 36 33  the GPS values of the set of all possible patterns.}  37 34  }} 38 35   ... ... @@ -44,7 +41,7 @@ 44 41  containing the samples (patterns of genetic events) for which the GPS values 45 42  are to be calculated. The length of each of them has to be equal 46 43  to the number of genetic events in the \code{model}.} 47 - \item{...}{  44 + \item{\dots}{  48 45  \code{sampling.mode} is a \code{character} that specifies the 49 46  sampling mode ("constant" or "exponential") used in the waiting time 50 47  simulations. Its default value is "exponential". ... ... @@ -61,7 +58,7 @@ 61 58   62 59  \value{ 63 60  The function returns an object from the \code{RtreemixGPS} class that 64 - containes the calculated GPS values, the model used for the 61 + contains the calculated GPS values, the model used for the 65 62  computation, the data, and so on (see 66 63  \code{\link{RtreemixGPS-class}}). The GPS values are represented as a 67 64  \code{numeric} vector with length equal to the number of samples in \code{data}. ... ... @@ -74,7 +71,7 @@ 74 71  The mixture model used for deriving the GPS values should not have more than  75 72  20 genetic events. The reason for this is that the number of all possible patterns  76 73  for which the GPS values are calculated during a computationally intensive simulations  77 - is in this case 2^20. This demands too much memory. 74 + is in this case $2^{20}$. This demands too much memory. 78 75  The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package. 79 76  For trying out the code please copy it and uncomment it. 80 77  }  ... ... @@ -97,20 +94,19 @@ 97 94  #show(mod) 98 95   99 96  ## Create an RtreemixGPS object by calculating the GPS for all possible patterns. 100 -#modGPS.all <- gps(model = mod, no.sim = 1000) ## time consuming copmutations 97 +#modGPS.all <- gps(model = mod, no.sim = 1000) ## time consuming computations 101 98  #show(modGPS.all) 102 99   103 100  ## See the GPS values for all possible data. 104 -#GPS(modGPS.all) ## time consuming copmutations 101 +#GPS(modGPS.all) ## time consuming computations 105 102   106 103  ## Create an RtreemixGPS object by calculating the GPS for the data based on the model mod. 107 104  #modGPS <- gps(model = mod, data = data, no.sim = 1000) 108 -#show(modGPS) ## time consuming copmutations 105 +#show(modGPS) ## time consuming computations 109 106   110 107  ## See the GPS values for data. 111 -#GPS(modGPS) ## time consuming copmutations 108 +#GPS(modGPS) ## time consuming computations 112 109  } 113 110   114 - 115 111  \keyword{methods} 116 112  \keyword{survival}

#### \name{confIntGPS-methods} \docType{methods}

\alias{confIntGPS}
\alias{confIntGPS-methods}
\alias{confIntGPS,RtreemixData,numeric-method}

\title{Method for calculating GPS values and their 95\% bootstrap
confidence intervals}

\description{
The method first calculates the genetic progression score (GPS) for the
patterns in a given dataset \code{data} based on a fitted mutagenetic trees
mixture model with \code{K} components. The \code{data} and \code{K}
have to be specified. Then, it derives a 95\% confidence intervals for
the GPS values with bootstrap analysis.
}

\usage{
\S4method{confIntGPS}{RtreemixData,numeric}(data, K, ...)
}

\arguments{
\item{data}{An \code{RtreemixData} object containing the samples
(patterns of genetic events) for which the GPS values and their
bootstrap confidence intervals are to be calculated. The number
of genetic events should NOT be greater than 20.}
\item{K}{An \code{integer} larger than 0 specifying the number of
branchings in the mixture model.}
\item{...}{
\code{sampling.mode} is a \code{character} that specifies the
sampling mode ("constant" or "exponential") used in the waiting time
simulations. Its default value is "exponential".
\code{sampling.param} is a \code{numeric} that specifies the
sampling parameter corresponding to the sampling mode given by
\code{sampling.mode}. Its default value is 1.
\code{no.sim} is an \code{integer} larger than 0 giving the number of
iterations for the waiting time simulation. Its default values is
10000.
\code{B} is an \code{integer} larger than 0 specifying the number of
bootstrap samples used in the bootstrap analysis. Its default value
is 1000.
\code{equal.star} is a \code{logical} specifying whether to use
equal edge weights in the noise component. The default value is
\code{TRUE}.
}
}

\value{
The function returns an object from the \code{RtreemixGPS} class that
containes the calculated GPS values, their 95\% confidence intervals,
the model used for the computation, the data, and so on (see
\code{\link{RtreemixGPS-class}}). The GPS values are represented as a
\code{numeric} vector with length equal to the number of samples in
\code{data}. Their corresponding confidence intervals are given in a
matrix with two columns.
}

\note{
The data for which the GPS values and their corresponding
confidence intervals are to be calculated should not have more
than 20 genetic events. The reason for this is that the number of all possible patterns
for which the GPS values are calculated during a computationally intensive simulations
is in this case 2^20. This demands too much memory.
The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package.
For trying out the code please copy it and uncomment it.
}

\author{Jasmina Bogojeska }

\seealso{
}

\examples{
## Create an RtreemixData object from a randomly generated RtreemixModel object.
#rand.mod <- generate(K = 2, no.events = 7, noise.tree = TRUE, prob = c(0.2, 0.8))
#data <- sim(model = rand.mod, no.draws = 400)

## Create an RtreemixGPS object by calculating GPS values for a given dataset
## and their 95\% confidence intervals using the bootstrap method.
#modGPS2 <- confIntGPS(data = data, K = 2, B = 100) ## time consuming computation
#show(modGPS2)

## See the GPS values for the object modGPS2 and their confidence intervals.
#GPS(modGPS2)
#gpsCI(modGPS2)

## See data.
#getData(modGPS2)
}

\keyword{methods}

Jasmina Bogojeska authored on 28/03/2008 15:38:30
Showing 1 changed files
 ... ... @@ -74,7 +74,7 @@ 74 74  The mixture model used for deriving the GPS values should not have more than  75 75  20 genetic events. The reason for this is that the number of all possible patterns  76 76  for which the GPS values are calculated during a computationally intensive simulations  77 - is in this case 2^20. 77 + is in this case 2^20. This demands too much memory. 78 78  The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package. 79 79  For trying out the code please copy it and uncomment it. 80 80  }

#### \name{gps-methods} \docType{methods}

\alias{gps}
\alias{gps-methods}
\alias{gps,RtreemixModel,RtreemixData-method}
\alias{gps,RtreemixModel,matrix-method}
\alias{gps,RtreemixModel,missing-method}

\title{Methods for predicting the GPS of given dataset by
using a given mutagenetic trees mixture model}
\description{
These functions compute the genetic progression score (GPS) of each
sample in the given \code{data} by performing a waiting time
simulation along the branchings of the mixture model \code{model}. The
model has to be specified. If a dataset is missing a GPS for all
possible patterns is calculated. The number of events of the samples
in \code{data} equals the number of genetic events in the \code{model}.
}

\usage{
\S4method{gps}{RtreemixModel,RtreemixData}(model, data, ...)
\S4method{gps}{RtreemixModel,matrix}(model, data, ...)
\S4method{gps}{RtreemixModel,missing}(model, data, ...)
}

\section{Methods}{\describe{
\item{model = "RtreemixModel", data = "RtreemixData", ...}{A method for calculating
the GPS values of the data given as \code{RtreemixData} object.}
\item{model = "RtreemixModel", data = "matrix", ...}{A method for calculating
the GPS values of the data given as 0-1 \code{matrix}.}
\item{model = "RtreemixModel", data = "missing", ...}{A method for calculating
the GPS values of the set of all possible patterns.}
}}

\arguments{
\item{model}{An object of the class \code{RtreemixModel} specifying
the mutagenetic trees mixture model used for deriving the GPS values.
The model should NOT have more than 20 genetic events.}
\item{data}{An \code{RtreemixData} object or a 0-1 \code{matrix}
containing the samples (patterns of genetic events) for which the GPS values
are to be calculated. The length of each of them has to be equal
to the number of genetic events in the \code{model}.}
\item{...}{
\code{sampling.mode} is a \code{character} that specifies the
sampling mode ("constant" or "exponential") used in the waiting time
simulations. Its default value is "exponential".
\code{sampling.param} is a \code{numeric} that specifies the
sampling parameter corresponding to the sampling mode given by
\code{sampling.mode}. Its default value is 1.
\code{no.sim} is an \code{integer} larger than 0 giving the number of
iterations for the waiting time simulations. Its default value is 10.
\code{seed} is a positive \code{integer} specifying the random generator
seed. Its default value is (-1) and then the time is used as a
random generator.
}
}

\value{
The function returns an object from the \code{RtreemixGPS} class that
containes the calculated GPS values, the model used for the
computation, the data, and so on (see
\code{\link{RtreemixGPS-class}}). The GPS values are represented as a
\code{numeric} vector with length equal to the number of samples in \code{data}.
}

\references{Estimating cancer survival and clinical outcome based on
genetic tumor progression scores, J. Rahnenf\"urer et al. }

\note{
The mixture model used for deriving the GPS values should not have more than
20 genetic events. The reason for this is that the number of all possible patterns
for which the GPS values are calculated during a computationally intensive simulations
is in this case 2^20.
The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package.
For trying out the code please copy it and uncomment it.
}

\author{Jasmina Bogojeska}

\seealso{
}

\examples{
## Create an RtreemixData object from a randomly generated RtreemixModel object.
#rand.mod <- generate(K = 2, no.events = 7, noise.tree = TRUE, prob = c(0.2, 0.8))
#data <- sim(model = rand.mod, no.draws = 400)

## Create an RtreemixModel object by fitting model to the given data.
#mod <- fit(data = data, K = 2, equal.edgeweights = TRUE, noise = TRUE)
#show(mod)

## Create an RtreemixGPS object by calculating the GPS for all possible patterns.
#modGPS.all <- gps(model = mod, no.sim = 1000) ## time consuming copmutations
#show(modGPS.all)

## See the GPS values for all possible data.
#GPS(modGPS.all) ## time consuming copmutations

## Create an RtreemixGPS object by calculating the GPS for the data based on the model mod.
#modGPS <- gps(model = mod, data = data, no.sim = 1000)
#show(modGPS) ## time consuming copmutations

## See the GPS values for data.
#GPS(modGPS) ## time consuming copmutations
}

\keyword{methods}
\keyword{survival}

 ... ... @@ -38,7 +38,8 @@ 38 38   39 39  \arguments{ 40 40  \item{model}{An object of the class \code{RtreemixModel} specifying 41 - the mutagenetic trees mixture model used for deriving the GPS values.}  41 + the mutagenetic trees mixture model used for deriving the GPS values.  42 + The model should NOT have more than 20 genetic events.}  42 43  \item{data}{An \code{RtreemixData} object or a 0-1 \code{matrix} 43 44  containing the samples (patterns of genetic events) for which the GPS values 44 45  are to be calculated. The length of each of them has to be equal ... ... @@ -70,6 +71,10 @@ 70 71  genetic tumor progression scores, J. Rahnenf\"urer et al. } 71 72   72 73  \note{ 74 + The mixture model used for deriving the GPS values should not have more than  75 + 20 genetic events. The reason for this is that the number of all possible patterns  76 + for which the GPS values are calculated during a computationally intensive simulations  77 + is in this case 2^20. 73 78  The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package. 74 79  For trying out the code please copy it and uncomment it. 75 80  }
 1 1 new file mode 100644 ... ... @@ -0,0 +1,111 @@ 1 +\name{gps-methods} 2 +\docType{methods} 3 + 4 +\alias{gps} 5 +\alias{gps-methods} 6 +\alias{gps,RtreemixModel,RtreemixData-method} 7 +\alias{gps,RtreemixModel,matrix-method} 8 +\alias{gps,RtreemixModel,missing-method} 9 + 10 + 11 + 12 + 13 +\title{Methods for predicting the GPS of given dataset by 14 + using a given mutagenetic trees mixture model} 15 +\description{ 16 + These functions compute the genetic progression score (GPS) of each 17 + sample in the given \code{data} by performing a waiting time 18 + simulation along the branchings of the mixture model \code{model}. The 19 + model has to be specified. If a dataset is missing a GPS for all 20 + possible patterns is calculated. The number of events of the samples 21 + in \code{data} equals the number of genetic events in the \code{model}.  22 +} 23 + 24 +\usage{ 25 +\S4method{gps}{RtreemixModel,RtreemixData}(model, data, ...) 26 +\S4method{gps}{RtreemixModel,matrix}(model, data, ...) 27 +\S4method{gps}{RtreemixModel,missing}(model, data, ...) 28 +} 29 + 30 +\section{Methods}{\describe{ 31 + \item{model = "RtreemixModel", data = "RtreemixData", ...}{A method for calculating 32 + the GPS values of the data given as \code{RtreemixData} object.} 33 + \item{model = "RtreemixModel", data = "matrix", ...}{A method for calculating 34 + the GPS values of the data given as 0-1 \code{matrix}.} 35 + \item{model = "RtreemixModel", data = "missing", ...}{A method for calculating 36 + the GPS values of the set of all possible patterns.}  37 +}} 38 + 39 +\arguments{ 40 + \item{model}{An object of the class \code{RtreemixModel} specifying 41 + the mutagenetic trees mixture model used for deriving the GPS values.}  42 + \item{data}{An \code{RtreemixData} object or a 0-1 \code{matrix} 43 + containing the samples (patterns of genetic events) for which the GPS values 44 + are to be calculated. The length of each of them has to be equal 45 + to the number of genetic events in the \code{model}.} 46 + \item{...}{  47 + \code{sampling.mode} is a \code{character} that specifies the 48 + sampling mode ("constant" or "exponential") used in the waiting time 49 + simulations. Its default value is "exponential". 50 + \code{sampling.param} is a \code{numeric} that specifies the 51 + sampling parameter corresponding to the sampling mode given by 52 + \code{sampling.mode}. Its default value is 1. 53 + \code{no.sim} is an \code{integer} larger than 0 giving the number of 54 + iterations for the waiting time simulations. Its default value is 10. 55 + \code{seed} is a positive \code{integer} specifying the random generator 56 + seed. Its default value is (-1) and then the time is used as a 57 + random generator. 58 + } 59 +} 60 + 61 +\value{ 62 + The function returns an object from the \code{RtreemixGPS} class that 63 + containes the calculated GPS values, the model used for the 64 + computation, the data, and so on (see 65 + \code{\link{RtreemixGPS-class}}). The GPS values are represented as a 66 + \code{numeric} vector with length equal to the number of samples in \code{data}. 67 +} 68 + 69 +\references{Estimating cancer survival and clinical outcome based on 70 + genetic tumor progression scores, J. Rahnenf\"urer et al. } 71 + 72 +\note{ 73 + The GPS examples are time consuming. They are commented out because of the time restrictions of the check of the package. 74 + For trying out the code please copy it and uncomment it. 75 +}  76 + 77 +\author{Jasmina Bogojeska} 78 +  79 +\seealso{ 80 + \code{\link{RtreemixGPS-class}}, \code{\link{RtreemixData-class}}, 81 + \code{\link{RtreemixModel-class}}, 82 + \code{\link{fit-methods}}, \code{\link{confIntGPS-methods}} 83 +} 84 + 85 +\examples{ 86 +## Create an RtreemixData object from a randomly generated RtreemixModel object. 87 +#rand.mod <- generate(K = 2, no.events = 7, noise.tree = TRUE, prob = c(0.2, 0.8)) 88 +#data <- sim(model = rand.mod, no.draws = 400) 89 + 90 +## Create an RtreemixModel object by fitting model to the given data. 91 +#mod <- fit(data = data, K = 2, equal.edgeweights = TRUE, noise = TRUE) 92 +#show(mod) 93 + 94 +## Create an RtreemixGPS object by calculating the GPS for all possible patterns. 95 +#modGPS.all <- gps(model = mod, no.sim = 1000) ## time consuming copmutations 96 +#show(modGPS.all) 97 + 98 +## See the GPS values for all possible data. 99 +#GPS(modGPS.all) ## time consuming copmutations 100 + 101 +## Create an RtreemixGPS object by calculating the GPS for the data based on the model mod. 102 +#modGPS <- gps(model = mod, data = data, no.sim = 1000) 103 +#show(modGPS) ## time consuming copmutations 104 + 105 +## See the GPS values for data. 106 +#GPS(modGPS) ## time consuming copmutations 107 +} 108 + 109 + 110 +\keyword{methods} 111 +\keyword{survival}