segment.baf.phased.legacy: Segment the haplotyped and phased data using fastPCF. This is...

View source: R/segmentation.R View source: R/segmentation.R

segment.baf.phased.legacyR Documentation

Segment the haplotyped and phased data using fastPCF. This is the legacy segmentation function as it was used in the original Battenberg versions

Description

This function performs segmentation. This is done in two steps. First a segmentation step that aims to find short segments. These are used to find haplotype blocks that have been switched. These blocks are switched into the correct order first after which the second segmentation step is performed. This second step aims to segment the data that will go into fit.copy.number. This function produces a BAF segmented file with 5 columns: chromosome, position, original BAF, switched BAF and BAF segment. The BAF segment column should be used subsequently

This function performs segmentation. This is done in two steps. First a segmentation step that aims to find short segments. These are used to find haplotype blocks that have been switched. These blocks are switched into the correct order first after which the second segmentation step is performed. This second step aims to segment the data that will go into fit.copy.number. This function produces a BAF segmented file with 5 columns: chromosome, position, original BAF, switched BAF and BAF segment. The BAF segment column should be used subsequently

Usage

segment.baf.phased.legacy(
  samplename,
  inputfile,
  outputfile,
  gamma = 10,
  phasegamma = 3,
  kmin = 3,
  phasekmin = 3
)

segment.baf.phased.legacy(
  samplename,
  inputfile,
  outputfile,
  gamma = 10,
  phasegamma = 3,
  kmin = 3,
  phasekmin = 3
)

Arguments

samplename

Name of the sample, which is used to name output figures

inputfile

String that points to the output from the combine.baf.files function. This contains the phased SNPs with their BAF values

outputfile

String where the segmentation output will be written

gamma

The gamma parameter controls the size of the penalty of starting a new segment during segmentation. It is therefore the key parameter for controlling the number of segments (Default: 10)

phasegamma

Gamma parameter used when correcting phasing mistakes (Default: 3)

kmin

Kmin represents the minimum number of probes/SNPs that a segment should consist of (Default: 3)

phasekmin

Kmin parameter used when correcting phasing mistakes (Default: 3)

calc_seg_baf_option

Various options to recalculate the BAF of a segment. Options are: 1 - median, 2 - mean. (Default: 1)

Author(s)

dw9

dw9


Wedge-Oxford/battenberg documentation built on Aug. 4, 2023, 6:27 p.m.