Question: Apply Circular Binary Segmentation Using The Dnacopy Library
gravatar for desmoguga
6.7 years ago by
desmoguga0 wrote:

I'm using Varscan2 to find CNV on cancer exomes. In the recommended workflow suggested by Varscan2 there is this code to apply the segmentation:


cn <- read.table("",header=F)

CNA.object <-CNA( genomdat = cn[,6], chrom = cn[,1], maploc = cn[,2], data.type = 'logratio')

CNA.smoothed <- smooth.CNA(CNA.object)

segs <- segment(CNA.smoothed, verbose=0, min.width=2)

segs2 = segs$output

write.table(segs2[,2:6], file="out.file", row.names=F, col.names=F, quote=F, sep="\t")

I think there is a mistake in the field genomedat=cn[,6]. It should be the field 7 of the copynumber file made by Varscan. Am I right? Thanks in advance

varscan • 2.9k views
ADD COMMENTlink modified 6.6 years ago by dankoboldt140 • written 6.7 years ago by desmoguga0
gravatar for dankoboldt
6.6 years ago by
dankoboldt140 wrote:

To answer the original question, yes, you're right! The "genomdat" variable should be set to the field with the log2-based copy number value, so if that's in column 7, please use it.

ADD COMMENTlink written 6.6 years ago by dankoboldt140
gravatar for Irsan
6.7 years ago by
Irsan7.0k wrote:

At first, this is more a Bioconductor related question (although you might also get solutions here). You can post your question at the Bioconductor mailing list. Second, why do you think there is a mistake, is there an error message? Third, if you ask help about R/Bioconductor errors it is helpful to post the output of




Then, if you are right that the problem is in the genomedat=cn[,6] it is helpful to give more information about cn[,6] for example


cn[,6] should be a vector or matrix where each row is a genomic marker (for example "probe") and each column is a sample. Obviously the values in the matrix should be copy number estimates

At last, I would recommend to use fastseg in stead of DNAcopy because it is much faster. Especially when you have multiple samples and many genomic markers this becomes more important

ADD COMMENTlink modified 6.7 years ago • written 6.7 years ago by Irsan7.0k
Please log in to add an answer.


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