Question: Work With Dnacopy (Bioconductor) And Varscan Copynumber Results
1
gravatar for Mdeng
6.9 years ago by
Mdeng510
Germany
Mdeng510 wrote:

Hello everyone,

some days ago I got helped using varscan copynumber for a paired samples (tumor, normal)

See here

And of course the results look like this:

chrom   chr_start       chr_stop        num_positions   normal_depth    tumor_depth     log2_ratio
chr1    14904   14973   70      17.9    3.2     -2.497
chr1    16770   16834   65      21.9    13.5    -0.694
chr1    63298   63335   38      11.7    3.9     -1.582
chr1    63632   63700   69      20.3    8.7     -1.225
chr1    135158  135188  31      3.8     11.5    1.605
chr1    567576  567609  34      16.8    1.4     -3.600

Dan Koboldt recommended the R package "DNAcopy". But I don't know how to work with it. I don't know what the meaning of the examples data (coriell) is. And also not, what to put into the functions from the varscan resulting data.

Maybe one of you has some hints for me or maybe another solution?

With all the best,

Mario

//EDIT:

Maybe there is also a way to view this in IGV like this?! But again, what data to input? Format? Found a small description for the SNP format here (got the link from the IGV FAQ), but I don't get in touch with it. So maybe it's possible to convert the data?

ADD COMMENTlink modified 14 days ago by Kinga270 • written 6.9 years ago by Mdeng510

I have also one question. If there are chrom_start and chrom_end, why we make only like that: maploc = cn[,2]. This is correct operation?

ADD REPLYlink written 14 days ago by Kinga270

Yes. In most cases, the probes or regions are small enough, that treating them as point estimates is fine.

ADD REPLYlink written 14 days ago by Chris Miller19k

Oh. Thank you very much for your answer. Now I will not have doubts.

ADD REPLYlink written 13 days ago by Kinga270
4
gravatar for Chris Miller
6.9 years ago by
Chris Miller19k
Washington University in St. Louis, MO
Chris Miller19k wrote:

There is much information about using DNAcopy in both the package documentation and elsewhere on the web, but you might start with something like this:

After launching R:

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

That would give you some basic segmentation results for a single sample. You might also try searching for "Circular Binary Segmentation", which is the name of the algorithm implemented in the DNAcopy package.

ADD COMMENTlink written 6.9 years ago by Chris Miller19k
4

This code works great. Thanks.

Just a minor comment that, because the log2 ratio is in the 7th column. I think the "CNA.object <-CNA( genomdat = cn[,6], chrom = cn[,1], maploc = cn[,2], data.type = 'logratio')" should be "CNA.object <-CNA( genomdat = cn[,7], chrom = cn[,1], maploc = cn[,2], data.type = 'logratio')"

ADD REPLYlink written 5.9 years ago by Liye Zhang80
1

I have been trying to use above code segment on varscan output. Had the same problem and I also think it should be

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

Any thoughts ?

ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by mamunbabu200140

I think you are correct because the log2ratio is in the 7th column

ADD REPLYlink written 4.2 years ago by CHANG40

Hey Chris,

like every answer from you, this helps allot, really! One of my major problems was, to assert the input table columns to the function parameters. In the case of the sense, not in case of R usage.

Thank you!

ADD REPLYlink written 6.9 years ago by Mdeng510

@mdeng If an answer on this or any other question has been useful to you, we would appreciate it if you would go back and mark them as the "best answer" by clicking on the checkmark next to the box. It helps people who stumble across this thread later on. Thanks!

ADD REPLYlink written 6.9 years ago by Chris Miller19k

Done, didn't this function. I'll keep using it. Thanks!

ADD REPLYlink written 6.9 years ago by Mdeng510
0
gravatar for 321bixin
6 months ago by
321bixin0
321bixin0 wrote:

Excuse me,i have another question. How to solve it , if there is X and Y chromosones in "chrom " variable ?

ADD COMMENTlink written 6 months ago by 321bixin0
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: 976 users visited in the last hour