DNAcopy segmentation issue: min.width argument not working?
1
1
Entering edit mode
W. C. ▴ 10
@w-c-12329
Last seen 7.9 years ago
USA

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
 
dnacopy segmentation CBS • 1.5k views
ADD COMMENT
0
Entering edit mode
@venkat-seshan-6502
Last seen 7.9 years ago

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.

Venkat

 

ADD COMMENT
0
Entering edit mode

Dear Venkat,

Is this bug fixed now?

ADD REPLY

Login before adding your answer.

Traffic: 702 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6