Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in score_matrix(expr = adjusted, eval_pcs = eval_pcs, eval_proj = eval_proj, : NA/Inf/NaN Expression Values #99

Open
diyadas opened this issue Aug 20, 2018 · 0 comments

Comments

@diyadas
Copy link

diyadas commented Aug 20, 2018

I'm getting this error on running scone and attempting to retrieve rankings. I checked my un-normalized data, and there are no NAs, Infs, or NaNs. I'm not sure how to resolve this - it looks like scone is producing the NA expression data as part of the normalization.

Code is as follows:

scone_fx <- function(SconeExperimentObj, ...){
  scone(SconeExperimentObj,
        scaling = list(none = identity,sum = SUM_FN, tmm = TMM_FN, uq = UQ_FN,
                       fq = FQT_FN, deseq = DESEQ_FN),
        k_ruv = 3,
        k_qc = 5,
        adjust_bio = "no",
        adjust_batch = "yes",
        eval_kclust = 5:15,
        zero = "postadjust", ...
  )
}
scone_obj <- SconeExperiment(se_filtered, #se_filtered is a SummarizedExperiment object
                             which_qc =
                               which(colnames(colData(se_filtered)) %in%
                                       colnames(qc)),
                             which_negconruv = 2L,
                             which_negconeval = 1L,
                            #  which_bio = 146L, #at the time, this wasn't specified - not sure if that would have triggered the issue
                             which_batch = 4L
)
scone_params <- scone_fx(scone_obj, run = FALSE)

N <- NCOL(scone_obj)
n <- ceiling(N * 0.05 )
sub_ranks <- replicate(10, {
idx <- sample(N, n)
scone_sub <- scone_obj[, idx]
scone_sub <- scone_sub[rowSums(assay(scone_sub)) > 0, ]    
scone_sub <- scone_fx(scone_sub)     
return(list(get_scores(scone_sub), get_score_ranks(scone_sub)))
  } , simplify = FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant