Hello,
I've been trying to play with the settings for the segment function in DNAcopy and have run into issues with the "min.width" argument. The DNAcopy manual states that the min.width argument defines the minimum number of markers for a changed segment, and this minimum has a default of 2 but can be increased as high as 5. However, when I try running the fake data below with min.width=5, I still get a segment of 3 markers when I require a minimum of 5. Why does this happen? Am I misinterpreting the definition of min.width? Am I misunderstanding how the changed segments are made by DNAcopy?
Many thanks to anyone who can help. Here is the code that should reproduce the problem for you:
library(DNAcopy) #Create 50 fake data points for segmentation, with 3 high values in the middle chromosomes <- rep(1, 50) locations <- seq(10, 500, 10) sample_values <- rep(c(0, 0.585, 0), c(20, 3, 27)) #Create CNA object for segmentation fake_cna <- CNA(sample_values,chromosomes,locations,data.type="logratio",sampleid="fakedata") fake_cna_seg_mw5 = segment(fake_cna, min.width = 5) segments.summary(fake_cna_seg_mw5)
Here's my sessionInfo output:
> sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] DNAcopy_1.48.0 BiocInstaller_1.24.0 loaded via a namespace (and not attached): [1] tools_3.3.2
Dear Venkat,
Is this bug fixed now?