HenrikBengtsson / TopDom

R package: TopDom - An efficient and Deterministic Method for identifying Topological Domains in Genomes
https://cran.r-project.org/package=TopDom
20 stars 5 forks source link

Error in wilcox.test.default(x = dia * scale, y = c(ups, downs), alternative = "less", : not enough (finite) 'x' observations #17

Open HenrikBengtsson opened 4 years ago

HenrikBengtsson commented 4 years ago

Adding this one here for the record: With extremely sparse data (=few read-pairs), one may get:

counts:
List of 1
 $ 22:List of 2
  ..$ bins  :'data.frame':      95 obs. of  3 variables:
  .. ..$ chr       : chr [1:95] "22" "22" "22" "22" ...
  .. ..$ from.coord: num [1:95] 250000 750000 1250000 1750000 2250000 2750000 3250000 3750000 4250000 4750000 ...
  .. ..$ to.coord  : num [1:95] 250000 750000 1250000 1750000 2250000 2750000 3250000 3750000 4250000 4750000 ...
  ..$ counts: int [1:95, 1:95] 0 0 0 0 0 0 0 0 0 0 ...
  ..- attr(*, "class")= chr "TopDomData"
Error in wilcox.test.default(x = dia * scale, y = c(ups, downs), alternative = "less",  : 
  not enough (finite) 'x' observations
Calls: FUN ... eval -> eval -> value -> value.Future -> signalConditions
In addition: There were 50 or more warnings (use warnings() to see the first 50)

It happens in the Get.Pvalue() function:

https://github.com/HenrikBengtsson/TopDom/blob/e486dcce776c42994024426267f9052712b02d43/R/TopDom.R#L576-L593