Question: Apply Circular Binary Segmentation Using The Dnacopy Library
0
gravatar for desmoguga
6.3 years ago by
desmoguga0
Italy
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:

library(DNAcopy)

cn <- read.table("your.cn.file",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.7k views
ADD COMMENTlink modified 6.2 years ago by dankoboldt140 • written 6.3 years ago by desmoguga0
2
gravatar for dankoboldt
6.2 years ago by
dankoboldt140
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.2 years ago by dankoboldt140
1
gravatar for Irsan
6.3 years ago by
Irsan6.8k
Amsterdam
Irsan6.8k 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

sessionInfo()

and

traceback()

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

str(cn[,6]) 
head(cn[,6])

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.3 years ago • written 6.3 years ago by Irsan6.8k
Please log in to add an answer.

Help
Access

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