Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/accessory_functions.R
Divide chromosomes in artificial segments with the specified number of bins. You can provide a template without segment values (for instance, an unsegmented QDNAseq-object) as input for this function. You can also use this function to only resegment a subset of chromosomes.
1 2 3 | templatefromequalsegments(template, QDNAseqobjectsample = FALSE,
equalsegments = 20, funtype = 'mean', chrsubset,
onlyautosomes = TRUE)
|
template |
Object. Either a data frame as created by |
QDNAseqobjectsample |
Integer. Specifies which sample to analyze from the QDNAseqobject. Required when using a QDNAseq-object as template. Default = FALSE |
equalsegments |
Integer. |
funtype |
Character string. Specifies the function used to calculate new segment values. Alternative is "median". Default = "mean" |
chrsubset |
Integer vector. Specify the chromosomes you want to resegment |
onlyautosomes |
Logical or integer. You can fill in an integer to specify how many autosomes your species has. When TRUE, |
templatefromequalsegments
resegments the input template chromosome by chromosome. It makes segments with the number of bins specified in the argument equalsegments. Any leftover bins are divided equally among all newly created segments. Only bins with values (!is.na) are considered. If there are fewer bins on a chromosome than two times the specified value, then all bins of this chromosome are put in a single segment.
Returns a template data frame
The chrsubset argument works slightly differently compared to the plotting functions. It does not necessarily segment only contiguous chromosomes. For instance, specifying chrsubset = c(8,12) will only resegment chromosomes 8 and 12. For the other chromosomes, segment values will not be changed.
Jos B. Poell
twosamplecompare
, correlationmatrixadjusted
1 2 3 | data("copyNumbersSegmented")
tfes <- templatefromequalsegments(copyNumbersSegmented,
QDNAseqobjectsample = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.