R/segmentation.R
segment.baf.phased.legacy.RdThis 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
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
)Name of the sample, which is used to name output figures
String that points to the output from the combine.baf.files function. This contains the phased SNPs with their BAF values
String where the segmentation output will be written
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)
Gamma parameter used when correcting phasing mistakes (Default: 3)
Kmin represents the minimum number of probes/SNPs that a segment should consist of (Default: 3)
Kmin parameter used when correcting phasing mistakes (Default: 3)
Various options to recalculate the BAF of a segment. Options are: 1 - median, 2 - mean. (Default: 1)