segmentationHclust: Minimal segmentation function

Description Usage Arguments Value Author(s) See Also Examples

View source: R/segmentationHclust.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
segmentationHclust(
  seg,
  vcf = NULL,
  tumor.id.in.vcf = 1,
  normal.id.in.vcf = NULL,
  prune.hclust.h = NULL,
  prune.hclust.method = "ward.D",
  chr.hash = NULL,
  ...
)

Arguments

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 CollapsedVCF object with germline allelic ratios.

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.

prune.hclust.h

Height in the hclust pruning step. Increasing this value will merge segments more aggressively. If NULL, try to find a sensible default.

prune.hclust.method

Cluster method used in the hclust pruning step. See documentation for the hclust function.

chr.hash

Mapping of non-numerical chromsome names to numerical names (e.g. chr1 to 1, chr2 to 2, etc.). If NULL, assume chromsomes are properly ordered.

...

Currently unused arguments provided to other segmentation functions.

Value

data.frame containing the segmentation.

Author(s)

Markus Riester

See Also

runAbsoluteCN

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

PureCN documentation built on Nov. 8, 2020, 5:37 p.m.