parklab/ShatterSeek

Error in statistical_criteria(): error in evaluating the argument 'x' in selecting a method for function 'nrow': wrong sign in 'by' argument

Closed this issue · 2 comments

#-----------------------------------------------------#
DATA ATTACHMENT TO REPRODUCE THE ERROR
SV and CN data.zip
#-----------------------------------------------------#

Hi there,

I encountered an error like below when running ShatterSeek using genome version of hg38.
Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'nrow': wrong sign in 'by' argument

Please decompressed the attachment and use the following code and you can reproduce the error:

library(ShatterSeek)
SV_data <- readRDS("SV_data.rds")
CN_data <- readRDS("CN_data.rds")
chromothripsis <- 
  shatterseek(SV.sample = SV_data,
              seg.sample = CN_data,
              genome = "hg38")

I reviewed carefully from the source code and found it occured in function of statistical_criteria() when running till the following code:
nb_oscill = ShatterSeek:::fmax2(CNV_window_now[seq(max(idxa),min(idxb),1),],cutoff=1)

In my data from the compressed file, the max(idxa) is 170 while the min(idxb) is 169 which caused a wrong sign direction.

Could you please help resolving this issue at your convenience?

Many thanks in advance!
Xiaofan

I think the problem is that you have contiguous segments with the same copy number, which is not allowed as input. Please read the README file and documentation. Best, Isidro
Screenshot 2022-02-19 at 15 50 58

I think the problem is that you have contiguous segments with the same copy number, which is not allowed as input. Please read the README file and documentation. Best, Isidro Screenshot 2022-02-19 at 15 50 58

Thanks, it is really helpful!