HaoKeLab / ensembleCNV

19 stars 11 forks source link

The same start and end of CNVs from PennCNV and QuantiSNP #7

Open Jia21 opened 4 years ago

Jia21 commented 4 years ago

Hi,

I am wondering whether the Ensembl CNV can conduct some QC for the three callers. Since in my results, I found some weird CNVs in the cnvr_batch.txt, 22 q 42525772 42525772 chr22-42525772 chr22-42525772 1 1 2 This CNV is also detected by PennCNV and QuantiSNP, while one is identified to be DEL and the other one is identified to be DUP. This case should be removed as my experience. I am wondering whether the pipeline can some QC for these cases. Or I might make some wrong or misunderstanding the algorithm.

Can someone help to solve this issue?

Thanks a lot!

Elaine

Jia21 commented 4 years ago

Hi,

In addition, I also find a bug in your function of fun_models.R. mode_zz <- function(dt_cnvr) { dt <- dt_cnvr cutoffs <- quantile(dt$LRR_median, c(0.1, 0.9)) dt1 <- dt[which(dt$LRR_median >= cutoffs[1] & dt$LRR_median <= cutoffs[2]), ] md1 <- mlv(x = dt1$LRR_median, method = "parzen", kernel = "gaussian") m1 <- md1$M

sd1 <- sd(dt1$LRR_median)

return(list(mu = m1, sigma = sd1)) }

mlv function will return a constant instead of a list or a vector. So it will give an error like if use md1$M.

ERROR: $ operator is invalid for atomic vectors

I use the modeest 2.4.0 implemented in R, and I am not sure whether it's the version causing this bug. Coud you help to solve it? Thanks.

Cheers, Elaine