rafalab / bumphunter

bumphunter
15 stars 14 forks source link

Missing import locfit::lp #7

Closed lcolladotor closed 8 years ago

lcolladotor commented 8 years ago

Hi,

Currently this fails in derfinder:

> library('derfinder')
> 
> 
> prep <- preprocessCoverage(genomeData, cutoff=0, scalefac=32, chunksize=1e3, 
+     colsubset=NULL)
> regs1 <- findRegions(prep$position, genomeFstats, 'chr21', verbose=TRUE, smooth = TRUE)
2016-03-24 14:38:18 findRegions: smoothing
Error in eval(expr, envir, enclos) : could not find function "lp"

> packageVersion('derfinder')
[1] ‘1.5.29’
> packageVersion('bumphunter')
[1] ‘1.11.3’
> R.version.string
[1] "R version 3.3.0 alpha (2016-03-23 r70368)"

Note that the following works as expected:

> regs2 <- findRegions(prep$position, genomeFstats, 'chr21', verbose=TRUE, smooth = TRUE, smoothFunction = bumphunter::runmedByCluster)
2016-03-24 14:38:18 findRegions: smoothing
2016-03-24 14:38:19 findRegions: identifying potential segments
2016-03-24 14:38:19 findRegions: segmenting information
2016-03-24 14:38:19 .getSegmentsRle: segmenting with cutoff(s) 19.7936614060235
2016-03-24 14:38:19 findRegions: identifying candidate regions
2016-03-24 14:38:19 findRegions: identifying region clusters

I noticed that you do use the locfit::lp function at https://github.com/ririzarr/bumphunter/blob/master/R/smooth.R#L81 but it's currently not in the NAMESPACE file.

Best, Leo

lcolladotor commented 8 years ago

Sent a SVN patch as reported in the bioc-devel mailing list due to https://github.com/ririzarr/bumphunter/issues/9

martinaryee commented 8 years ago

Hi Leo,

After some issues setting up the git/svn mirror your patch is now merged!

lcolladotor commented 8 years ago

Awesome! Thanks Martin