constantAmateur / SoupX

R package to quantify and remove cell free mRNAs from droplet based scRNA-seq data
253 stars 34 forks source link

Error when running calculateContaminationFraction with cellSpecificEstimates = True #22

Closed rtvest closed 4 years ago

rtvest commented 4 years ago

When running calculateContaminationFraction as follows:

scveh <- calculateContaminationFraction(scveh, nonExpressedGeneList = genelist, cellSpecificEstimates = TRUE, useToEst = usetoestveh)

I get the following error message:

Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! g++: error: unrecognized command line option ‘-std=gnu++14’ make: *** [file1467411a2bdf9.o] Error 1 In addition: Warning message: In system(cmd, intern = !verbose) : running command '/scg/apps/software/r/3.6/lib64/R/bin/R CMD SHLIB file1467411a2bdf9.cpp 2> file1467411a2bdf9.cpp.err.txt' had status 1 Error in sink(type = "output") : invalid connection

This is being run in RStudio 3.6 with everything updated fully. Has anyone else had this issue and found a workaround? When I run the command without cellSpecificEstimates it works fine.

Thanks, Ryan

constantAmateur commented 4 years ago

By setting cellSpecificEstimates=TRUE you're telling the method to use a hierarchical bayes method to estimate the contamination fraction for each cell, while sharing information between them. This mode require the rstan library and this error looks like it is something associated with the setup or installation of this package or its dependencies.

Unless you had a very convincing reason to want to do this, I would recommend leaving cellSpecificEstimates at the default value of FALSE and using a global estimate instead.