PureCN (version 1.0.3)

segmentationCBS: CBS segmentation

Description

The default segmentation function. This function is called via the fun.segmentation argument of runAbsoluteCN. The arguments are passed via args.segmentation.

Usage

segmentationCBS(normal, tumor, log.ratio, plot.cnv, 
    coverage.cutoff, sampleid = sampleid, exon.weight.file = NULL, 
    alpha = 0.005, vcf = NULL, tumor.id.in.vcf = 1, 
    verbose = TRUE)

Arguments

normal
GATK coverage data for normal sample.
tumor
GATK coverage data for tumor sample.
log.ratio
Copy number log-ratios, one for each exon in coverage file.
plot.cnv
Segmentation plots.
coverage.cutoff
Minimum coverage in both normal and tumor.
sampleid
Sample id, used in output files.
exon.weight.file
Can be used to assign weights to exons.
alpha
Alpha value for CBS, see documentation for the segment function.
vcf
Optional VCF object with germline allelic ratios.
tumor.id.in.vcf
Id of tumor in case multiple samples are stored in VCF.
verbose
Verbose output.

Value

  • A list with elements
  • segThe segmentation.
  • sizeThe size of all segments (in base pairs).

Examples

Run this code
gatk.normal.file <- system.file("extdata", "example_normal.txt", 
    package="PureCN")
gatk.tumor.file <- system.file("extdata", "example_tumor.txt", 
    package="PureCN")
vcf.file <- system.file("extdata", "example_vcf.vcf", 
    package="PureCN")
gc.gene.file <- system.file("extdata", "example_gc.gene.file.txt", 
    package="PureCN")

# speed-up the runAbsoluteCN by using the stored grid-search.
# (purecn.example.output$candidates).
data(purecn.example.output)

# The max.candidate.solutions argument is set to a very low value only to 
# speed-up this example. This is not a good idea for real samples.
ret <-runAbsoluteCN(gatk.normal.file=gatk.normal.file, 
    gatk.tumor.file=gatk.tumor.file, 
    vcf.file=vcf.file, sampleid='Sample1', gc.gene.file=gc.gene.file, 
    candidates=purecn.example.output$candidates, max.candidate.solutions=2,
    fun.segmentation=segmentationCBS, args.segmentation=list(alpha=0.001))

Run the code above in your browser using DataLab