constantAmateur / SoupX

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

Installation failure with STAN #49

Closed petervangalen closed 3 years ago

petervangalen commented 4 years ago

Hi, Thank you for writing this software. My analysis pipeline requires removal of cells with high contamination, so I use the option cellSpecificEstimates = T I updated to R version 4.0.1 and reinstalled SoupX using install.packages('SoupX'), which does not include the option. So then I tried devtools::install_github("constantAmateur/SoupX",ref='STAN'), but this results in an error:

Downloading GitHub repo constantAmateur/SoupX@STAN
Skipping 2 packages not available: ggplot2, Seurat
   checking DESCRIPTION meta-information ...m/5fkddq9119v31_40dqj5pf2m0000gn/T/RtmpS3cUlW/remotes2b0e89d3ad0/constantAmateur-SoupX-a01ddb0/DESCRIPTION’ ...
* installing *source* package ‘SoupX’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
sh: line 1: 11153 Killed: 9               R_TESTS= '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --no-restore --no-echo 2>&1 < '/var/folders/lm/5fkddq9119v31_40dqj5pf2m0000gn/T//Rtmp6TouEu/file2b877e5ca7e5'
ERROR: lazy loading failed for package ‘SoupX’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/SoupX’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/SoupX’
Error: Failed to install 'SoupX' from GitHub:
  (converted from warning) installation of package ‘/var/folders/lm/5fkddq9119v31_40dqj5pf2m0000gn/T//RtmpS3cUlW/file2b0e66598fff/SoupX_1.4.5.tar.gz’ had non-zero exit status

This is on macOS Catalina with R version 4.0.1, I got the error in RStudio as well as R.

constantAmateur commented 3 years ago

Newer versions of the code have been tested on R 4.0.0+, so please try these if this is still an issue. Note that in newer versions the cellSpecificEstimates option is only available in the STAN branch of the github code.

The cluster based redistribution of counts does a very good job of capturing cell-to-cell variability in the contamination fraction. See Figure S3 in the paper. If you need the contamination values for your pipeline, you may be better off calculating the effective contamination after the fact by comparing colSums on the output of adjustCounts to your input matrix.