segmentationHclust {PureCN} | R Documentation |
A minimal segmentation function useful when segmentation was performed by
third-pary tools. When a CollapsedVCF
with germline SNPs is provided,
it will cluster segments using hclust
. Otherwise it will use the
segmentation as provided.
This function is called via the
fun.segmentation
argument of runAbsoluteCN
. The
arguments are passed via args.segmentation
.
segmentationHclust( seg, vcf = NULL, tumor.id.in.vcf = 1, normal.id.in.vcf = NULL, min.logr.sdev = 0.15, prune.hclust.h = NULL, prune.hclust.method = "ward.D", chr.hash = NULL, ... )
seg |
If segmentation was provided by the user, this data structure will contain this segmentation. Useful for minimal segmentation functions. Otherwise PureCN will re-segment the data. This segmentation function ignores this user provided segmentation. |
vcf |
Optional |
tumor.id.in.vcf |
Id of tumor in case multiple samples are stored in VCF. |
normal.id.in.vcf |
Id of normal in in VCF. Currently not used. |
min.logr.sdev |
Minimum log-ratio standard deviation used in the model. Useful to make fitting more robust to outliers in very clean data (currently not used in this segmentation function). |
prune.hclust.h |
Height in the |
prune.hclust.method |
Cluster method used in the |
chr.hash |
Mapping of non-numerical chromsome names to numerical names
(e.g. chr1 to 1, chr2 to 2, etc.). If |
... |
Currently unused arguments provided to other segmentation functions. |
data.frame
containing the segmentation.
Markus Riester
vcf.file <- system.file("extdata", "example.vcf.gz", package="PureCN") interval.file <- system.file("extdata", "example_intervals_tiny.txt", package="PureCN") seg.file <- system.file('extdata', 'example_seg.txt', package = 'PureCN') res <- runAbsoluteCN(seg.file = seg.file, fun.segmentation = segmentationHclust, max.ploidy = 4, vcf.file = vcf.file, test.purity = seq(0.3, 0.7, by = 0.05), max.candidate.solutions = 1, genome = 'hg19', interval.file = interval.file)