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!
Hello everyone,
some days ago I got helped using varscan copynumber for a paired samples (tumor, normal)
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?
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.
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!
@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!
Done, didn't this function. I'll keep using it. Thanks!
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')"
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?
I think you are correct because the log2ratio is in the 7th column
Log in to answer this question.
Excuse me,i have another question. How to solve it , if there is X and Y chromosones in "chrom " variable ?
You can convert 'X' and 'Y' into '23' and '24' and convert them into numeric.
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?
Yes. In most cases, the probes or regions are small enough, that treating them as point estimates is fine.
Oh. Thank you very much for your answer. Now I will not have doubts.