Interpretation of T cell states using reference single-cell atlases

Overview

Interpretation of T cell states using reference single-cell atlases

ProjecTILs is a computational method to project scRNA-seq data into reference single-cell atlases, enabling their direct comparison in a stable, annotated system of coordinates.

In contrast to other methods, ProjecTILs allows not only accurately embedding new scRNA-seq data into a reference without altering its structure, but also characterizing previously unknown cell states that “deviate” from the reference. ProjecTILs accurately predicts the effects of cell perturbations and identifies gene programs that are altered in different conditions and tissues.

ProjecTILs_pipeline

ProjecTILs comes with ready-to-use reference T cell atlases for cancer and viral infection (see Reference Atlases), and can be also used with custom, user-generated references (see Building a custom reference atlas for ProjecTILs)

For real-life applications, check out our list of ProjecTILs Case Studies

Find the installation instructions for the package below, and a vignette detailing its functions at Tutorial (html) and Tutorial (repository)

If you prefer to avoid installing R packages, you can run ProjecTILs in Docker. A ready-to-use Docker image with usage instructions is available on DockerHub

Package Installation

To install ProjecTILs directly from its Git repository, run the following code from within R or RStudio:

if (!requireNamespace("remotes")) install.packages("remotes")
library(remotes)

if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")

if (!requireNamespace("Seurat", quietly = TRUE)) {
   install.packages("Seurat")
}

if (!requireNamespace("TILPRED", quietly = TRUE)) {
  install.packages(c("doParallel","doRNG"))
  BiocManager::install(c("AUCell","SingleCellExperiment"))
  remotes::install_github("carmonalab/TILPRED")
}

remotes::install_github("carmonalab/ProjecTILs")


Test the package

Load sample data and test your installation:

library(ProjecTILs)
data(query_example_seurat)

make.projection(query_example_seurat)

On your first run, the make.projection call will download the reference TIL atlas used as default map. This may take some time depending on your connection, but it is only necessary on the first run.

Data projection TUTORIAL

Find a step-by-step tutorial for ProjecTILs at: ProjecTILs tutorial

To run the code of the tutorial on your machine, download the demo repository: ProjecTILs tutorial repo or obtain a Docker image with all dependencies pre-installed.

For real-life applications, check out our list of ProjecTILs Case Studies

Documentation

See a description of the functions implemented in ProjecTILs at: ProjecTILs functions

Reference Atlases

Reference atlases are generated by comprehensive scRNA-seq multi-study integration and curation, and describe reference cell subtypes in a specific biological context.

Currently available atlases:

  • tumor-infiltrating T lymphocytes (TIL) atlas: consists of 16,803 high-quality single-cell transcriptomes from 25 samples (B16 melanoma and MC38 colon adenocarcinoma tumors) from six different studies. Available at: https://doi.org/10.6084/m9.figshare.12478571 and interactive iSEE web app http://TILatlas.unil.ch

  • acute and chronic viral infection CD8 T cell atlas: consists of 7,000 virus-specific CD8 T cells from 12 samples (spleen) from different timepoints (day 4.5, day 7/8 and day 30) from mice infected with lymphocytic choriomeningitis virus (LCMV) Arm (acute infection) or cl13 (chronic infection) strains. Available at: https://doi.org/10.6084/m9.figshare.12489518 and web app http://virustcellatlas.unil.ch/

If you wish to use your own custom reference atlas, follow this vignette to prepare it in a format that can be understood by ProjecTILs: Building a custom reference atlas for ProjecTILs

Troubleshooting

  • If a warning message prevented remotes from installing the package, try: Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")

  • For analyzing datasets composed of multiple batches (e.g. different subjects, technologies), we recommend projecting each batch separately, by providing ProjecTILs a list of Seurat objects as input, e.g.:

data.seurat.list <- SplitObject(data.seurat, split.by = "batch")
query.projected.list <- make.projection(data.seurat.list)
  • When using multi-core projection (ncores>1), you may have to increase the maximum allowed object size by setting the parameter future.maxSize, e.g. to allocate 5GB:
make.projection(query, ref, ncores=4, future.maxSize=5000)

Citation

Interpretation of T cell states from single-cell transcriptomics data using reference atlases Massimo Andreatta, Jesus Corria-Osorio, Soren Muller, Rafael Cubas, George Coukos, Santiago J Carmona. Nature Communications 12 Article number: 2965 (2021) - https://www.nature.com/articles/s41467-021-23324-4

Comments
  • predictTilState ERROR

    predictTilState ERROR

    Hi!

    Thanks for your package.

    I am trying to follow the following case study https://carmonalab.github.io/ProjecTILs_CaseStudies/SadeFeldman_ortho.html using my scRNAseq data (CD3+ T cells).

    However, when I run make.projection on my Seurat object I get the following error:

    Error in predictTilState(sce, human = human) : Too many genes not found In addition: Warning message: In predictTilState(sce, human = human) : The following genes were not found in the dataset provided CD2,CD3D,CD3E,CD247,LCK,CD8B,CD8A,CD4,...

    When I run: c("CD3D", "CD3E", "CD247", "LCK") %in% row.names(sobj) TRUE TRUE TRUE TRUE

    sobj here is my seurat object.

    I noticed that in the query_example_seurat the gene name format is with lower cases (eg "Cd3d"). However even if I change the format of my gene names I get the same error.

    Could you please help me?

    Thanks a lot

    Francesco

    opened by france-hub 8
  • Reference atlases with counts data

    Reference atlases with counts data

    Thanks again for this great package which is a great enrichment for the single cell RNA-seq community I think and helped me in better understanding T cell clusters.

    @mass-a Would it be possible to provide the full data of the reference atlases, that means including count data, variable genes etc. (e.g. via figashare)?

    The background is that with larger datasets integration via Seurat I have memory issues (with 64GB RAM available), plus it takes really long. Additionally, in several datasets integration fails with Error in idx[i, ] <- res[[i]][[1]]: number of items to replace is not a multiple of replacement length. I read issue 16, but in my dataset I have mostly T cells (between ~60-90% based on the filtering).

    full log of make.projection with a list with 5 T cell datasets and ref_TIL
    [1] "Using assay SCT for N_COVID_CSF"
    [1] "196 out of 1524 ( 13 % ) non-pure T cells removed.  Use filter.cells=FALSE to avoid pre-filtering (NOT RECOMMENDED)"
    [1] "Transforming expression matrix into space of mouse orthologs"
    [1] "Aligning N_COVID_CSF to reference map for batch-correction..."
    [1] "DIRECTLY projecting query onto Reference PCA space"
    [1] "DIRECTLY projecting query onto Reference UMAP space"
    [1] "Using assay SCT for PostCOVID_blood"
    [1] "1234 out of 3667 ( 34 % ) non-pure T cells removed.  Use filter.cells=FALSE to avoid pre-filtering (NOT RECOMMENDED)"
    [1] "Transforming expression matrix into space of mouse orthologs"
    [1] "Aligning PostCOVID_blood to reference map for batch-correction..."
    [1] "DIRECTLY projecting query onto Reference PCA space"
    [1] "DIRECTLY projecting query onto Reference UMAP space"
    Pre-filtering of T cells (TILPRED classifier)...
    Genes in the gene sets NOT available in the dataset: 
    	B.cell: 	6 (12% of 50)
    	CAF: 	12 (24% of 49)
    	Endo.: 	11 (24% of 46)
    	Macrophage: 	5 (11% of 46)
    	Mal: 	8 (18% of 45)
    Computing within dataset neighborhoods
    Finding all pairwise anchors
    Projecting new data onto SVD
    Projecting new data onto SVD
    Finding neighborhoods
    Finding anchors
    	Found 144 anchors
    Alignment failed due to: Error in idx[i, ] <- res[[i]][[1]]: number of items to replace is not a multiple of replacement length
     
    
    Warning: alignment of query dataset failed - Trying direct projection...
    Pre-filtering of T cells (TILPRED classifier)...
    Genes in the gene sets NOT available in the dataset: 
    	B.cell: 	6 (12% of 50)
    	CAF: 	12 (24% of 49)
    	Endo.: 	11 (24% of 46)
    	Macrophage: 	5 (11% of 46)
    	Mal: 	8 (18% of 45)
    Computing within dataset neighborhoods
    Finding all pairwise anchors
    Projecting new data onto SVD
    Projecting new data onto SVD
    Finding neighborhoods
    Finding anchors
    	Found 124 anchors
    Alignment failed due to: Error in idx[i, ] <- res[[i]][[1]]: number of items to replace is not a multiple of replacement length
     
    
    Warning: alignment of query dataset failed - Trying direct projection...
    [1] "Using assay SCT for PostCOVID_CSF"
    [1] "1497 out of 5878 ( 25 % ) non-pure T cells removed.  Use filter.cells=FALSE to avoid pre-filtering (NOT RECOMMENDED)"
    [1] "Transforming expression matrix into space of mouse orthologs"
    [1] "Aligning PostCOVID_CSF to reference map for batch-correction..."
    [1] "DIRECTLY projecting query onto Reference PCA space"
    [1] "DIRECTLY projecting query onto Reference UMAP space"
    [1] "Using assay SCT for IIH_CSF"
    [1] "1159 out of 4887 ( 24 % ) non-pure T cells removed.  Use filter.cells=FALSE to avoid pre-filtering (NOT RECOMMENDED)"
    [1] "Transforming expression matrix into space of mouse orthologs"
    [1] "Aligning IIH_CSF to reference map for batch-correction..."
    
    Projecting corrected query onto Reference PCA space
    [1] "Projecting corrected query onto Reference UMAP space"
    [1] "Using assay SCT for IIH_blood"
    [1] "1750 out of 8326 ( 21 % ) non-pure T cells removed.  Use filter.cells=FALSE to avoid pre-filtering (NOT RECOMMENDED)"
    [1] "Transforming expression matrix into space of mouse orthologs"
    [1] "Aligning IIH_blood to reference map for batch-correction..."
    
    Projecting corrected query onto Reference PCA space
    [1] "Projecting corrected query onto Reference UMAP space"
    Pre-filtering of T cells (TILPRED classifier)...
    Genes in the gene sets NOT available in the dataset: 
    	B.cell: 	6 (12% of 50)
    	CAF: 	12 (24% of 49)
    	Endo.: 	11 (24% of 46)
    	Macrophage: 	5 (11% of 46)
    	Mal: 	8 (18% of 45)
    Computing within dataset neighborhoods
    Finding all pairwise anchors
    Projecting new data onto SVD
    Projecting new data onto SVD
    Finding neighborhoods
    Finding anchors
    	Found 118 anchors
    Alignment failed due to: Error in idx[i, ] <- res[[i]][[1]]: number of items to replace is not a multiple of replacement length
     
    
    Warning: alignment of query dataset failed - Trying direct projection...
    Pre-filtering of T cells (TILPRED classifier)...
    Genes in the gene sets NOT available in the dataset: 
    	B.cell: 	6 (12% of 50)
    	CAF: 	12 (24% of 49)
    	Endo.: 	11 (24% of 46)
    	Macrophage: 	5 (11% of 46)
    	Mal: 	8 (18% of 45)
    Computing within dataset neighborhoods
    Finding all pairwise anchors
    Projecting new data onto SVD
    Projecting new data onto SVD
    Finding neighborhoods
    Finding anchors
    	Found 129 anchors
    Pre-filtering of T cells (TILPRED classifier)...
    Genes in the gene sets NOT available in the dataset: 
    	B.cell: 	6 (12% of 50)
    	CAF: 	12 (24% of 49)
    	Endo.: 	11 (24% of 46)
    	Macrophage: 	5 (11% of 46)
    	Mal: 	8 (18% of 45)
    Computing within dataset neighborhoods
    Finding all pairwise anchors
    Projecting new data onto SVD
    Projecting new data onto SVD
    Finding neighborhoods
    Finding anchors
    	Found 150 anchors
    
    
    sessionInfo [1] future.apply_1.8.1 future_1.22.1 ProjecTILs_1.0.0 Matrix_1.3-4 [5] TILPRED_1.0.2 umap_0.2.7.0 SeuratObject_4.0.2 Seurat_4.0.4 [9] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 [13] readr_2.0.2 tidyr_1.1.4 tibble_3.1.5 ggplot2_3.3.5 [17] tidyverse_1.3.1

    Therefore, I would like to use Harmony orSymphony which are much faster and need much less memory and are, in my experience, equally good or even better than Seurat integration ... although I am huge Seurat fan.

    Maybe you could also think about using Harmony or Symphony because I think your visualizations are unique ... but probably that would mean completely rewriting the package .. so it would be great if you could provide the entire full atlases so that users can use these reference atlases with other algorithms that need the count data/variable genes.

    Thank you, Mischko

    EDIT: When integrating selected CD8 clusters of different conditions (between 400-900 cells) (both with and witout filter) to the beautiful ref_LCMV_Atlas, they all fail with the same error: Error in idx[i, ] <- res[[i]][[1]]: number of items to replace is not a multiple of replacement length. I lowered seurat.k.filter = 20 without any effect.

    opened by mihem 6
  • An error in initial stages

    An error in initial stages

    Sorry I have used mine Seurat object for projection but I get this error

    > query.projected <- make.projection(cancer, ref=ref,human.ortho = T)
    [1] "Using assay RNA for query"
    Pre-filtering of T cells (TILPRED classifier)...
    Genes in the gene sets NOT available in the dataset: 
      B.cell: 	7 (14% of 50)
    CAF: 	2 (4% of 49)
    Endo.: 	5 (11% of 46)
    Macrophage: 	5 (11% of 46)
    Mal: 	1 (2% of 45)
    [1] "12566 out of 18338 ( 69 % ) non-pure T cells removed.  Use filter.cells=FALSE to avoid pre-filtering (NOT RECOMMENDED)"
    [1] "Transforming expression matrix into space of mouse orthologs"
    Performing log-normalization
    0%   10   20   30   40   50   60   70   80   90   100%
      [----|----|----|----|----|----|----|----|----|----|
         **************************************************|
         [1] "Aligning query to reference map for batch-correction..."
       |========================================================================================================| 100%
       Computing within dataset neighborhoods
       |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=07s  
       Finding all pairwise anchors
       |                                                  | 0 % ~calculating  Finding neighborhoods
       Finding anchors
       Found 616 anchors
       |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=09s  
       
       Projecting corrected query onto Reference PCA space
       [1] "Projecting corrected query onto Reference UMAP space"
       Warning message:
         In predictTilState(sce, human = human) :
         The following genes were not found in the dataset provided  NAPSB,NCF1C,IGLL5,NCF1B,ELK2AP,CYBASC3,IGJ,WISP2,CTGF,PTRF,CYR61,C10orf10,DARC,FAM26F,GPX1,CTSL1,IL8,SEPP1 . Doesn't look too bad but prediction performance might be affected.
    > query.projected
    An object of class Seurat 
    30365 features across 5772 samples within 2 assays 
    Active assay: integrated (707 features, 707 variable features)
     1 other assay present: RNA
     2 dimensional reductions calculated: pca, umap
    > cellstate.predict(ref=ref, query=query.projected)
    Error: $ operator not defined for this S4 class
    > plot.states.radar(ref, query=query.projected, min.cells = 20)
    Error in intI(j, n = [email protected][2], dn[[2]], give.dn = FALSE) : 
      'NA' indices are not (yet?) supported for sparse Matrices
    > 
    > 
    

    Any help please

    opened by beginner984 5
  • Cycling score

    Cycling score

    Dear authors,

    congrats on this awesome utility. I'm wondering if you have implemented the calculation of the cycling score on ProjectTILs as with TILPRED. I have not seen ProjectTILs return this value.

    Thanks for your time.

    Best,

    Juan L.

    opened by JLTrincado 4
  • Classes of existing metadata change upon projection

    Classes of existing metadata change upon projection

    Dear all,

    Thank you for developing ProjecTILs!

    While I am trying out your package, I noticed that classes of the existing metadata are changed after projection.

    ref = ProjecTILs::load.reference.map()
    sc_projectils = ProjecTILs::make.projection(sc, ref=ref, skip.normalize=TRUE)
    
    Screenshot 2021-08-17 at 10 40 19

    Maybe this is something you can fix?

    Best wishes and thanks a lot for your work! Katrin

    opened by ktrns 4
  • Error even when redoing the sample code

    Error even when redoing the sample code

    I run: `> library(ProjecTILs)

    ref <- load.reference.map() [1] "Loading Default Reference Atlas..." [1] "/home/ubuntu/TIL/ref_TILAtlas_mouse_v1.rds" [1] "Loaded Reference map ref_TILAtlas_mouse_v1" querydata <- ProjecTILs::query_example_seurat query.projected <- make.projection(querydata, ref=ref) [1] "Using assay RNA for query" Pre-filtering of T cells (TILPRED classifier)... Error in value[3L] : invalid subscript 'e' in 'altExp(, type="character", ...)': 'RNA' not in 'altExpNames()' But I got the error here.Error in value[3L] : invalid subscript 'e' in 'altExp(, type="character", ...)': 'RNA' not in 'altExpNames()' ` What should I do?

    opened by ilyiaZhao 4
  • 'RNA' not in 'altExpNames(<SingleCellExperiment>)  when filter.cells= TRUE

    'RNA' not in 'altExpNames() when filter.cells= TRUE

    If I follow the tutorial:

    library(ProjecTILs)
    ref <- load.reference.map()
    querydata <- ProjecTILs::query_example_seurat
    query.projected <- make.projection(querydata, ref = ref, filter.cells = TRUE)
    

    It interrupts with the following error:

    Error in value[[3L]](cond) : 
      invalid subscript 'e' in 'altExp(<SingleCellExperiment>, type="character", ...)':
      'RNA' not in 'altExpNames(<SingleCellExperiment>)'
    

    traceback:

    17: stop("invalid subscript '", substr, "' in '", funstr, "(<", class(x), 
            ">, type=\"character\", ...)':\n  ", "'", index, "' not in '", 
            namestr, "(<", class(x), ">)'")
    16: value[[3L]](cond)
    15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    14: tryCatchList(expr, classes, parentenv, handlers)
    13: tryCatch({
            internals[, index]
        }, error = function(err) {
            stop("invalid subscript '", substr, "' in '", funstr, "(<", 
                class(x), ">, type=\"character\", ...)':\n  ", "'", index, 
                "' not in '", namestr, "(<", class(x), ">)'")
        })
    12: .get_internal_character(x, e, getfun = int_colData, key = .alt_key, 
            funstr = "altExp", substr = "e", namestr = "altExpNames")
    11: .local(x, e, ...)
    10: altExp(x, name, withColData = withColData)
    9: altExp(x, name, withColData = withColData)
    8: SingleCellExperiment::swapAltExp(x = sce, name = assayn, saved = orig.exp.name)
    7: as.SingleCellExperiment.Seurat(query.object)
    6: as.SingleCellExperiment(query.object)
    5: filterCells(query, human = human.ortho)
    4: projection.helper(query = query.list[[i]], ref = ref, filter.cells = filter.cells, 
           query.assay = query.assay, direct.projection = direct.projection, 
           seurat.k.filter = seurat.k.filter, skip.normalize = skip.normalize, 
           id = names(query.list)[i])
    3: FUN(X[[i]], ...)
    2: lapply(X = 1:length(query.list), FUN = function(i) {
           res <- projection.helper(query = query.list[[i]], ref = ref, 
               filter.cells = filter.cells, query.assay = query.assay, 
               direct.projection = direct.projection, seurat.k.filter = seurat.k.filter, 
               skip.normalize = skip.normalize, id = names(query.list)[i])
           return(res)
       })
    1: make.projection(querydata, ref = ref, filter.cells = TRUE)
    

    If I turn of filter cells by setting filter.cells = FALSE, everything works fine.

    ProjecTILs_1.0.0 Matrix_1.3-3 TILPRED_1.0.2 umap_0.2.7.0 SeuratObject_4.0.1 Seurat_4.0.2

    opened by mihem 4
  • Error using docker images

    Error using docker images

    hello,

    Thank you very much for creating such great software !!!

    I download the images and run following the suggestions:

    docker run --rm -p 8787:8787 -e PASSWORD=pass mandrea1/projectils_demo:1.0.0
    remotes::install_github("carmonalab/UCell")
    

    But I met some erros:

    Error in file(filename, "r", encoding = encoding) : 
      cannot open the connection
    Calls: source -> file
    In addition: Warning message:
    In file(filename, "r", encoding = encoding) :
      cannot open file 'renv/activate.R': No such file or directory
    Execution halted
    ERROR: lazy loading failed for package ‘BiocGenerics’
    * removing ‘/home/rstudio/renv/library/R-4.0/x86_64-pc-linux-gnu/BiocGenerics’
    * installing *binary* package ‘bitops’ ...
    * DONE (bitops)
    * installing *source* package ‘GenomeInfoDbData’ ...
    ** using staged installation
    ** data
    ** inst
    ** help
    *** installing help indices
    ** building package indices
    Error in file(filename, "r", encoding = encoding) : 
      cannot open the connection
    Calls: source -> file
    In addition: Warning message:
    In file(filename, "r", encoding = encoding) :
      cannot open file 'renv/activate.R': No such file or directory
    Execution halted
    

    Best

    opened by bitcometz 3
  • Package test failed

    Package test failed

    Hi,

    I should also report that the test data failed as well.

    I should have mentioned that I am running R 4.2.0

    Thanks

    Output and error below:

    library(ProjecTILs) data(query_example_seurat)

    Run.ProjecTILs(query_example_seurat) [1] "Loading Default Reference Atlas..." [1] "/Seurat/ref_TILAtlas_mouse_v1.rds" [1] "Loaded Reference map ref_TILAtlas_mouse_v1" [1] "Using assay RNA for query" Pre-filtering cells with scGate... No scGate model specified: using default filter for T cells

    Detected a total of 34 non-pure cells for Target (2.27% of total)

    [1] "34 out of 1501 ( 2% ) non-pure cells removed. Use filter.cells=FALSE to avoid pre-filtering" Performing log-normalization 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| [1] "Aligning query to reference map for batch-correction..." |======================================================================| 100% Computing within dataset neighborhoods Finding all pairwise anchors Finding neighborhoods Finding anchors Found 645 anchors SD on anchor distances: 0.088

    Projecting corrected query onto Reference PCA space

    Projecting corrected query onto Reference UMAP space Error in cellstate.predict(ref = ref, query = x, reduction = reduction, : trying to get slot "misc" from an object of a basic class ("NULL") with no slots

    opened by gianfilippo 2
  • where to find the

    where to find the "functional.cluster"

    Somehow, ProjectTILs (version 3) doesn't return functional.cluster to the query after make.projection.

    query_example_seurat <- make.projection(query_example_seurat, ref=ref)
    plot.states.radar(query_example_seurat )
    Error: Cannot find 'functional.cluster' in this Seurat object
    
    names([email protected])
    [1] "Sample"             "Barcode"            "SampleLab"          "nCount_RNA"         "nFeature_RNA"       "cycling.score"     
    [7] "cycling.score.G1_S" "cycling.score.G2_M" "anchor.score"
    

    Has anyone encounter the same issue? Is there any way to fix it? Thank you in advance for any tips.

    opened by PingpingZheng 2
  • Error: BiocParallel errors

    Error: BiocParallel errors

    Hi,

    Thank you very much for this wonderful package. I follow the tutorial and use the example file provided to run the "make.projection" function.

    But I met this error:

    > ref <- load.reference.map()
    [1] "Loading Default Reference Atlas..."
    [1] "/sbgenomics/workspace/ref_TILAtlas_mouse_v1.rds"
    [1] "Loaded Reference map ref_TILAtlas_mouse_v1"
    
    > querydata <- ProjecTILs::query_example_seurat
    > query.projected <- make.projection(querydata, ref=ref)
    
    Error: BiocParallel errors
      1 remote errors, element index: 1
      0 unevaluated and other errors
      first remote error: worker evaluation failed:
      option type has NULL value
    

    Here is my session info.

    R version 4.1.2 (2021-11-01) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.3 LTS

    Matrix products: default BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so

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

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

    other attached packages: [1] SingleCellExperiment_1.16.0 SummarizedExperiment_1.24.0 GenomicRanges_1.46.1
    [4] GenomeInfoDb_1.30.0 IRanges_2.28.0 S4Vectors_0.32.3
    [7] MatrixGenerics_1.6.0 matrixStats_0.61.0 GEOquery_2.62.2
    [10] Biobase_2.54.0 BiocGenerics_0.40.0 ProjecTILs_2.2.1
    [13] pracma_2.3.6 ggplot2_3.3.5 gridExtra_2.3
    [16] BiocParallel_1.28.3 Matrix_1.4-0 umap_0.2.7.0
    [19] scGate_1.0.2 reshape2_1.4.4 ggridges_0.5.3
    [22] patchwork_1.1.1 dplyr_1.0.7 data.table_1.14.2
    [25] SeuratObject_4.0.4 Seurat_4.0.6 UCell_1.3.1

    loaded via a namespace (and not attached): [1] plyr_1.8.6 igraph_1.2.10 lazyeval_0.2.2
    [4] splines_4.1.2 listenv_0.8.0 scattermore_0.7
    [7] digest_0.6.29 htmltools_0.5.2 fansi_1.0.2
    [10] magrittr_2.0.1 tensor_1.5 cluster_2.1.2
    [13] ROCR_1.0-11 tzdb_0.2.0 limma_3.50.0
    [16] remotes_2.4.2 globals_0.14.0 readr_2.1.1
    [19] askpass_1.1 spatstat.sparse_2.1-0 prettyunits_1.1.1
    [22] colorspace_2.0-2 ggrepel_0.9.1 xfun_0.29
    [25] RCurl_1.98-1.5 callr_3.7.0 crayon_1.4.2
    [28] jsonlite_1.7.3 spatstat.data_2.1-2 survival_3.2-13
    [31] zoo_1.8-9 glue_1.6.0 polyclip_1.10-0
    [34] gtable_0.3.0 zlibbioc_1.40.0 XVector_0.34.0
    [37] leiden_0.3.9 DelayedArray_0.20.0 pkgbuild_1.3.1
    [40] future.apply_1.8.1 abind_1.4-5 scales_1.1.1
    [43] DBI_1.1.2 miniUI_0.1.1.1 Rcpp_1.0.8
    [46] viridisLite_0.4.0 xtable_1.8-4 reticulate_1.22
    [49] spatstat.core_2.3-2 htmlwidgets_1.5.4 httr_1.4.2
    [52] RColorBrewer_1.1-2 ellipsis_0.3.2 ica_1.0-2
    [55] pkgconfig_2.0.3 farver_2.1.0 uwot_0.1.11
    [58] deldir_1.0-6 utf8_1.2.2 tidyselect_1.1.1
    [61] labeling_0.4.2 rlang_0.4.12 later_1.3.0
    [64] munsell_0.5.0 tools_4.1.2 cli_3.1.1
    [67] generics_0.1.1 evaluate_0.14 stringr_1.4.0
    [70] fastmap_1.1.0 yaml_2.2.1 goftest_1.2-3
    [73] processx_3.5.2 knitr_1.37 fitdistrplus_1.1-6
    [76] purrr_0.3.4 RANN_2.6.1 pbapply_1.5-0
    [79] future_1.23.0 nlme_3.1-155 mime_0.12
    [82] xml2_1.3.3 compiler_4.1.2 rstudioapi_0.13
    [85] plotly_4.10.0 curl_4.3.2 png_0.1-7
    [88] spatstat.utils_2.3-0 tibble_3.1.6 stringi_1.7.6
    [91] ps_1.6.0 RSpectra_0.16-0 lattice_0.20-45
    [94] vctrs_0.3.8 pillar_1.6.4 lifecycle_1.0.1
    [97] BiocManager_1.30.16 spatstat.geom_2.3-1 lmtest_0.9-39
    [100] RcppAnnoy_0.0.19 bitops_1.0-7 cowplot_1.1.1
    [103] irlba_2.3.5 httpuv_1.6.4 R6_2.5.1
    [106] promises_1.2.0.1 KernSmooth_2.23-20 parallelly_1.30.0
    [109] codetools_0.2-18 MASS_7.3-55 assertthat_0.2.1
    [112] openssl_1.4.6 rprojroot_2.0.2 withr_2.4.3
    [115] sctransform_0.3.2 GenomeInfoDbData_1.2.7 mgcv_1.8-38
    [118] parallel_4.1.2 hms_1.1.1 grid_4.1.2
    [121] rpart_4.1-15 tidyr_1.1.4 rmarkdown_2.11
    [124] Rtsne_0.15 shiny_1.7.1

    Any help would be appreciated.

    Thank you very much.

    opened by fang-yulo 2
  • unable to install scGate or ProjecTILs libraries

    unable to install scGate or ProjecTILs libraries

    Hi, I have been trying to install these libraries into R-Studio, but I keep getting the following errors:

    remotes::install_github("carmonalab/scGate") Downloading GitHub repo carmonalab/[email protected] These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

    1: All
    2: CRAN packages only
    3: None
    4: stringi (1.7.6 -> 1.7.8) [CRAN]

    Enter one or more numbers, or an empty line to skip updates: 1 stringi (1.7.6 -> 1.7.8) [CRAN] Skipping 1 packages not available: UCell Installing 2 packages: stringi, UCell Installing packages into ‘C:/Users/ashka/Documents/renv/library/R-4.1/x86_64-w64-mingw32’ (as ‘lib’ is unspecified)

    There is a binary version available but the source version is later: binary source needs_compilation stringi 1.7.6 1.7.8 TRUE

    Binaries will be installed trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.1/stringi_1.7.6.zip' Content type 'application/zip' length 16449819 bytes (15.7 MB) downloaded 15.7 MB

    package ‘stringi’ successfully unpacked and MD5 sums checked

    The downloaded binary packages are in C:\Users\ashka\AppData\Local\Temp\Rtmpc50GBN\downloaded_packages Running R CMD build...

    • checking for file 'C:\Users\ashka\AppData\Local\Temp\Rtmpc50GBN\remotes73b047e96ee2\carmonalab-scGate-1b23084/DESCRIPTION' ... OK
    • preparing 'scGate':
    • checking DESCRIPTION meta-information ... OK
    • checking for LF line-endings in source and make files and shell scripts
    • checking for empty or unneeded directories
    • building 'scGate_1.2.0.tar.gz' Installing package into ‘C:/Users/ashka/Documents/renv/library/R-4.1/x86_64-w64-mingw32’ (as ‘lib’ is unspecified) ERROR: dependency 'UCell' is not available for package 'scGate'
    • removing 'C:/Users/ashka/Documents/renv/library/R-4.1/x86_64-w64-mingw32/scGate' Warning messages: 1: In untar2(tarfile, files, list, exdir, restore_times) : skipping pax global extended headers 2: In untar2(tarfile, files, list, exdir, restore_times) : skipping pax global extended headers 3: package ‘UCell’ is not available for this version of R

    A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages 4: In i.p(...) : installation of package ‘C:/Users/ashka/AppData/Local/Temp/Rtmpc50GBN/file73b0491424d0/scGate_1.2.0.tar.gz’ had non-zero exit status

    remotes::install_github("carmonalab/ProjecTILs") Downloading GitHub repo carmonalab/[email protected] These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

    1: All
    2: CRAN packages only
    3: None
    4: stringi (1.7.6 -> 1.7.8) [CRAN]

    Enter one or more numbers, or an empty line to skip updates: Running R CMD build...

    • checking for file 'C:\Users\ashka\AppData\Local\Temp\Rtmpc50GBN\remotes73b014782336\carmonalab-ProjecTILs-370abd8/DESCRIPTION' ... OK
    • preparing 'ProjecTILs':
    • checking DESCRIPTION meta-information ... OK
    • checking for LF line-endings in source and make files and shell scripts
    • checking for empty or unneeded directories
    • building 'ProjecTILs_3.0.0.tar.gz' Installing package into ‘C:/Users/ashka/Documents/renv/library/R-4.1/x86_64-w64-mingw32’ (as ‘lib’ is unspecified) ERROR: dependencies 'UCell', 'scGate' are not available for package 'ProjecTILs'
    • removing 'C:/Users/ashka/Documents/renv/library/R-4.1/x86_64-w64-mingw32/ProjecTILs' Warning messages: 1: In untar2(tarfile, files, list, exdir, restore_times) : skipping pax global extended headers 2: In untar2(tarfile, files, list, exdir, restore_times) : skipping pax global extended headers 3: In i.p(...) : installation of package ‘C:/Users/ashka/AppData/Local/Temp/Rtmpc50GBN/file73b07ff54eff/ProjecTILs_3.0.0.tar.gz’ had non-zero exit status

    I have been able to successfully install the packages on another computer a few months ago, so I'm not sure what the problem is now. Can someone help me with this? Thanks!

    opened by ashkanshahbandi 3
  • ProjecTILs::Hs2Mm.convert.table generation

    ProjecTILs::Hs2Mm.convert.table generation

    Dear all,

    really exciting package to me! I am now exploring its functionalities. I am checking arbitrary details of the functions and I wonder: How to generate a conversion table for mouse <----> human gene orthologs elegantly? Did you do it with Biomart, somehow?

    I just noticed that ZNF683 (human) is not included in the default table but a mouse ortholog is described: Znf683. I did not conduct a systematic check for a large number of genes, yet. Maybe the table is just outdated. So I wonder how generate my own. I found this one on GitHub: https://github.com/vitkl/orthologsBioMART.

    But anyhow: How did you generate your table? Can you tell us?

    Thanks, yours, Chris.

    opened by Close-your-eyes 3
  • Enhancement: Comparing reference labels with custom labels

    Enhancement: Comparing reference labels with custom labels

    Great tool! Annotating T cells is really hard and this tool is really helpful especially because it also provides a reference atlas. However, I am missing a function that allows a comparison between custom labels of the query dataset and the labels of the reference dataset. Although plot.projection shows you where your cells are located, it does not allow a direct comparison between custom labels of the query dataset and the labels of the reference atlas.

    A very easy solution would be a heatmap showing reference annotation as columns and your labels as rows. If your labels are stored in [email protected]$cluster:

    table(query.projected$cluster, query.projected$functional.cluster) |>
        pheatmap::pheatmap(scale = "row")
    
    enhancement 
    opened by mihem 0
Releases(v3.0.0)
  • v3.0.0(Sep 13, 2022)

    ProjecTILs version 3.0

    New in this version:

    • new function make.reference for easy conversion of custom Seurat objects into reference maps for ProjecTILs. See custom map tutorial for an example (not T cells this time :))
    • new function Run.ProjecTILs as a wrapper for projection (make.projection) and cell type prediction (cell.states.predict).
    • new function ProjecTILs.classifier to transfer labels to query without altering the embeddings of the query dataset
    • new split.by option in Run.ProjecTILs and ProjecTILs.classifier to split datasets by a grouping variable (normally the sample or the sequencing batch) before projection; results are then re-merged after projection into a single object.
    • new function recalculate.embeddings to recompute PCA and/or UMAP after projection, accounting for both reference and query cells. This may be used as a way to update a reference when a query dataset contains a novel cell type / cell state.
    • updates to the projection algorithm to use batch-effect correction as in STACAS-2.0. This includes anchor weighting based on rPCA distance, and STACAS.k.weight="max" by default, which disables local re-weighting of integration anchors.
    • support for uwot for UMAP embeddings in new references generated with make.reference; the projection algorithm automatically detects which algorithm was used for reference building and applies the same method for query data embedding. NOTE: there are known issues with saving uwot models to .rds files (see e.g. this issue) - the default method in ProjecTILs remains umap until this issue is solved.
    • allow plotting signature scores on radar plots. Set using meta4radar parameter in plot.states.radar function.
    • keep specified order of genes in plot.states.radar (previously was automatically reordered alphabetically)
    • exposing function merge.Seurat.embeddings (previously available as internal function): a utility function that merges two Seurat objects as well as their low dimensional embeddings
    • allow specifying a custom list of genes to find.discriminant.genes, e.g. to exclude pseudo-genes or ribosomal genes from DEG analysis
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Oct 15, 2021)

    ProjecTILs version 2.0

    New in this version:

    • Allow reference atlases to be for mouse or human, and for any cell type. See for example APC reference
    • Automatic pre-filtering of cell types represented in the atlas using scGate. This replaces the automatic filtering by TILPRED. Atlas objects should contain a scGate model in the slot [email protected]$scGate, otherwise a default T cell filter is applied.
    • Cell cycling scores are now calculated using UCell and the signatures from Tirosh et al. (2016) for the G1/S and G2/M phases.
    • Remove dependency from TILPRED
    • Implement fast.mode option for projection, which by-passes umap::umap.predict. This is faster and allows using reference atlases built with other methods than the umap package.
    • Fix some issues with meta.data classes, and remove 'Q_' prefix from barcodes of projected cells, as documented in issue #17
    • More flexible implementation for reading 10x files
    • Update table of mouse-human orthologs to include some genes that were missing (e.g. Lamp3 = LAMP3; H2-Aa = HLA-DQA)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(May 17, 2021)

    New in version 1.0.0:

    • Speed up execution time by parallelizing projection of multiple samples (requires future.apply)
    • Auto-detection of human or mouse data. Option human.ortho is now deprecated
    • Read color palette stored with atlas object, if available
    • Improved handling of separators for raw matrix formats in read.sc.query function
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Jan 6, 2021)

    • Implements differential expression analysis on specific cell states
    • Try/catch for projecting a list of objects
    • Internal merge function that preserves embeddings
    • Improved error handing
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Sep 7, 2020)

Owner
Cancer Systems Immunology Lab
At Ludwig Cancer Research Lausanne and Department of Oncology, University of Lausanne & Swiss Institute of Bioinformatics
Cancer Systems Immunology Lab
Self-Supervised Learning of Event-based Optical Flow with Spiking Neural Networks

Self-Supervised Learning of Event-based Optical Flow with Spiking Neural Networks Work accepted at NeurIPS'21 [paper, video]. If you use this code in

TU Delft 43 Dec 07, 2022
Learning recognition/segmentation models without end-to-end training. 40%-60% less GPU memory footprint. Same training time. Better performance.

InfoPro-Pytorch The Information Propagation algorithm for training deep networks with local supervision. (ICLR 2021) Revisiting Locally Supervised Lea

78 Dec 27, 2022
Code reproduce for paper "Vehicle Re-identification with Viewpoint-aware Metric Learning"

VANET Code reproduce for paper "Vehicle Re-identification with Viewpoint-aware Metric Learning" Introduction This is the implementation of article VAN

EMDATA-AILAB 23 Dec 26, 2022
A heterogeneous entity-augmented academic language model based on Open Academic Graph (OAG)

Library | Paper | Slack We released two versions of OAG-BERT in CogDL package. OAG-BERT is a heterogeneous entity-augmented academic language model wh

THUDM 58 Dec 17, 2022
OMAMO: orthology-based model organism selection

OMAMO: orthology-based model organism selection OMAMO is a tool that suggests the best model organism to study a biological process based on orthologo

Dessimoz Lab 5 Apr 22, 2022
SparseML is a libraries for applying sparsification recipes to neural networks with a few lines of code, enabling faster and smaller models

SparseML is a toolkit that includes APIs, CLIs, scripts and libraries that apply state-of-the-art sparsification algorithms such as pruning and quantization to any neural network. General, recipe-dri

Neural Magic 1.5k Dec 30, 2022
AoT is a system for automatically generating off-target test harness by using build information.

AoT: Auto off-Target Automatically generating off-target test harness by using build information. Brought to you by the Mobile Security Team at Samsun

Samsung 10 Oct 19, 2022
An Implicit Function Theorem (IFT) optimizer for bi-level optimizations

iftopt An Implicit Function Theorem (IFT) optimizer for bi-level optimizations. Requirements Python 3.7+ PyTorch 1.x Installation $ pip install git+ht

The Money Shredder Lab 2 Dec 02, 2021
RATCHET is a Medical Transformer for Chest X-ray Diagnosis and Reporting

RATCHET: RAdiological Text Captioning for Human Examined Thoraxes RATCHET is a Medical Transformer for Chest X-ray Diagnosis and Reporting. Based on t

26 Nov 14, 2022
Code and description for my BSc Project, September 2021

BSc-Project Disclaimer: This repo consists of only the additional python scripts necessary to run the agent. To run the project on your own personal d

Matin Tavakoli 20 Jul 19, 2022
Code for the ICML 2021 paper: "ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision"

ViLT Code for the paper: "ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision" Install pip install -r requirements.txt pip

Wonjae Kim 922 Jan 01, 2023
Hierarchical Memory Matching Network for Video Object Segmentation (ICCV 2021)

Hierarchical Memory Matching Network for Video Object Segmentation Hongje Seong, Seoung Wug Oh, Joon-Young Lee, Seongwon Lee, Suhyeon Lee, Euntai Kim

Hongje Seong 72 Dec 14, 2022
Taichi Course Homework Template

太极图形课S1-标题部分 这个作业未来或将是你的开源项目,标题的内容可以来自作业中的核心关键词,让读者一眼看出你所完成的工作/做出的好玩demo 如果暂时未想好,起名时可以参考“太极图形课S1-xxx作业” 如下是作业(项目)展开说明的方法,可以帮大家理清思路,并且也对读者非常友好,请小伙伴们多多参

TaichiCourse 30 Nov 19, 2022
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation

[ICCV2021] TransReID: Transformer-based Object Re-Identification [pdf] The official repository for TransReID: Transformer-based Object Re-Identificati

DamoCV 569 Dec 30, 2022
Official repo for QHack—the quantum machine learning hackathon

Note: This repository has been frozen while we consider the submissions for the QHack Open Hackathon. We hope you enjoyed the event! Welcome to QHack,

Xanadu 118 Jan 05, 2023
The official GitHub repository for the Argoverse 2 dataset.

Argoverse 2 API Official GitHub repository for the Argoverse 2 family of datasets. If you have any questions or run into any problems with either the

Argo AI 156 Dec 23, 2022
[ICCV 2021] Official Pytorch implementation for Discriminative Region-based Multi-Label Zero-Shot Learning SOTA results on NUS-WIDE and OpenImages

Discriminative Region-based Multi-Label Zero-Shot Learning (ICCV 2021) [arXiv][Project page coming soon] Sanath Narayan*, Akshita Gupta*, Salman Kh

Akshita Gupta 54 Nov 21, 2022
Efficient Lottery Ticket Finding: Less Data is More

The lottery ticket hypothesis (LTH) reveals the existence of winning tickets (sparse but critical subnetworks) for dense networks, that can be trained in isolation from random initialization to match

VITA 20 Sep 04, 2022
Pytorch implementation of the paper Progressive Growing of Points with Tree-structured Generators (BMVC 2021)

PGpoints Pytorch implementation of the paper Progressive Growing of Points with Tree-structured Generators (BMVC 2021) Hyeontae Son, Young Min Kim Pre

Hyeontae Son 9 Jun 06, 2022
Semi-Supervised Signed Clustering Graph Neural Network (and Implementation of Some Spectral Methods)

SSSNET SSSNET: Semi-Supervised Signed Network Clustering For details, please read our paper. Environment Setup Overview The project has been tested on

Yixuan He 9 Nov 24, 2022