Giter Site home page Giter Site logo

omnideconv / immunedeconv Goto Github PK

View Code? Open in Web Editor NEW
426.0 426.0 101.0 121 MB

A unified interface to immune deconvolution methods (CIBERSORT, EPIC, quanTIseq, TIMER, xCell, MCPcounter) and mouse deconvolution methods

Home Page: https://omnideconv.org/immunedeconv/index.html

License: Other

R 69.84% Makefile 1.17% C 0.01% TeX 28.97%

immunedeconv's Introduction

omnideconv

R-CMD-check license docs Codecov test coverage

The goal of omnideconv is to unify second generation cell-type deconvolution methods in an R package.

Installation

There are two ways to install omnideconv:

  • The minimal installation installs only the dependencies required for the basic functionalities. All deconvolution methods need to be installed on-demand.
  • The complete installation installs all dependencies including all deconvolution methods. This may take a considerable time.

Since not all dependencies are on CRAN or Bioconductor, omnideconv is available from GitHub only. We recommend installing it through the pak package manager:

# install the `pak` package manager
install.packages("pak")

# minimal installation
pak::pkg_install("omnideconv/omnideconv")

# complete installation, including Python dependencies
pak::pkg_install("omnideconv/omnideconv", dependencies = TRUE)
omnideconv::install_all_python()

Upon the first loading, miniconda will be installed if not already present. A dedicated conda environment will be created to host the python-based methods.

Available methods

The methods currently implemented in omnideconv are:

  • AutoGeneS (“autogenes”)
  • Bisque (“bisque”)
  • BayesPrism ("bayesprism")
  • BSeq-sc (“bseqsc”)
  • CDSeq (“cdseq”)
  • CIBERSORTx (“cibersortx”)
  • CPM (“cpm”)
  • DWLS (“dwls”)
  • MOMF (“momf”)
  • MuSiC (“music”)
  • Scaden (“scaden”)
  • SCDC (“scdc”)

General usage

All the deconvolution methods included in omnideconv can be run in one step, trough the function deconvolute, which takes in input the matrix of bulk RNAseq to be deconvolved (bulk_gene_expression), along with the training single cell expression matrix (single_cell_object) with the cell type annotations and sample information.

deconvolution <- omnideconv::deconvolute(bulk_gene_expression, method,
                                         single_cell_object, cell_type_annotations, batch_ids)

Signature matrix/model building

The methods AutoGeneS, BSeq-Sc, DWLS, CIBERSORTx, MOMF and Scaden first optimize their internal model, for example building a signature matrix, and then use this model to perform deconvolution. For these methods, the build_model function can be used. The obtained model can then be given in input to the deconvolute function, omitting the single cell data.

signature <- omnideconv::build_model(single_cell_object, cell_type_annotations,
                                     batch_ids, method, bulk_gene_expression)

deconvolution <- omnideconv::deconvolute(bulk_gene_expression, signature)

The deconvolute function returns a sample x cell type matrix with the estimated cell fractions

Input data

Different methods have different requirements in terms of input data. This list has been compiled considering the methods documentation, described data procssing or authors recommendation

Method Single cell normalization Bulk normalization
AutogeneS CPM TPM
BayesPrism Counts Counts
Bisque Counts Counts
Bseq-Sc Counts TPM
CDseqR Counts Counts
CIBERSORTx CPM TPM
CPM Counts Counts
DWLS Counts TPM
MOMF Counts Counts
MuSiC Counts TPM
Scaden Counts TPM
SCDC Counts TPM

Learn More

For more information and an example workflow see the vignette of this package.

Requirements

Most methods do not require additional software/tokens, but there are a few exceptions:

  • A working version of Docker or Singularity is required for CIBERSORTx
  • A token for CIBERSORTx is required from this website: https://cibersortx.stanford.edu/
  • The CIBERSORT source code is required for BSeq-sc (see tutorial in ?omnideconv::bseqsc_config)

Available methods, Licenses, Citations

Note that, while omnideconv itself is free (GPL 3.0), you may need to obtain a license to use the individual methods. See the table below for more information. If you use this package in your work, please cite both our package and the method(s) you are using.

CITATION

method license citation
AutoGeneS free (MIT) Aliee, H., & Theis, F. (2021). AutoGeneS: Automatic gene selection using multi-objective optimization for RNA-seq deconvolution. https://doi.org/10.1101/2020.02.21.940650
BayesPrism free (GPL 3.0) Chu, T., Wang, Z., Pe’er, D. et al. Cell type and gene expression deconvolution with BayesPrism enables Bayesian integrative analysis across bulk and single-cell RNA sequencing in oncology. Nat Cancer 3, 505–517 (2022). https://doi.org/10.1038/s43018-022-00356-3
Bisque free (GPL 3.0) Jew, B., Alvarez, M., Rahmani, E., Miao, Z., Ko, A., Garske, K. M., Sul, J. H., Pietiläinen, K. H., Pajukanta, P., & Halperin, E. (2020). Publisher Correction: Accurate estimation of cell composition in bulk expression through robust integration of single-cell information. Nature Communications, 11(1), 2891. https://doi.org/10.1038/s41467-020-16607-9
BSeq-sc free (GPL 2.0) Baron, M., Veres, A., Wolock, S. L., Faust, A. L., Gaujoux, R., Vetere, A., Ryu, J. H., Wagner, B. K., Shen-Orr, S. S., Klein, A. M., Melton, D. A., & Yanai, I. (2016). A Single-Cell Transcriptomic Map of the Human and Mouse Pancreas Reveals Inter- and Intra-cell Population Structure. In Cell Systems (Vol. 3, Issue 4, pp. 346–360.e4). https://doi.org/10.1016/j.cels.2016.08.011
CDSeq free (GPL 3.0) Kang, K., Huang, C., Li, Y. et al. CDSeqR: fast complete deconvolution for gene expression data from bulk tissues. BMC Bioinformatics 22, 262 (2021). https://doi.org/10.1186/s12859-021-04186-5
CIBERSORTx free for non-commerical use only Newman, A. M., Liu, C. L., Green, M. R., Gentles, A. J., Feng, W., Xu, Y., Hoang, C. D., Diehn, M., & Alizadeh, A. A. (2015). Robust enumeration of cell subsets from tissue expression profiles. Nature Methods, 12(5), 453–457. https://doi.org/10.1038/nmeth.3337
CPM free (GPL 2.0) Frishberg, A., Peshes-Yaloz, N., Cohn, O., Rosentul, D., Steuerman, Y., Valadarsky, L., Yankovitz, G., Mandelboim, M., Iraqi, F. A., Amit, I., Mayo, L., Bacharach, E., & Gat-Viks, I. (2019). Cell composition analysis of bulk genomics using single-cell data. Nature Methods, 16(4), 327–332. https://doi.org/10.1038/s41592-019-0355-5
DWLS free (GPL) Tsoucas, D., Dong, R., Chen, H., Zhu, Q., Guo, G., & Yuan, G.-C. (2019). Accurate estimation of cell-type composition from gene expression data. Nature Communications, 10(1), 2975. https://doi.org/10.1038/s41467-019-10802-z
MOMF free (GPL 3.0) Xifang Sun, Shiquan Sun, and Sheng Yang. An efficient and flexible method for deconvoluting bulk RNAseq data with single-cell RNAseq data, 2019, DIO: 10.5281/zenodo.3373980
MuSiC free (GPL 3.0) Wang, X., Park, J., Susztak, K., Zhang, N. R., & Li, M. (2019). Bulk tissue cell type deconvolution with multi-subject single-cell expression reference. Nature Communications, 10(1), 380. https://doi.org/10.1038/s41467-018-08023-x
Scaden free (MIT) Menden, K., Marouf, M., Oller, S., Dalmia, A., Kloiber, K., Heutink, P., & Bonn, S. (n.d.). Deep-learning-based cell composition analysis from tissue expression profiles. https://doi.org/10.1101/659227
SCDC (MIT) Dong, M., Thennavan, A., Urrutia, E., Li, Y., Perou, C. M., Zou, F., & Jiang, Y. (2020). SCDC: bulk gene expression deconvolution by multiple single-cell RNA sequencing references. Briefings in Bioinformatics. https://doi.org/10.1093/bib/bbz166

immunedeconv's People

Contributors

czackl avatar federicomarini avatar ffinotello avatar grst avatar lorenzomerotto avatar pelzko avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

immunedeconv's Issues

xCell expected cell types

I'd like to limit the expected_cell_types parameter in deconvolute_xcell(). It would be very helpful if it were easy to get a list of these cell types within immunedeconv.

can't load package in Rstudio

I followed the installation instructions and was able to load immunedeconv from the command line into R. However, I wanted to use the package in Rstudio because I want to explore it in an Rmarkdown.

To do that, I did the following:

(base) azubair@D191200:~/projects$ conda activate immunedeconv
(immunedeconv) azubair@D191200:~/projects/decon$ conda install --override -c grst -c bioconda -c conda-forge/label/cf201901 r-immunedeconv
(immunedeconv) azubair@D191200:~/projects/decon$ rstudio

However, when I load the package in Rstudio, I get the following error:

> library(immunedeconv)
Error: package or namespace load failed for ‘immunedeconv’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/azubair/anaconda3/envs/immunedeconv/lib/R/library/RCurl/libs/RCurl.so':
  /home/azubair/anaconda3/envs/immunedeconv/lib/R/library/RCurl/libs/../../../../libcurl.so.4: undefined symbol: SSLv2_client_method

I think it is having some problems with RCurl.

If it helps, when I start Rstudio, I got the following message:

Error in tools::startDynamicHelp() : internet routines cannot be loaded

It could be a problem with my local installation of RStudio, but I wanted to ask if you folks have used immunedeconv within RStudio and if so what was your workflow.

> devtools::session_info()
─ Session info ────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.4.1 (2017-06-30)
 os       Ubuntu 16.04.6 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language en_US                       
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       SystemV/CST6CDT             
 date     2019-07-30                  

Combining datasets prior to running

Hi,

I have two RNA-seq datasets: one is polyA and the other is stranded. Both have some common cancer types so I combine them into a single matrix of common genes prior to running xCell and CIBERSORT (abs.). Do you recommend this approach? If not and if I run these two methods independently on the datasets, would the results from the two datasets be comparable to each other?

My goal is to create a heatmap of average immune scores per cell type (y-axis) per cancer type (x-axis) after getting the immune scores.

Please advise.

Thanks
Komal

Cannot install with remotes::install_github("icbi-lab/immunedeconv")

Hi developer,

When I try remotes::install_github("icbi-lab/immunedeconv"), it will tell me
Downloading GitHub repo icbi-lab/immunedeconv@HEAD
Error: Failed to install 'immunedeconv' from GitHub:
incomplete block on file
I am using R version 4.0.2 and connecting from China but using VPN. I have 2GB free space in my hard drive and I think it should be enough?

cibersort can not run

This error occurs when I run it, but otherwise works fine.

res <-deconvolute(exprMatrix, "cibersort")

Running cibersort
Error in (function (sig_matrix, mixture_file, perm = 0, QN = TRUE) :
Parameter useless(absolute = FALSE, abs_method = "sig.score")

error in xcell, expected cell types

Hi,
I wanted to run xcell with a specific list of expected cell types, ended up getting the following:

xcell <- deconvolute_xcell(tpm_nolog, arrays = F, expected_cell_types = "B-cells")
Error in get_all_children(cell_type, "xcell") : 
  unknown cell type: B-cells

Thanks,

Jasko

Failed to install 'immunedeconve' in R

can anyone help me to sovle this problem. Thanks!

remotes::install_github("icbi-lab/immunedeconv")
Downloading GitHub repo icbi-lab/immunedeconv@master
错误: Failed to install 'immunedeconv' from GitHub:
invalid multibyte string, element 1

sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936
[2] LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3 curl_4.3 remotes_2.1.1

Missing cell types in the results

Hello,
First, congrats for your paper and thank you for including some additional discussion in it, as I had suggested. It's great to see that EPIC was top-performing in this independent benchmark :-)

It's also cool that you wrote this package so that people can easily use the one or other method, even though this might hide some options that the original packages are proposing to their users, like the use of their own cell reference profiles.

After testing your package, I've seen an issue: some cell types predicted by a given method are missing from the results. In particular, for EPIC, when doing the deconvolution for non-tumor tissue, we also predict the neutrophils but they aren't returned. And both for the tumor and non-tumor cases, EPIC also adds the predictions of the "otherCells". This is a novel and very important feature that has been introduced by EPIC, representing mostly the cancer cells or other cell types without reference profiles that are present in the bulk sample. We feel that these cell types should thus be added in your cell_type_mapping file to include all cell types predicted by EPIC.

Similarly, for xCell, I understand that you didn't want to output all cell subtypes due to the potential spillover effects affecting this method. But this also hides the fact that xCell would also return predictions for other cell types. So, it might be good to implement an option allowing the user to select doing the deconvolution for his cell types of interest (the "expected_cell_type" option seem to only work to further restrain the set of cell types, but not to add other cell types absent from the cell_type_mapping table).

Thanks! Cheers,

Julien

Installation failed

problem:Installation failed: SVN does not seem to be installed on your system.
Please tell me how to solve this problem!thank you!

MCP- counter score for Macrophages and Monocytes.

Hi,

I am working with MCP- counter for my project and it is providing me with scores for both Monocyte and Monocyte/Macrophages. The scores for both are exactly the same, I looked into the signature genes file which has the marker genes only for Monocytic lineage, Hence I wanted to understand why is the expression of macrophage is shown instead of just Monocytic lineage.

Thank you in advance.

Disha

Installing "immunedeconv" package

Hi,

I tried to install "immunedeconv" package to a supercomputer that my university uses. It is Centos ver7. According to the instruction, I installed it through Bioconda but it doesn't work. I pasted the command line that I typed to install below. Could you tell me what I did wrong?

Install immunedeconv package

$ interact --egress
$ module load anaconda5/5.0.0-3.6
$ conda create --prefix /pylon5/mc5fppp/biotech/.conda/envs/deconvolution
$ source activate deconvolution
$ conda install -c bioconda -c conda-forge r-immunedeconv

When I load the reticulate library

$ interact --egress
$ module load anaconda5/5.0.0-3.6
$ module load R/3.6.0-mkl
$ source activate deconvolution
$ R

library(inmunedeconve)
Error in library(inmunedeconve) :
there is no package called ‘inmunedeconve’

Error installing package

Hi,

Getting the following error when installing the package:

> library(remotes)
> remotes::install_github("icbi-lab/immunedeconv")
Error: Failed to install 'immunedeconv' from GitHub:
  HTTP error 403.
  API rate limit exceeded for 159.14.232.50. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

  Rate limit remaining: 0/60
  Rate limit reset at: 2019-10-30 19:03:13 UTC

  To increase your GitHub API rate limit
  - Use `usethis::browse_github_pat()` to create a Personal Access Token.
  - Use `usethis::edit_r_environ()` and add the token as `GITHUB_PAT`.

Please let me know!

Thanks
Komal

Can't install package

Hi, I install this package:
remotes::install_github("grst/immunedeconv")
it shows:

Downloading GitHub repo grst/immunedeconv@master
Error: Failed to install 'immunedeconv' from GitHub:
  invalid multibyte string, element 1
In addition: Warning messages:
1: In untar2(tarfile, files, list, exdir) :
  skipping pax global extended headers
2: In untar2(tarfile, files, list, exdir) :
  skipping pax global extended headers
platform: Win8.1 x64
R v3.6.0
remotes v2.1.0

i am not able to install immunedeconv and snakemake with conda

hello,
you have mention conda as prefer installation but itz not working i am using centos7

conda install -c grst,bioconda,conda-forge r-immunedeconv
Solving environment: failed

CondaHTTPError: HTTP 404 NOT FOUND for url https://conda.anaconda.org/grst,bioconda,conda-forge/noarch/repodata.json
Elapsed: 00:05.772163
CF-RAY: 4ac0e33eba7d8a79-BOM

The remote server could not find the noarch directory for the
requested channel with url: https://conda.anaconda.org/grst,bioconda,conda-forge

As of conda 4.3, a valid channel must contain a noarch/repodata.json and
associated noarch/repodata.json.bz2 file, even if noarch/repodata.json is
empty. please request that the channel administrator create
noarch/repodata.json and associated noarch/repodata.json.bz2 files.
$ mkdir noarch
$ echo '{}' > noarch/repodata.json
$ bzip2 -k noarch/repodata.json

You will need to adjust your conda configuration to proceed.
Use conda config --show channels to view your configuration's current state.
Further configuration help can be found at https://conda.io/docs/config.html

Add FAQ

Some questions keep popping up, it would be good to collect them and add them to an FAQ for further reference.

  • Interpretation of scores for the different methods
  • Direct access to specific parameters of the underlying methods (stuff that isn't abstracted into deconvolute)
  • Recommended normalization/preprocessing of input data (RNA-seq and arrays)

Can we merge two signature matrices: one from scRNA with the LM22?

Hello @grst , @mlist, @federicomarini, @FFinotello, @traviscibot and all other cibersortx users,

I have a query related to CIBERSORTx, where I have a tumor specific signature matrix generated from scRNA seq data. I want to merge it with the immune signatures (LM22 matrix), in order to explore tumor and non-tumor contents together.
I am wondering if it is possible to merge two signature matrices generated by two different platforms?
Any help or guidance to solve this issue will be highly appreciated.
Thanks

CIBERSORT

Hello:

Thank you for developing such a good R package, but Why can't I use CIBERSORT in immunedeconv?

I always get this:
assertion failed: CIBERSORT.R is provided

many thanks

Error in deconvolute_cibersort

When running deconvolute_cibersort, some errors appear:

assertion failed: CIBERSORT.R is provided
error: exists("cibersort_binary", envir = config_env) is not TRUE

It seems that there is no function cibersort_binary loaded. Could you please repair this bug? Thanks!

Error when installing from github

When I install from github using devtools or remote, I get the following error

> library(immunedeconv)
Loading required package: EPIC
Error: package or namespace load failed for ‘immunedeconv’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘BiocGenerics’ 0.30.0 is being loaded, but >= 0.31.2 is required

So I try to updaate BiocGenerics and get the following:

> BiocManager::install("BiocGenerics")
Bioconductor version 3.9 (BiocManager 1.30.10), R 3.6.0 (2019-04-26)
Installing package(s) 'BiocGenerics'
trying URL 'https://bioconductor.org/packages/3.9/bioc/bin/macosx/el-capitan/contrib/3.6/BiocGenerics_0.30.0.tgz'
Content type 'application/x-gzip' length 637480 bytes (622 KB)
==================================================
downloaded 622 KB


The downloaded binary packages are in
	/var/folders/9m/dy7kzyp50fldn0ydz_9wj8180000gn/T//RtmpkZpJCh/downloaded_packages
Old packages: 'DescTools'
Update all/some/none? [a/s/n]: a

  There is a binary version available but the source version is later:
           binary  source needs_compilation
DescTools 0.99.34 0.99.35              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘DescTools’

trying URL 'https://cran.rstudio.com/src/contrib/DescTools_0.99.35.tar.gz'
Content type 'application/x-gzip' length 2476177 bytes (2.4 MB)
==================================================
downloaded 2.4 MB

* installing *source* package ‘DescTools’ ...
** package ‘DescTools’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c ADinf.c -o ADinf.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c AnDarl.c -o AnDarl.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c Barnard.c -o Barnard.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c aux_fct.cpp -o aux_fct.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c between.c -o between.o
gfortran  -fPIC  -Wall -g -O2  -c cidxcn.f -o cidxcn.o
cidxcn.f:70:5:

   70 | 23003 continue
      |     1
Warning: Label 23003 at (1) defined but not used [-Wunused-label]
cidxcn.f:77:5:

   77 | 23001 continue
      |     1
Warning: Label 23001 at (1) defined but not used [-Wunused-label]
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conc.c -o conc.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c exactsum.c -o exactsum.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c extremes.cpp -o extremes.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c fdwilcox.c -o fdwilcox.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c fpow.c -o fpow.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c gompertz.cpp -o gompertz.o
gfortran  -fPIC  -Wall -g -O2  -c hoeffd.f -o hoeffd.o
hoeffd.f:50:5:

   50 | 23017 continue
      |     1
Warning: Label 23017 at (1) defined but not used [-Wunused-label]
hoeffd.f:52:5:

   52 | 23015 continue
      |     1
Warning: Label 23015 at (1) defined but not used [-Wunused-label]
hoeffd.f:28:5:

   28 | 23009 continue
      |     1
Warning: Label 23009 at (1) defined but not used [-Wunused-label]
hoeffd.f:39:5:

   39 | 23007 continue
      |     1
Warning: Label 23007 at (1) defined but not used [-Wunused-label]
hoeffd.f:15:5:

   15 | 23003 continue
      |     1
Warning: Label 23003 at (1) defined but not used [-Wunused-label]
hoeffd.f:41:5:

   41 | 23001 continue
      |     1
Warning: Label 23001 at (1) defined but not used [-Wunused-label]
hoeffd.f:76:5:

   76 | 23019 continue
      |     1
Warning: Label 23019 at (1) defined but not used [-Wunused-label]
hoeffd.f:113:5:

  113 | 23023 continue
      |     1
Warning: Label 23023 at (1) defined but not used [-Wunused-label]
hoeffd.f:118:5:

  118 | 23021 continue
      |     1
Warning: Label 23021 at (1) defined but not used [-Wunused-label]
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c init.c -o init.o
gfortran  -fPIC  -Wall -g -O2  -c jtpdf.f -o jtpdf.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c ks.c -o ks.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c moments.c -o moments.o
gfortran  -fPIC  -Wall -g -O2  -c pan.f -o pan.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c pointinpolygon.c -o pointinpolygon.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c ranksort.c -o ranksort.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c roman2int.c -o roman2int.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c tbrm.c -o tbrm.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c wgt_himed.c -o wgt_himed.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o DescTools.so ADinf.o AnDarl.o Barnard.o RcppExports.o aux_fct.o between.o cidxcn.o conc.o exactsum.o extremes.o fdwilcox.o fpow.o gompertz.o hoeffd.o init.o jtpdf.o ks.o moments.o pan.o pointinpolygon.o ranksort.o roman2int.o tbrm.o wgt_himed.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [DescTools.so] Error 1
ERROR: compilation failed for package ‘DescTools’
* removing ‘/Users/massoudmaher/Library/R/3.6/library/DescTools’
* restoring previous ‘/Users/massoudmaher/Library/R/3.6/library/DescTools’

The downloaded source packages are in
	‘/private/var/folders/9m/dy7kzyp50fldn0ydz_9wj8180000gn/T/RtmpkZpJCh/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘DescTools’ had non-zero exit status
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.3

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] EPIC_1.1.5

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6          magrittr_1.5          hms_0.5.3
 [4] MASS_7.3-51.6         tidyselect_1.0.0      BiocParallel_1.20.1
 [7] R6_2.4.1              rlang_0.4.5           quadprog_1.5-8
[10] dplyr_0.8.5           parallel_3.6.0        lpSolve_5.6.15
[13] ellipsis_0.3.0        assertthat_0.2.1      tibble_3.0.1
[16] preprocessCore_1.48.0 lifecycle_0.2.0       crayon_1.3.4
[19] purrr_0.3.4           readr_1.3.1           vctrs_0.2.4
[22] glue_1.4.0            compiler_3.6.0        pillar_1.4.3
[25] limSolve_1.5.6        pkgconfig_2.0.3

Error using quantiseq

Hi, I'm new to this, so maybe a noob question. I tried stack overflow but couldn't find the solution.

subpopulations <- deconvolute(tpm_nolog, method = "quantiseq", tumor = TRUE, arrays = FALSE)

>>> Running quantiseq

Running quanTIseq deconvolution module

Gene expression normalization and re-annotation (arrays: FALSE)

Error in aggregate.data.frame(mydata, by = list(newgenes), FUN = median) : 
  no rows to aggregate

I tried deconvolute, deconvolute_quantiseq, and deconvolute_quantiseq.default.
My input file is exactly as described in the help file.

Thanks

ImmuneDeconv Matrix Error

I am attempting to run the quantiseq function on immunedeconv and I have received an error.

Replication steps:
module purge all
module load python-anaconda3
conda create --name r-immunedeconv -c bioconda -c conda-forge r-immunedeconv --yes
source activate r-immunedeconv
~/.conda/envs/r-immunedeconv/bin/R
library(dplyr)
library(ggplot2)
library(tidyr)
library(immunedeconv)
library(tibble)

I was successfully able to run the sample EPIC files as follows:
res_quantiseq = deconvolute(dataset_racle$expr_mat, "quantiseq", tumor = TRUE)
res_quantiseq %>%
gather(sample, fraction, -cell_type) %>%

plot as stacked bar chart

ggplot(aes(x=sample, y=fraction, fill=cell_type)) +
geom_bar(stat='identity') +
coord_flip() +
scale_fill_brewer(palette="Paired") +
scale_x_discrete(limits = rev(levels(res_quantiseq)))

I also attempted to convert the dataset_racle$expr_mat into a csv file and running that:
write.csv(dataset_racle$expr_mat, file=/home/yzx5896/dataset.csv)
test <- read.csv(“/home/yzx5896/dataset.csv”, header=TRUE, row.names=1)
pastedImage

I then created a csv file with the first column as gene names, the column labels as the samples. This is organized in the same way as dataset.csv.
test-file.zip

I ran the following code:
tumorRNASeq <- read.csv(“/home/yzx5896/test-file.csv”, header=TRUE, row.names=1)
res_quantiseq = deconvolute(tumorRNASeq, "quantiseq", tumor = TRUE)
pastedImage2

What is causing the error? Should the row headings match those of dataset_racle$expr_mat ?

Install Problem

devtools::install_github('grst/immunedeconv')
Downloading GitHub repo grst/immunedeconv@master
Error in read.dcf(path) :
Found continuation line starting ' "Julien Racle <jul ...' at begin of record.

When I run the above for installation through R this is the error I get.

Thanks in advance for your help.

Improve github issue experience

  • add an issue template

    • many issues in this repo are getting opened by rather inexperienced GitHub users. We should provide them some guidance how to write a good issue and properly format it.
  • Consider switching on Github discussions.

    • many issues are actually questions. The "discussions" section encourages more community involvement, and separates questions from more technical bug reports.

map_result_to_celltypes for B cell not working for cibersort(_abs)

Hi all,
thanks a lot for the great package and work you are providing.
I have found that when I am trying to map results for cibersort(_abs) to B cell fractions it does not work and give NA as result:
map_result_to_celltypes(res_cibersort_abs, "B cell", "cibersort_abs")

For all other cell types (e.g. cell_types = c("T cell CD4+", "T cell CD8+", "NK cell", "Macrophage M1", "Macrophage M2", "Monocyte", "T cell regulatory (Tregs)", "Myeloid dendritic cell", "Neutrophil")) it works perfectly.
I can work around it but it will be great to have it fixed for automatisation.

Thanks again in advance
Marco

missing values in 'row.names' are not allowed

head(A1)

GSM1008824 GSM1008825 GSM1008826 GSM1008827
A1BG 8.054528 7.390146 8.132450 8.238083
A1CF 5.614113 5.172244 5.683664 5.607894
A2LD1 8.041023 7.131838 7.997930 8.133909
A2M 8.850675 9.805575 9.160741 9.351406
A2ML1 7.494496 8.394412 9.435127 5.855893
A4GALT 8.023367 8.211679 8.569053 8.596803

A1_timer=immunedeconv::deconvolute(A1, "timer", indications=c("lusc", "lusc", "lusc","lusc"))  

Running timer ## Enter batch mode ## Loading immune gene expression Error in read.table(file = file, header = header, sep = sep, quote = quote, : missing values in 'row.names' are not allowed
--

Update conda version to R 3.5.1

This seems to create a valid environment

conda create -n immunedeconv_new -c bioconda r-base=3.5.1 r-rlang r-devtools r-dplyr  r-magrittr r-readr r-readxl r-testit r-r.methodss3 r-data.tree r-e1071 bioconductor-biocinstaller bioconductor-biobase bioconductor-preprocesscore bioconductor-gsva bioconductor-sva bioconductor-gseabase r-xcell r-epic r-mcpcounter r-roxygen2  r-limsolve "r-tibble>=1.4.2"
  • #2
  • package should work with conda strict mode, if possible

cannot install with conda

After I install python 3.8 and rstudio via conda in latest Linux Mint I am trying to install r-immunedeconv and I get the following errors both in mamba and conda:

package r-immunedeconv-2.0.2-r36_0 requires r-base >=3.6,<3.7.0a0, but none of the providers can be installed

Unable to load limSolve.dylib library

I was unable to install using the steps recommended on https://github.com/icbi-lab/immunedeconv

I installed miniconda from the linked site, then ran these commands:

conda create -n deconvolution
conda activate deconvolution
conda install -c bioconda -c conda-forge r-immunedeconv

When I ran the conda install command, I got this message: To use the "java" command line tool you need to install a JDK

I installed the JDK and re-ran the conda install command which ran without error.

I launched R from the command line from within deconvolution environment, and got the following error:

> library(immunedeconv)
Loading required package: EPIC
Error: package or namespace load failed for ‘immunedeconv’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/hbeale/opt/miniconda3/envs/deconvolution/lib/R/library/limSolve/libs/limSolve.dylib':
  dlopen(/Users/hbeale/opt/miniconda3/envs/deconvolution/lib/R/library/limSolve/libs/limSolve.dylib, 6): Library not loaded: @rpath/libopenblasp-r0.3.7.dylib
  Referenced from: /Users/hbeale/opt/miniconda3/envs/deconvolution/lib/R/library/limSolve/libs/limSolve.dylib
  Reason: image not found

I uninstalled and reinstalled conda immuneconv:

conda remove r-immunedeconv
conda install -c bioconda -c conda-forge r-immunedeconv

I still get the same error loading immunedeconv in R

Limit cell types in spillover step of xCell

According to @dviraran, the performance of xCell can be improved
by limiting the cell types to immune cells only in the spillover step.

See also this tutorial.

As this package targets immune cells, it probably makes sense to limit the cell types per default in the
deconvolute function.

parameter setting issue in immunedeconv

Hi Gregor,
Thanks a lot for developed a wonderful integrated package. I am so much interested to use this package. I am using this package on windows due to lack of proper experience about server computer. I am wondering about a question,

is it possible to set user defined same cell types and same signature for all methods?

I have looked some websites but did not get proper guide line. I will be grateful to you if kindly give me some instruction.

Aman

get a 'no file found' error for deconvolute_quantiseq() with btotalcells = TRUE

I just ran immundeconv v2.0.3 on R v4.0.3 on RNAseq data for ~20k genes and ~250 tumor samples. (macOS 10.15.7)

  1. MCP-counter gave no problems.
    mcp_counter_res <- deconvolute_mcp_counter(
    as.matrix(merged.gencode.RNAseq.unique_gene_names),
    feature_types = "HUGO_symbols"
    )
    dim(mcp_counter_res)
    10 256

  2. quanTiseq gave no problems if btotalcells = default = FALSE.
    quanTiseq_res <- deconvolute_quantiseq(
    as.matrix(merged.gencode.RNAseq.unique_gene_names),
    tumor = TRUE,
    arrays = FALSE,
    scale_mrna = TRUE
    )
    Running quanTIseq deconvolution module
    Gene expression normalization and re-annotation (arrays: FALSE)
    Removing 17 noisy genes
    Removing 15 genes with high expression in tumors
    Signature genes found in data set: 137/138 (99.28%)
    Mixture deconvolution (method: lsei)
    Deconvolution sucessful!

  3. But if I set btotalcells = TRUE, I get an error.
    quanTiseq_res <- deconvolute_quantiseq(
    as.matrix(merged.gencode.RNAseq.unique_gene_names),
    tumor = TRUE,
    arrays = FALSE,
    scale_mrna = TRUE,
    btotalcells = TRUE
    )
    Running quanTIseq deconvolution module
    Gene expression normalization and re-annotation (arrays: FALSE)
    Removing 17 noisy genes
    Removing 15 genes with high expression in tumors
    Signature genes found in data set: 137/138 (99.28%)
    Mixture deconvolution (method: lsei)
    Deconvolution sucessful!
    Error in system.file("extdata", "quantiseq", "totalcells.txt", package = "immunedeconv", :
    no file found

Am I doing something silly?

Allow to specify custom signature(matrix)

It would be useful to be able to specify custom signature matrices.

Originally proposed by Sonja Hänzelmann via email and also mentioned as one of the "masked options" by @jracle85 in #14.

Problem:

  • Conceptual differences between the methods: CBS, EPC, QTS accept signature matrices; MCP, XCL lists of marker genes and TMR does something entirely different.

Possible solution:

  • Accept matrices for CBS, EPC, QTS and marker genes for MCP and XCL (-> special casing)

tibble version conflict

Reported by @eirikhoye via Email.

I tried installing following your installation instruction, using conda 4.6.14:

Setting up a conda environment using the commands:
$ conda create -n deconvolution
$ conda activate deconvolution
And installing the immunedeconv package:
$ conda install -c grst -c bioconda -c conda-forge r-immunedeconv
The conda install appear to run successfully, however when i open an R terminal and load the immunedeconv package, I get the error:

library(deconvolution)
Loading required package: EPIC
Error: package or namespace load failed for ‘immunedeconv’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘tibble’ 1.3.3 is being loaded, but >= 1.4.2 is required

It looks like the deconvolution package requires tibble version >= 1.4.2, however when I try to update the tibble package using conda, conda will uninstall the deconvolution package:

$ conda install -c bioconda r-tibble=2.1.1
...
The following packages will be REMOVED:

r-immunedeconv-1.1.0-r341_0
r-xcell-1.12-r341_0
...

Better example dataset

The current example dataset included in immunedeconv is based on facs-purified bulk samples containing a single cell type only. This is not very well suited to demonstrate the methods.

@jracle85, would you be ok with me including the four samples from the EPIC paper (LAU125, LAU355, etc.)?

Timeout was reached: [raw.githubusercontent.com]

sclc_mcp_counter=immunedeconv::deconvolute(tibble.sclc1, "mcp_counter")

Running mcp_counter
Error in open.connection(file, "rt") :
Timeout was reached: [raw.githubusercontent.com] Operation timed out after 10987 milliseconds with 0 out of 0 bytes received

sessionInfo()

R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so_

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C LC_PAPER=C
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] tibble_2.1.3 immunedeconv_2.0.0 EPIC_1.1.5 tidyr_1.0.0 ggplot2_3.2.1 dplyr_0.8.3

loaded via a namespace (and not attached):
[1] Biobase_2.46.0 viridis_0.5.1 bit64_0.9-7 jsonlite_1.6 viridisLite_0.3.0 splines_3.6.0
[7] assertthat_0.2.1 stats4_3.6.0 blob_1.2.0 cellranger_1.1.0 pillar_1.4.2 RSQLite_2.1.2
[13] backports_1.1.5 lattice_0.20-38 limma_3.42.0 glue_1.3.1 quadprog_1.5-7 downloader_0.4
[19] digest_0.6.22 RColorBrewer_1.1-2 testit_0.10 colorspace_1.4-1 htmltools_0.4.0 preprocessCore_1.48.0
[25] Matrix_1.2-17 XML_3.98-1.20 lpSolve_5.6.13.3 pkgconfig_2.0.3 genefilter_1.68.0 DiagrammeR_1.0.1
[31] purrr_0.3.3 xtable_1.8-4 scales_1.0.0 brew_1.0-6 MCPcounter_1.1.0 BiocParallel_1.20.0
[37] annotate_1.64.0 mgcv_1.8-30 IRanges_2.20.0 influenceR_0.1.0 withr_2.1.2 BiocGenerics_0.32.0
[43] lazyeval_0.2.2 rgexf_0.15.3 readxl_1.3.1 survival_3.1-7 magrittr_1.5 crayon_1.3.4
[49] memoise_1.1.0 data.tree_0.7.8 nlme_3.1-141 MASS_7.3-51.4 Rook_1.1-1 tools_3.6.0
[55] hms_0.5.2 matrixStats_0.55.0 lifecycle_0.1.0 stringr_1.4.0 S4Vectors_0.24.0 munsell_0.5.0
[61] limSolve_1.5.5.3 AnnotationDbi_1.48.0 packrat_0.5.0 compiler_3.6.0 rlang_0.4.1 grid_3.6.0
[67] RCurl_1.95-4.12 rstudioapi_0.10 htmlwidgets_1.5.1 visNetwork_2.0.8 igraph_1.2.4.1 bitops_1.0-6
[73] gtable_0.3.0 curl_4.2 DBI_1.0.0 R6_2.4.0 gridExtra_2.3 bit_1.1-14
[79] zeallot_0.1.0 readr_1.3.1 stringi_1.4.3 parallel_3.6.0 sva_3.32.1 Rcpp_1.0.3
[85] vctrs_0.2.0 tidyselect_0.2.5 @grst

Batch correction on TPMs before analysis?

Hello,

I have some RNAseq data from different batches for which the TPMs have been generated and stored in matrix format. Is it necessary to do any sort of batch correction on these TPM values to be able to compare results between samples?

Thanks!

error when running xcell

Input is count matrix of RNAseq;
command: res = deconvolute(exprM, "xcell")

Running xcell
Error in xCell::xCellAnalysis(gene_expression_matrix, rnaseq = rnaseq, :
unused arguments (cell.types.use = cell_types_xcell, parallel.sz = config_env$xcell_cores)

Overview of new implementations

  1. MOUSE deconvolution
    Each function will return the results in the way they are given by the tool/algorithm
  • deconvolute_mMCPcounter: performs deconvolution with mMCP counter. Data will be log2 scaled by default (log2 = TRUE).
  • deconvolute_seqImmuCC: performs deconvolution with seqImmuCC. Cell fractions can be estimated with SVR-CIBERSORT or LLSR.
  • deconvolute_DCQ: performs deconvolution with DCQ through the ComICS package. The signature matrix is fixed. This function returns all the 207 cell types in the signature matrix. Since DCQ needs to scale the genes, in the default case the parameters are calculated on all samples. Users can also specify a reduced set of samples to consider. Users can specify the number of repeats the DCQ algorithm will make.
  • deconvolute_BASE: performs deconvolution with BASE algorithm. The immune cel compendium required is provided with the package. This function will return the scores for all the 135 cell types in the compendium. The "permutation" parameter can be specified since it affects the quality of estimates but also the runtime.
  • deconvolute_mouse: this function is a wrapper for the previous ones and will return the results in the same form (samples in columns, cell_type as first column). For DCQ and BASE cell types will be combined/reduced using the following functions to match the ones given by the other methods.
  • reduce_cell_type_DCQ: this function aggregates DCQ results
  • reduce_cell_type_BASE: this function aggregates BASE results by taking the median score
  • Maybe a function to convert mouse genes into human orthologous ones?

Files to be included:

  • BASE function + signature matrix (~ 30 MB)
  • seqImmuCC function + signature matrix
  • tables with prefixes to proper aggregate DCQ or BASE results
  • validation dataset (Wuaiping et al.)
  1. HUMAN deconvolution
  • deconvolute_ABIS: the code is adapted from the Shiny app
  • deconvolute_consensusTME

Help with TIMER deconvolution method

Hi everyone,

I'm trying to run the TIMER deconvolution method on a set of lung normal & tumor RNAseq data, using the following line:
res_timer = deconvolute( tpm , "timer" , indications = rep( "luad" , 116 ) )

However i get the following error:

>>> Running timer
## Enter batch mode


## Loading immune gene expression

[1] "Outlier genes: BANF1P4 FTL GAPDHP72 IGHG1 IGKC MALAT1 MIR6891 MT-ATP8 MT-CO3 RN7SK RN7SL1 RN7SL2 RN7SL3 RNU2-2P RPPH1 RPS26P5 SFTPC SNORD3A SPINK4"
## Removing the batch effect of C:\Users\SAVER~1.MAT\AppData\Local\Temp\RtmpiiOfyS\file3fb01d201503

Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : 
  'a' and 'b' must be finite

If i use the code to run TIMER, on two different datasets, the methods works fine.

Any idea of why this error is happening ?

Thanks in advance.

Best,

-Mathias

CIBERSORT error and strange results

Hi @grst,

I tried running the following code and got this error:

> res_cibersort = deconvolute(dataset_racle$expr_mat, "cibersort")

>>> Running cibersort
assertion failed: CIBERSORT.R is provided
Error: exists("cibersort_binary", envir = config_env) is not TRUE

But if I define the CIBERSORT.R script and the signature matrix, the function runs fine, but the output looks weird/truncated

cibersort_binary = "/path/to/CIBERSORT.R"
cibersort_mat = "/path/to/LM22.txt"

> res_cibersort = deconvolute(dataset_racle$expr_mat, "cibersort")

>>> Running cibersort
> res_cibersort 
# A tibble: 3 x 5
  cell_type   LAU125 LAU355 LAU1255 LAU1314
  <chr>        <dbl>  <dbl>   <dbl>   <dbl>
1 Monocyte   0.0607  0.0652 0.0895        0
2 Eosinophil 0.00293 0      0.0123        0
3 Neutrophil 0       0      0.00687       0

Do you have any suggestions on what might be causing this?

Thanks!

No object found while running deconvolute

Discussed in #74

Originally posted by andreselia September 1, 2021
Hi,
when running the deconvolute function, it appears that works well until an error occurred.
My data is "matrix_data" (with genes in rows and sample ids in columns)
Here is my code and what obtained:

res = deconvolute(matrix_data, method = "quantiseq")

Running quantiseq

Running quanTIseq deconvolution module

Gene expression normalization and re-annotation (arrays: FALSE)

Removing 17 noisy genes

Removing 15 genes with high expression in tumors

Signature genes found in data set: 135/138 (97.83%)

Mixture deconvolution (method: lsei)

Deconvolution sucessful!
Error in ---------------------------------------------------------------------------------------res = deconvolute(matrix_data, :
object 'res' not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.