Sorry, I forgot to include the traceback in the last message.  Here it is.

10: stop(simpleError(msg, call = expr))
9: e$fun(obj, substitute(ex), parent.frame(), e$data)
8: list(args = IndexesChunks(.doRNG.stream = c(407L, -129130598L,
   1725800531L, 1089509752L, -772932327L, 780595718L, 241179855L
   )), argnames = c("idx", ".doRNG.stream"), evalenv = <environment>,
       specified = character(0), combineInfo = list(fun = function (a,
           ...)
       c(a, list(...)), in.order = TRUE, has.init = TRUE, init = list(),
           final = NULL, multi.combine = TRUE, max.combine = 100),
       errorHandling = "stop", packages = c("bumphunter", "doRNG"
       ), export = NULL, noexport = NULL, options = list(), verbose =
FALSE) %dopar%
       {
           {
               rngtools::RNGseed(.doRNG.stream)
           }
           {
               idx <- get(foreach_argname)
               smoothFunction(y = y[idx, ], x = x[idx], cluster =
cluster[idx],
                   weights = weights[idx, ], verbose = verbose,
                   ...)
           }
       }
7: do.call("%dopar%", list(obj, ex), envir = parent.frame())
6: foreach_object %dorng% {
       idx <- get(foreach_argname)
       smoothFunction(y = y[idx, ], x = x[idx], cluster = cluster[idx],
           weights = weights[idx, ], verbose = verbose, ...)
   }
5: smoother(y = permRawBeta, x = pos, cluster = cluster, weights = weights,
       smoothFunction = smoothFunction, verbose = subverbose)
4: bumphunterEngine(object, design = design, chr = chr, pos, cluster =
cluster,
       coef = coef, cutoff = cutoff, cutoffQ = cutoffQ, maxGap = maxGap,
       smooth = smooth, smoothFunction = smoothFunction, useWeights =
useWeights,
       B = B, verbose = verbose, ...)
3: .local(object, ...)
2: bumphunter(logtrans, matrix(c(rep(1, ncol(final_Avg_beta_disc_NMF)),

as.numeric(factor(fullclinical[match(colnames(final_Avg_beta_disc_NMF),
           fullclinical$OffTargetName), ]$NMF_2)) - 1), nrow =
ncol(final_Avg_beta_disc_NMF)),
       chr_chr, chr_locs$MAPINFO, chr_clusters, smoothFunction =
loessByCluster,
       smooth = TRUE)
1: bumphunter(logtrans, matrix(c(rep(1, ncol(final_Avg_beta_disc_NMF)),

as.numeric(factor(fullclinical[match(colnames(final_Avg_beta_disc_NMF),
           fullclinical$OffTargetName), ]$NMF_2)) - 1), nrow =
ncol(final_Avg_beta_disc_NMF)),
       chr_chr, chr_locs$MAPINFO, chr_clusters, smoothFunction =
loessByCluster,
       smooth = TRUE)


On Tue, Jun 3, 2014 at 1:37 PM, Jiayi Sun <monikasun88@gmail.com> wrote:

> Hello,
>
> I have been trying to use bumphunter on my 450k data and I have been
> running into some problems with the smooth function using the option of
> loessByCluster.  I have tired both other smoothing functions
> runmedByCluster and locfitByCluster and these perform correctly however I
> get this error when trying to use loessByCluster.
>
> Error in { :
>   task 1 failed - "NA/NaN/Inf in foreign function call (arg 1)"
>
> I have called bumphunter with the following function:
>
> ### Run all chromosomes together
>
> chr_locs <- ordered by chromosome genomic location
> chr_chr <- chromosome information
> chr_clusters <- clusterMaker(chr_chr, chr_locs, maxGap = 400)
>
> logtrans <- log transformed beta-values
>
> chr_bumphunter <- bumphunter(logtrans,
>   design matrix with first column of "1" and second column with membership
> comparing 6 (0) samples to 89 samples (1),
>   chr_chr, chr_locs, chr_clusters, smoothFunction = loessByCluster, smooth
> = TRUE)
>
> This error always occurs when I am trying to do the permutations, never on
> the normal data.  This is the output from bumphunter.
>
> bumphunterEngine: Using a single core (backend: doSEQ, version: 1.4.2)
> bumphunterEngine: Computing coefficients.
> bumphunterEngine: Smoothing coefficients.
> bumphunterEngine cutoff: 1.123
> bumphunterEngine: Finding regions.
> bumphunterEngine: Performing 100 permutations.
> bumphunterEngine: Computing marginal permutation p-values.
> bumphunterEngine: Smoothing permutation coefficients.
>
> After which I see the error above.  I have tired checking the
> logtransformed beta-values to see if I have any NAs or 1 but there aren't
> any.  Any idea what this error is coming from?  I do have some very, very
> small numbers approaching zero but I have tired even to change these to
> 0.001 and it does not fix the error.  Furthermore, it's only in the
> permutation portion where this error occurs so I thought this might not be
> the problem.
>
> Any ideas what's going on?
>
> Thanks!
>
>
>


-- 
Jiayi Monika Sun
Rice University, Bioengineering '10
Baylor College of Medicine Graduate School, SCBMB
jmsun@bcm.edu

	[[alternative HTML version deleted]]

