outputTitanResults(data, convergeParams, optimalPath, filename = NULL, posteriorProbs = FALSE, subcloneProfiles = TRUE) outputModelParameters(convergeParams, results, filename, S_Dbw.scale = 1, S_Dbw.method = "Tong")
list
object that contains the components for the data to be analyzed. chr
, posn
, ref
, and tumDepth
that can be obtained using loadAlleleCounts
, and logR
that can be obtained using correctReadDepth
and getPositionOverlap
(see Example).
list
object that is returned from the function runEMclonalCN
in TitanCNA.
numeric array
containing the optimal TitanCNA genotype and clonal cluster states for each data point in the analysis. optimalPath
is obtained from running viterbiClonalCN
.
outputTitanResults
.
Logical TRUE
to include the posterior marginal probabilities in printing to filename
.
Logical TRUE
to include the subclone profiles to the output data.frame
. Currently, this only works for 1 or 2 clonal clusters.
SDbw.scale
can be used to penalize the S_Dbw dens.bw
component. The default is 1.
Halkidi
or Tong
method. See computeSDbwIndex
.
outputTitanResults
also returns a data.frame
, where each row corresponds to a position in the analysis, and with the following columns:
subcloneProfiles
is set to TRUE
, then the subclone profiles will be appended to the output data.frame
.
outputModelParameters
returns a list
containing the S_Dbw model selection:
outputModelParameters
outputs to a file with the estimated TITAN model parameters and model selection index. Each row contains information regarding different parameters:
1) Normal contamination estimate - proportion of normal content in the sample; tumour content is 1 minus this number2) Average tumour ploidy estimate - average number of estimated copies in the genome; 2 represents diploid
3) Clonal cluster cellular prevalence - Z denotes the number of clonal clusters; each value (space-delimited) following are the cellular prevalence estimates for each cluster. Cellular prevalence here is defined as the proportion of tumour sample that does contain the aberrant genotype.
4) Genotype binomial means for clonal cluster Z - set of 21 binomial estimated parameters for each specified cluster
5) Genotype Gaussian means for clonal cluster Z - set of 21 Gaussian estimated means for each specified cluster
6) Genotype Gaussian variance - set of 21 Gaussian estimated variances; variances are shared for across all clusters
7) Number of iterations - number of EM iterations needed for convergence
8) Log likelihood - complete data log-likelihood for current cluster run
9) S_Dbw dens.bw - density component of S_Dbw index; see computeSDbwIndex
10) S_Dbw scat - scatter component of S_Dbw index; see computeSDbwIndex
11) S_Dbw validity index - used for model selection where the run with optimal number of clusters based on lowest S_Dbw index. This value is slightly modified from that computed from computeSDbwIndex
. It is computed as S_Dbw= S_Dbw.scale * dens.bw + scat
12) S_Dbw dens.bw, scat, validity index is computed for LogRatio
and AllelicRatio
datatypes, as well as the combination of Both
. For Both
, the values are summed for both datatypes.
outputTitanResults
outputs a file that has the similar format described in Value section.
runEMclonalCN
, viterbiClonalCN
, computeSDbwIndex
data(EMresults)
#### COMPUTE OPTIMAL STATE PATH USING VITERBI ####
optimalPath <- viterbiClonalCN(data, convergeParams)
#### FORMAT RESULTS ####
results <- outputTitanResults(data, convergeParams, optimalPath,
filename = NULL, posteriorProbs = FALSE,
subcloneProfiles = TRUE)
#### OUTPUT RESULTS TO FILE ####
outparam <- paste("cluster2_params.txt", sep = "")
outputModelParameters(convergeParams, results, outparam)
Run the code above in your browser using DataLab