This function fits a subclonal copy number profile where a clonal profile is unlikely. It goes over each segment of a clonal copy number profile and does a simple t-test. If the test is significant it is unlikely that the data can be explained by a single copy number state. We therefore fit a second state, i.e. there are two cellular populations with each a different state: Subclonal copy number.
callSubclones(
sample.name,
baf.segmented.file,
logr.file,
rho.psi.file,
output.file,
output.figures.prefix,
output.gw.figures.prefix,
chr_names,
masking_output_file,
max_allowed_state = 250,
cn_upper_limit = 1000,
prior_breakpoints_file = NULL,
gamma = 1,
segmentation.gamma = NA,
siglevel = 0.05,
maxdist = 0.01,
noperms = 1000,
seed = as.integer(Sys.time()),
calc_seg_baf_option = 3
)Name of the sample, used in figures
String that points to a file with segmented BAF output
String that points to the raw LogR file to be used in the subclonal copy number figures
String pointing to the rho_and_psi file generated by fit.copy.number
Filename of the file where the final copy number fit will be written to
Prefix of the filenames for the chromosome specific copy number figures
Prefix of the filenames for the genome wide copy number figures
Vector of allowed chromosome names
Filename of where the masking details need to be written. Masking is performed to remove very high copy number state segments
The maximum CN state allowed (Default 250)
The maximum CN that can be called (Default 1000)
A two column file with prior breakpoints, possibly from structural variants. This file must contain two columns: chromosome and position. These are used when making the figures
Technology specific scaling parameter for LogR (Default 1)
Legacy parameter that is no longer used (Default NA)
Threshold under which a p-value becomes significant. When it is significant a second copy number state will be fitted (Default 0.05)
Slack in BAF space to allow a segment to be off it's optimum before becoming significant. A segment becomes significant very quickly when a breakpoint is missed, this parameter alleviates the effect (Default 0.01)
The number of permutations to be run when bootstrapping the confidence intervals on the copy number state of each segment (Default 1000)
Seed to set when performing bootstrapping (Default: Current time)
Various options to recalculate the BAF of a segment. Options are: 1 - median, 2 - mean, 3 - ifelse median==0|1, mean, median. (Default: 3)