Question: DNAcopy segmentation issue: min.width argument not working?
gravatar for W. C.
2.8 years ago by
W. C.10
W. C.10 wrote:


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:

#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)



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)

[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
dnacopy segmentation cbs • 620 views
ADD COMMENTlink modified 2.8 years ago by Venkat Seshan30 • written 2.8 years ago by W. C.10
Answer: DNAcopy segmentation issue: min.width argument not working?
gravatar for Venkat Seshan
2.8 years ago by
Venkat Seshan30 wrote:

This is a bug in the code that the data (with no noise) you used helped identify. The parameter min.width controls the width of the minor arc and not the segment lengths. So there are situations in which you could get a segment smaller than min.width. This however is not such a case. Thanks.



ADD COMMENTlink written 2.8 years ago by Venkat Seshan30

Dear Venkat,

Is this bug fixed now?

ADD REPLYlink written 2.2 years ago by yzhan30
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 217 users visited in the last hour