Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/accessory_functions.R
forcesegmentsontemplate
forces a user-defined segmentation pattern on a template. The input containing the segment information requires the chromosome name, start position, and end position of the segments. This can be provided manually as a data frame or as a data frame such as obtained by getadjustedsegments
. This means you can also use this function to force the segment pattern of one sample onto another sample. It is possible to retain the break points of the original input template.
1 2 | forcesegmentsontemplate(segmentinput, template, QDNAseqobjectsample = FALSE,
combinesegments = FALSE, funtype = 'mean')
|
segmentinput |
Data frame containing segment information. Requires columns with chromosome name, start position, and end position. The function looks for column names containing "chr", "start", and "end" to find the required information |
template |
Object. Either a data frame as created by |
QDNAseqobjectsample |
Integer. Specifies which sample to use as input from the QDNAseq-object. Required when using a QDNAseq-object as template. Default = FALSE |
combinesegments |
Logical. When TRUE, segment break points from the input template are retained. Default = FALSE |
funtype |
Character string. Specifies which function to use to calculate segment values. An alternative would be 'median'. Default = 'mean' |
This function only changes (or adds) the segments column of the input template. Copynumbers values are always retained, even if they fall out of the range of the segmentinput.
Returns a template data frame with the columns bin, chromosome, copynumbers, and segments
Jos B. Poell
getadjustedsegments
, twosamplecompare
1 2 3 4 5 6 7 | data("copyNumbersSegmented")
template <- objectsampletotemplate(copyNumbersSegmented, index = 1)
segments <- getadjustedsegments(copyNumbersSegmented, 2)[,1:3]
newtemplate <- forcesegmentsontemplate(segments, template)
first50M <- forcesegmentsontemplate(data.frame(chr = 1:22,
start = rep(1, 22), end = rep(50000000, 22)), template)
singleplot(first50M)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.