[{"path":"/articles/GeneSetScore.html","id":"create-spacet-object","dir":"Articles","previous_headings":"","what":"Create SpaCET object","title":"Gene set score calculation","text":"read ST data R, user can create SpaCET object using create.SpaCET.object create.SpaCET.object.10X. Specifically, users analyzing ST dataset 10x Visium, need input “visiumPath” using create.SpaCET.object.10X. Please make sure “visiumPath” points standard output folders 10x Space Ranger, “filtered_feature_bc_matrix” “spatial” folders.","code":"library(SpaCET)  # set the path to the in-house breast cancer ST data. User can set the paths to their own data. visiumPath <- file.path(system.file(package = \"SpaCET\"), \"extdata/Visium_BC\")  # load ST data to create an SpaCET object. SpaCET_obj <- create.SpaCET.object.10X(visiumPath = visiumPath)  # calculate the QC metrics SpaCET_obj <- SpaCET.quality.control(SpaCET_obj)"},{"path":"/articles/GeneSetScore.html","id":"calculate-hallmark-score","dir":"Articles","previous_headings":"","what":"Calculate hallmark score","title":"Gene set score calculation","text":"-house 50 hallmark gene sets collected MSigDB user just need set GeneSets “Hallmark”. SpaCET.GeneSetScore call UCell package calculate gene set score. results stored SpaCET_obj@results$GeneSetScore matrix.","code":"# run gene set calculation SpaCET_obj <- SpaCET.GeneSetScore(SpaCET_obj, GeneSets=\"Hallmark\")  # show results SpaCET_obj@results$GeneSetScore[1:6,1:6]  # show all gene sets rownames(SpaCET_obj@results$GeneSetScore)  # visualize two gene sets SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"GeneSetScore\",    spatialFeatures = c(\"HALLMARK_HYPOXIA\",\"HALLMARK_TGF_BETA_SIGNALING\") )"},{"path":"/articles/GeneSetScore.html","id":"calculate-cancer-cell-state-score","dir":"Articles","previous_headings":"","what":"Calculate cancer cell state score","title":"Gene set score calculation","text":"recent study identifies catalog gene modules whose expression defines 16 recurrent cancer cell states pan-caner single-cell RNA-sequencing analysis. order use , user just need set GeneSets “CancerCellState”.","code":"# run gene set calculation SpaCET_obj <- SpaCET.GeneSetScore(SpaCET_obj, GeneSets=\"CancerCellState\")  # show all gene sets rownames(SpaCET_obj@results$GeneSetScore)  # visualize two gene sets SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"GeneSetScore\",    spatialFeatures = c(\"CancerCellState_Cycle\",\"CancerCellState_cEMT\") )"},{"path":"/articles/GeneSetScore.html","id":"calculate-tls-score","dir":"Articles","previous_headings":"","what":"Calculate TLS score","title":"Gene set score calculation","text":"User just need set GeneSets “TLS” calculate tertiary lymphoid structure score. collected 30-gene TLS signature study.","code":"# run gene set calculation SpaCET_obj <- SpaCET.GeneSetScore(SpaCET_obj, GeneSets=\"TLS\")  # visualize TLS SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"GeneSetScore\",    spatialFeatures = c(\"TLS\") )"},{"path":"/articles/GeneSetScore.html","id":"calculate-other-gene-sets-score","dir":"Articles","previous_headings":"","what":"Calculate other gene sets’ score","title":"Gene set score calculation","text":"two methods build customized gene sets. 1) Generate list define simple gene sets (e.g., T cell Myeloid signatures). 2) Download gmt file MSigDB (e.g., GO Ontology), use read.gmt read file list.","code":"# 1) gmt1 <- list(   Tcell = c(\"CD2\",\"CD3E\",\"CD3D\"),    Myeloid = c(\"SPI1\",\"FCER1G\",\"CSF1R\") ) SpaCET_obj <- SpaCET.GeneSetScore(SpaCET_obj, GeneSets = gmt1)  # 2) gmt2 <- read.gmt(\"Path_to_gmt_file\") SpaCET_obj <- SpaCET.GeneSetScore(SpaCET_obj, GeneSets = gmt2)"},{"path":"/articles/oldST_PDAC.html","id":"create-spacet-object","dir":"Articles","previous_headings":"","what":"Create SpaCET object","title":"Deconvolution with a matched scRNA-seq data set","text":"read ST data R, user can create SpaCET object using create.SpaCET.object create.SpaCET.object.10X. Specifically, users analyzing ST dataset 10x Visium, need input “visiumPath” using create.SpaCET.object.10X. Please make sure “visiumPath” points standard output folders 10x SpaCET Ranger, “filtered_feature_bc_matrix” “spatial” folders. , since PDAC ST data set generated original ST technology, user need create.SpaCET.object create SpaCET object preparing four types input data referring tumor ST dataset. spatial transcriptomics count data. spatial transcriptomics count data must format matrix gene name (row) x spot ID (column). spatial location information. spot coordinates format matrix spot ID (row) x coordinates (column). 1st 2nd columns represent X Y coordinates, respectively. path H&E image file. image path can NA unavailable. platform","code":"library(SpaCET)  PDAC_Path <- system.file(\"extdata\", 'oldST_PDAC', package = 'SpaCET') load(paste0(PDAC_Path,\"/st_PDAC.rda\"))  # show count matrix counts[1:6,1:5]  ##        10x10 10x13 10x14 10x15 10x16 ## A1CF       0     0     0     0     0 ## A2M       13     0     4     0     0 ## A4GALT     1     0     0     0     0 ## A4GNT      0     0     1     0     0 ## AAAS       0     0     0     0     0 ## AACS       0     0     0     0     0  # show coordinate matrix spotCoordinates[1:5,]  ##        X  Y ## 10x10 10 10 ## 10x13 10 13 ## 10x14 10 14 ## 10x15 10 15 ## 10x16 10 16  # load ST data to create an SpaCET object. SpaCET_obj <- create.SpaCET.object(   counts=counts,   spotCoordinates=spotCoordinates,   imagePath=NA,   platform = \"oldST\" )  # show this object. str(SpaCET_obj)"},{"path":"/articles/oldST_PDAC.html","id":"deconvolve-cell-lineage","dir":"Articles","previous_headings":"","what":"Deconvolve cell lineage","title":"Deconvolution with a matched scRNA-seq data set","text":"provide SpaCET.deconvolution.matched.scRNAseq deconvolve SpaCET object customized scRNA-seq data. User need prepare three types input data referring matched scRNA-seq dataset. single cell RNA-seq (scRNA-seq) count data. scRNA-seq count data must format matrix gene name (row) x cell ID (column). cell annotation information. matrix include two columns, ,e., cellID cellType. row represents single cell. name row column cellID. Hierarchical tree cell types. organized using list, name element major lineages value elements corresponding sublineages. major lineage sublineages, value major lineage . , user can run SpaCET.deconvolution.matched.scRNAseq carry cell type deconvolution.  User can use following code visualize marker gene expression level verify cell type deconvolution.","code":"# load sc data PDAC_Path <- system.file(\"extdata\", 'oldST_PDAC', package = 'SpaCET') load(paste0(PDAC_Path,\"/sc_PDAC.rda\"))  # show count matrix sc_counts[1:6,1:5]  ##         c1 c2 c3 c4 c5 ## A1BG     0  0  0  0  0 ## A1CF     0  0  0  1  0 ## A2M      0  0  0  0  0 ## A2ML1    0  0  0  0  0 ## A3GALT2  0  0  0  0  0 ## A4GALT   0  0  0  0  0  # show cell annotation matrix sc_annotation[1:6,]  ##    cellID bio_celltype                             ## c1 \"c1\"   \"Acinar cells\"                           ## c2 \"c2\"   \"Ductal - terminal ductal like\"          ## c3 \"c3\"   \"Ductal - terminal ductal like\"          ## c4 \"c4\"   \"Ductal - CRISP3 high/centroacinar like\" ## c5 \"c5\"   \"Cancer clone A\"                         ## c6 \"c6\"   \"Cancer clone A\"   # show cell type lineage tree head(sc_lineageTree)  ## $Cancer ## [1] \"Cancer clone A\" \"Cancer clone B\" ##  ## $Ductal ## [1] \"Ductal - APOL1 high/hypoxic\"            \"Ductal - CRISP3 high/centroacinar like\" ## [3] \"Ductal - MHC Class II\"                  \"Ductal - terminal ductal like\"          ##  ## $Macrophage ## [1] \"Macrophages A\" \"Macrophages B\" ##  ## $mDC ## [1] \"mDCs A\" \"mDCs B\" ##  ## $`Acinar cells` ## [1] \"Acinar cells\" ##  ## $`Endocrine cells` ## [1] \"Endocrine cells\" SpaCET_obj <- SpaCET.deconvolution.matched.scRNAseq(   SpaCET_obj,    sc_counts=sc_counts,    sc_annotation=sc_annotation,    sc_lineageTree=sc_lineageTree,    coreNo=8 )  SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"CellFraction\",   spatialFeatures = c(\"Cancer clone A\",\"Cancer clone B\",\"Acinar cells\",\"Ductal - CRISP3 high/centroacinar like\"),   nrow=2 ) # Markers for cancer clone A and B, acinar cell, and centroacinar like ductal cell SpaCET.visualize.spatialFeature(   SpaCET_obj,   spatialType = \"GeneExpression\",   spatialFeatures = c(\"TM4SF1\",\"S100A4\",\"PRSS1\",\"CRISP3\"),   nrow=2 )"},{"path":"/articles/oldST_PDAC.html","id":"extand-this-function-module","dir":"Articles","previous_headings":"","what":"Extand this function module","title":"Deconvolution with a matched scRNA-seq data set","text":"Although tutorials focus analyzing ST data tumor samples, principle, SpaCET can applied ST datasets matched scRNA-seq data.","code":""},{"path":"/articles/visium_BC.html","id":"create-spacet-object","dir":"Articles","previous_headings":"","what":"Create SpaCET object","title":"Cell type deconvolution and interaction analysis","text":"read ST data R, user can create SpaCET object using create.SpaCET.object create.SpaCET.object.10X. Specifically, users analyzing ST dataset 10x Visium, need input “visiumPath” using create.SpaCET.object.10X. Please make sure “visiumPath” points standard output folders 10x Space Ranger, “filtered_feature_bc_matrix” “spatial” folders. , create SpaCET object current breast cancer visium dataset. step, duplicated gene symbols, gene highest total counts remains duplicated genes removed. UMI count matrix stored SpaCET_obj@input$counts sparse matrix. row represents gene whereas column spot.","code":"library(SpaCET)  # set the path to the in-house breast cancer ST data. User can set the paths to their own data. visiumPath <- file.path(system.file(package = \"SpaCET\"), \"extdata/Visium_BC\")  # load ST data to create an SpaCET object. SpaCET_obj <- create.SpaCET.object.10X(visiumPath = visiumPath)  # show this object. str(SpaCET_obj) # show this object. SpaCET_obj@input$counts[1:8,1:6] ## 8 x 6 sparse Matrix of class \"dgCMatrix\" ##             50x102 59x19 14x94 47x13 73x43 61x97 ## MIR1302-2HG      .     .     .     .     .     . ## FAM138A          .     .     .     .     .     . ## OR4F5            .     .     .     .     .     . ## AL627309.1       .     .     .     .     .     1 ## AL627309.3       .     .     .     .     .     . ## AL627309.2       .     .     .     .     .     . ## AL627309.4       .     .     .     .     .     . ## AL732372.1       .     .     .     .     .     ."},{"path":"/articles/visium_BC.html","id":"show-key-quality-control-metrics","dir":"Articles","previous_headings":"","what":"Show key quality control metrics","title":"Cell type deconvolution and interaction analysis","text":"creating SpaCET object, can use SpaCET.visualize.spatialFeature show UMI gene counts across ST spots, respectively. Specifically, “UMI” option presents overall UMI counts within spot “Gene” option represents number expressed genes (.e., genes least one UMI count) particular spot.","code":"# calculate the QC metrics SpaCET_obj <- SpaCET.quality.control(SpaCET_obj)  # plot the QC metrics SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"QualityControl\",    spatialFeatures=c(\"UMI\",\"Gene\"),   imageBg = TRUE )"},{"path":"/articles/visium_BC.html","id":"deconvolve-st-data","dir":"Articles","previous_headings":"","what":"Deconvolve ST data","title":"Cell type deconvolution and interaction analysis","text":"two stages, SpaCET.deconvolution deconvolve mixtures ST spots malignant, immune, stromal cells. SpaCET first estimates malignant cell fraction gene pattern dictionary copy number alterations (CNA) expression changes common malignancies. Subsequently, based -house hierarchical cell lineage derived single-cell RNA-seq data sets diverse cancer types, constrained regression model used determine immune stromal cell fraction, also include unidentifiable component calibrate cellular density variations across tissue regions. Specifically, user need specify cancer type tumor ST data set using cancerType parameter, utilized select cancer type-specific CNA expression signature infer malignant cell fraction. code cancer types can found following dropdown content. correlating expression profiles ST spots cancer type-specific signature, set cancer type-specific CNA signature first option chromosomal instability widely considered one consistent feature human tumors. Alternatively, spots strongly correlate CNA signature, cancer type-specific expression signature activated. situation might result chromosomally stable cancer cells low CNA. cancer types included dictionary, created pan-cancer expression signature averaging cancer type-specific expression signatures. SpaCET includes gene pattern dictionary copy number alterations (CNA) expression changes 30 solid tumor types. cancer type-specific CNA signature cancer type computed averaging bulk tumor CNA values gene levels across patients. cancer type, lower quartile patients sorted total CNA burdens excluded calculating CNA signature. cancer type-specific expression signature cancer type generated log2 Fold Change differential expression tumor normal samples. Several cancer types expression signatures due lack adequate normal samples (n < 10 patients). pan-cancer expression signature created averaging cancer type-specific expression signatures.  note, value deconvolution results represents fraction cell types. User may find fraction sum cell types spot (column) beyond 1. SpaCET outputs cell fractions major lineages corresponding sublineages, e.g., T CD4 well Th1, Th2… .","code":"# deconvolve ST data SpaCET_obj <- SpaCET.deconvolution(SpaCET_obj, cancerType=\"BRCA\", coreNo=8) # Since Windows does not support parallel computation, please set coreNo=1 for Windows OS.  # show the ST deconvolution results SpaCET_obj@results$deconvolution$propMat[1:13,1:6]  ##                   50x102 59x19        14x94        47x13        73x43 ## Malignant   2.860636e-01     1 6.845966e-02 3.899756e-01 9.608802e-01 ## CAF         3.118545e-01     0 3.397067e-01 1.111980e-01 3.372692e-02 ## Endothelial 5.510895e-02     0 1.427060e-01 3.080531e-02 5.263544e-03 ## Plasma      2.213392e-02     0 1.507382e-02 1.183170e-02 9.071809e-06 ## B cell      3.885793e-03     0 9.271616e-02 1.406470e-01 1.329085e-06 ## T CD4       1.344389e-01     0 1.554305e-02 1.249414e-01 1.112392e-05 ## T CD8       7.578696e-03     0 2.514558e-07 1.379856e-03 1.123043e-06 ## NK          7.104005e-04     0 1.670019e-06 4.890387e-08 3.562557e-07 ## cDC         1.421632e-07     0 8.278023e-02 7.584295e-02 2.851146e-07 ## pDC         1.606443e-06     0 2.283754e-02 1.805671e-02 3.878344e-07 ## Macrophage  1.703304e-01     0 5.021248e-02 9.531511e-02 9.253645e-07 ## Mast        7.905067e-08     0 1.621498e-05 1.333430e-07 1.162099e-07 ## Neutrophil  1.380073e-05     0 9.528996e-07 1.167503e-08 9.908635e-05"},{"path":"/articles/visium_BC.html","id":"visualize-the-cell-type-proportion","dir":"Articles","previous_headings":"","what":"Visualize the cell type proportion","title":"Cell type deconvolution and interaction analysis","text":"provide SpaCET.visualize.spatialFeature present spatial distribution cell types.   Since cell types relatively low abundance, user can get better vision setting sameScaleForFraction = FALSE. addition, can open interactive visualization panel setting interactive=TRUE browse deconvolution results.","code":"# show the spatial distribution of malignant cells and macrophages. SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"CellFraction\",    spatialFeatures=c(\"Malignant\",\"Macrophage\") ) # show the spatial distribution of all cell types. SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"CellFraction\",    spatialFeatures=\"All\",    sameScaleForFraction = TRUE,   pointSize = 0.1,    nrow=5 ) SpaCET.visualize.spatialFeature(SpaCET_obj,interactive=TRUE)"},{"path":"/articles/visium_BC.html","id":"estimate-cell-cell-interactions","dir":"Articles","previous_headings":"","what":"Estimate cell-cell interactions","title":"Cell type deconvolution and interaction analysis","text":"decomposing cell fractions, SpaCET can infer intercellular interactions based cell colocalization ligand-receptor coexpression. Linear correlations cell fraction cell types computed across ST spots evaluate cell-type colocalization. High positive correlations indicate cell-type pairs tend colocalize together. infer physical interactions, SpaCET tests co-expression ligand receptor genes within ST spot co-localized cell-type pairs.","code":""},{"path":"/articles/visium_BC.html","id":"find-co-localized-cell-type-pairs","dir":"Articles","previous_headings":"Estimate cell-cell interactions","what":"Find co-localized cell-type pairs","title":"Cell type deconvolution and interaction analysis","text":"SpaCET provides SpaCET.CCI.colocalization SpaCET.visualize.colocalization compute visualize co-localized cell-type pairs.  breast tumor tissue, identified several potential colocalized cell-type pairs (see red dots left panel), CAFs endothelial cells M2 macrophages. rule high cell fraction correlation caused similar reference profiles, compared correlations cell-type fractions cell-type reference profiles (see right panel). Although correlation CAF endothelial cell fractions high, profile similarity also proportionally high. However, similarity CAF M2 macrophage references extremely low, indicating CAF-M2 colocalization simply due profile similarity.","code":"# calculate the cell-cell colocalization. SpaCET_obj <- SpaCET.CCI.colocalization(SpaCET_obj)  # visualize the cell-cell colocalization. SpaCET.visualize.colocalization(SpaCET_obj)"},{"path":"/articles/visium_BC.html","id":"analyze-the-l-r-network-enrichment-within-st-spots","dir":"Articles","previous_headings":"Estimate cell-cell interactions","what":"Analyze the L-R network enrichment within ST spots","title":"Cell type deconvolution and interaction analysis","text":"Cell colocalization directly indicate physical interaction. Thus, sought evidence cell-cell interactions analyzing ligand-receptor (L-R) interactions within ST spots. previous study, collected approximately 2,500 L-R pairs -house L-R network. ST data set, SpaCET shuffled L-R interaction network using BiRewire package generate 1,000 randomized networks preserving directed degree distributions. spot, L-R network score defined sum expression products L-R pairs, divided average random value 1,000 randomized networks.  L-R network score ST spot indicates overall intensities ligand-receptor interactions location, specific interactions two cell types. Thus, SpaCET performed enrichment analysis L-R network scores cell-type pair. example, colocalization CAF M2 cells breast tumor tissue, SpaCET grouped ST spots four categories: CAF-M2 colocalized, CAF M2 dominated, others (see left middle panels following figure). found CAF-M2 colocalized spots substantial L-R interaction network scores CAF/M2-dominated spots (right panel).","code":"# calculate the L-R network score across ST spots. SpaCET_obj <- SpaCET.CCI.LRNetworkScore(SpaCET_obj,coreNo=8)  # visualize the L-R network score. SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"LRNetworkScore\",    spatialFeatures=c(\"Network_Score\",\"Network_Score_pv\") ) # Ligand-Receptor analysis for a co-localized cell-type pair SpaCET_obj <- SpaCET.CCI.cellTypePair(SpaCET_obj, cellTypePair=c(\"CAF\",\"Macrophage M2\")) ## [1] \"CAF and Macrophage M2 have potential intercellular interaction in the current tissue.\"  # Visualize the interaction analysis of a co-localized cell-type pair. SpaCET.visualize.cellTypePair(SpaCET_obj, cellTypePair=c(\"CAF\",\"Macrophage M2\"))"},{"path":"/articles/visium_BC.html","id":"enrich-cell-cell-interactions-at-the-tumor-immune-interface","dir":"Articles","previous_headings":"","what":"Enrich cell-cell interactions at the tumor-immune interface","title":"Cell type deconvolution and interaction analysis","text":"Interestingly, besides interaction significance, found enrichment CAF-M2 interactions close boundaries tumor immune/stromal regions. distance CAF-M2 tumor-immune border calculated averaging distances CAF-M2 interaction spot nearest tumor border spot. randomly selected number spots CAF-M2 spots non-malignant regions calculated distances border null distribution. result showed CAF-M2 interaction spots significantly closer tumor-immune boundaries.","code":"# Identify the Tumor-Stroma Interface SpaCET_obj <- SpaCET.identify.interface(SpaCET_obj)  # Visualize the Interface SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"Interface\", spatialFeature = \"Interface\") # Combine the interface and interaction spots SpaCET_obj <- SpaCET.combine.interface(SpaCET_obj, cellTypePair=c(\"CAF\",\"Macrophage M2\"))  # Visualize the Interface. The spatialFeature should be formated as \"Interface&celltype1_celltype2\". Celltype 1 and 2 is in the order of alphabet. SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"Interface\", spatialFeature = \"Interface&CAF_Macrophage M2\") # Compute the distance of CAF-M2 to tumor border SpaCET.distance.to.interface(SpaCET_obj, cellTypePair=c(\"CAF\", \"Macrophage M2\"))"},{"path":"/articles/visium_BC.html","id":"explore-cancer-cell-states","dir":"Articles","previous_headings":"","what":"Explore cancer cell states","title":"Cell type deconvolution and interaction analysis","text":"gene expression profiles tumor cells (.e., cancer cell states) determined tumor cells’ genetic background cell-cell interactions surrounding environment. explorative extension, SpaCET can automatically explore spatial distribution different cancer cell states. Based deconvolution results breast cancer dataset, selected ST spots high fractions (> 0.7) malignant cells tumor spots. , SpaCET hierarchically clustered malignant spots infer different states. Silhouette value, measuring similarity among ST spots within cluster compared clusters, used select optimal cluster number. way, reference profile different cancer cell states can computed averaging expression profile spots cluster, .e., cancer cell state. Similar deconvolution immune major lineages sublineages, overall malignant cell fraction decomposed multiple cancer cell states. Thus, sum fraction cancer cell states equals malignant cell fraction spot.","code":"# further deconvolve malignant cell states SpaCET_obj <- SpaCET.deconvolution.malignant(SpaCET_obj, coreNo = 8)  # show cancer cell state fraction of the first five spots SpaCET_obj@results$deconvolution$propMat[c(\"Malignant cell state A\",\"Malignant cell state B\"),1:6]  ##                           50x102        59x19        14x94     47x13        73x43     61x97 ## Malignant cell state A 0.2295498 9.999900e-01 6.845962e-02 0.2038680 9.608802e-01 0.6517794 ## Malignant cell state B 0.0565137 1.239573e-11 3.921715e-08 0.1861075 2.340661e-09 0.2675332  SpaCET.visualize.spatialFeature(   SpaCET_obj,    spatialType = \"CellFraction\",    spatialFeatures=c(\"Malignant\",\"Malignant cell state A\",\"Malignant cell state B\"),    nrow=1 )"},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Beibei Ru. Author, maintainer. Peng Jiang. Author.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Ru B, Jiang P (2024). SpaCET: Spatial Cellular Estimator Tumors. R package version 1.2.0, https://github.com/data2intelligence/SpaCET.","code":"@Manual{,   title = {SpaCET: Spatial Cellular Estimator for Tumors},   author = {Beibei Ru and Peng Jiang},   year = {2024},   note = {R package version 1.2.0},   url = {https://github.com/data2intelligence/SpaCET}, }"},{"path":"/index.html","id":"spacet-spatial-cellular-estimator-for-tumors-","dir":"","previous_headings":"","what":"Spatial Cellular Estimator for Tumors","title":"Spatial Cellular Estimator for Tumors","text":"SpaCET R package desighed analyzing cancer spatial transcriptomics (ST) datasets estimate cell lineages intercellular interactions within tumor microenvironment. nutshell, SpaCET first infers cancer cell abundance integrating gene pattern dictionary common malignancies. Subsequently, SpaCET employs constrained linear regression model calibrate local tissue densities determine stromal immune cell lineage fractions based comprehensive non-malignant cell atlas. Furthermore, SpaCET capability unveil putative cell-cell interactions within tumor microenvironment, particularly tumor-immune interface. note, although SpaCET require input cell references analysis tumor ST data, SpaCET can still incorporate matched scRNA-seq dataset customized references conduct cell type deconvolution ST dataset.","code":""},{"path":"/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Spatial Cellular Estimator for Tumors","text":"install SpaCET, recommend using devtools: user can install SpaCET source code. Click download .","code":"# install.packages(\"devtools\") devtools::install_github(\"data2intelligence/SpaCET\") # install SpaCET in the R environment. install.packages(\"Path_to_the_source_code\", repos = NULL, type=\"source\")"},{"path":"/index.html","id":"dependencies","dir":"","previous_headings":"","what":"Dependencies","title":"Spatial Cellular Estimator for Tumors","text":"R version >= 4.2.0. R packages: Matrix, jsonlite, ggplot2, reshape2, patchwork, png, shiny, plotly, DT, MUDAN, factoextra, NbClust, cluster, parallel, psych, BiRewire, limma, UCell.","code":""},{"path":"/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Spatial Cellular Estimator for Tumors","text":"","code":"library(SpaCET)  visiumPath <- file.path(system.file(package = \"SpaCET\"), \"extdata/Visium_BC\") SpaCET_obj <- create.SpaCET.object.10X(visiumPath = visiumPath) SpaCET_obj <- SpaCET.deconvolution(SpaCET_obj, cancerType=\"BRCA\", coreNo=8)  SpaCET_obj@results$deconvolution$propMat[1:13,1:5]  ##                   50x102 59x19        14x94        47x13        73x43 ## Malignant   2.860636e-01     1 6.845966e-02 3.899756e-01 9.608802e-01 ## CAF         3.118545e-01     0 3.397067e-01 1.111980e-01 3.372692e-02 ## Endothelial 5.510895e-02     0 1.427060e-01 3.080531e-02 5.263544e-03 ## Plasma      2.213392e-02     0 1.507382e-02 1.183170e-02 9.071809e-06 ## B cell      3.885793e-03     0 9.271616e-02 1.406470e-01 1.329085e-06 ## T CD4       1.344389e-01     0 1.554305e-02 1.249414e-01 1.112392e-05 ## T CD8       7.578696e-03     0 2.514558e-07 1.379856e-03 1.123043e-06 ## NK          7.104005e-04     0 1.670019e-06 4.890387e-08 3.562557e-07 ## cDC         1.421632e-07     0 8.278023e-02 7.584295e-02 2.851146e-07 ## pDC         1.606443e-06     0 2.283754e-02 1.805671e-02 3.878344e-07 ## Macrophage  1.703304e-01     0 5.021248e-02 9.531511e-02 9.253645e-07 ## Mast        7.905067e-08     0 1.621498e-05 1.333430e-07 1.162099e-07 ## Neutrophil  1.380073e-05     0 9.528996e-07 1.167503e-08 9.908635e-05"},{"path":"/index.html","id":"tutorial","dir":"","previous_headings":"","what":"Tutorial","title":"Spatial Cellular Estimator for Tumors","text":"Cell type deconvolution interaction analysis Deconvolution matched scRNA-seq data set Gene set score calculation spatial spots","code":""},{"path":"/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Spatial Cellular Estimator for Tumors","text":"Beibei Ru, Jinlin Huang, Yu Zhang, Kenneth Aldape, Peng Jiang. Estimation cell lineages tumors spatial transcriptomics data. Nature Communications 14, 568 (2023). [Link]","code":""},{"path":"/reference/SpaCET-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Define the SpaCET object — SpaCET-class","title":"Define the SpaCET object — SpaCET-class","text":"Define SpaCET object","code":""},{"path":"/reference/SpaCET-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Define the SpaCET object — SpaCET-class","text":"input input data results results","code":""},{"path":"/reference/SpaCET.CCI.LRNetworkScore.html","id":null,"dir":"Reference","previous_headings":"","what":"Ligand-Receptor interaction enrichment analysis — SpaCET.CCI.LRNetworkScore","title":"Ligand-Receptor interaction enrichment analysis — SpaCET.CCI.LRNetworkScore","text":"Calculate overall intensity L-R interactions within ST spots.","code":""},{"path":"/reference/SpaCET.CCI.LRNetworkScore.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ligand-Receptor interaction enrichment analysis — SpaCET.CCI.LRNetworkScore","text":"","code":"SpaCET.CCI.LRNetworkScore(SpaCET_obj, coreNo = 8)"},{"path":"/reference/SpaCET.CCI.LRNetworkScore.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ligand-Receptor interaction enrichment analysis — SpaCET.CCI.LRNetworkScore","text":"SpaCET_obj SpaCET object. coreNo Core number parallel computation.","code":""},{"path":"/reference/SpaCET.CCI.LRNetworkScore.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ligand-Receptor interaction enrichment analysis — SpaCET.CCI.LRNetworkScore","text":"SpaCET object.","code":""},{"path":"/reference/SpaCET.CCI.LRNetworkScore.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ligand-Receptor interaction enrichment analysis — SpaCET.CCI.LRNetworkScore","text":"","code":"SpaCET_obj <- SpaCET.CCI.LRNetworkScore(SpaCET_obj, coreNo=8) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"LRNetworkScore\", spatialFeatures=c(\"Network_Score\",\"Network_Score_pv\"))"},{"path":"/reference/SpaCET.CCI.cellTypePair.html","id":null,"dir":"Reference","previous_headings":"","what":"Ligand-Receptor analysis for a co-localized cell-type pair — SpaCET.CCI.cellTypePair","title":"Ligand-Receptor analysis for a co-localized cell-type pair — SpaCET.CCI.cellTypePair","text":"Test co-expression ligands receptors within ST spot co-localized cell-type pairs.","code":""},{"path":"/reference/SpaCET.CCI.cellTypePair.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ligand-Receptor analysis for a co-localized cell-type pair — SpaCET.CCI.cellTypePair","text":"","code":"SpaCET.CCI.cellTypePair(SpaCET_obj, cellTypePair)"},{"path":"/reference/SpaCET.CCI.cellTypePair.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ligand-Receptor analysis for a co-localized cell-type pair — SpaCET.CCI.cellTypePair","text":"SpaCET_obj SpaCET object. cellTypePair pair cell-types.","code":""},{"path":"/reference/SpaCET.CCI.cellTypePair.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ligand-Receptor analysis for a co-localized cell-type pair — SpaCET.CCI.cellTypePair","text":"SpaCET object.","code":""},{"path":"/reference/SpaCET.CCI.cellTypePair.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ligand-Receptor analysis for a co-localized cell-type pair — SpaCET.CCI.cellTypePair","text":"","code":"SpaCET_obj <- SpaCET.CCI.cellTypePair(SpaCET_obj, cellTypePair=c(\"CAF\",\"Macrophage M2\"))"},{"path":"/reference/SpaCET.CCI.colocalization.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell-cell colocalization analysis — SpaCET.CCI.colocalization","title":"Cell-cell colocalization analysis — SpaCET.CCI.colocalization","text":"Calculate cell-type pair colocalization using Spearman correlation analysis.","code":""},{"path":"/reference/SpaCET.CCI.colocalization.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell-cell colocalization analysis — SpaCET.CCI.colocalization","text":"","code":"SpaCET.CCI.colocalization(SpaCET_obj)"},{"path":"/reference/SpaCET.CCI.colocalization.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cell-cell colocalization analysis — SpaCET.CCI.colocalization","text":"SpaCET_obj SpaCET object.","code":""},{"path":"/reference/SpaCET.CCI.colocalization.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cell-cell colocalization analysis — SpaCET.CCI.colocalization","text":"SpaCET object.","code":""},{"path":"/reference/SpaCET.CCI.colocalization.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cell-cell colocalization analysis — SpaCET.CCI.colocalization","text":"","code":"SpaCET_obj <- SpaCET.CCI.colocalization(SpaCET_obj)"},{"path":"/reference/SpaCET.GeneSetScore.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate gene set score for each spot. — SpaCET.GeneSetScore","title":"Calculate gene set score for each spot. — SpaCET.GeneSetScore","text":"Calculate spots' gene set score -house user-defined gene sets.","code":""},{"path":"/reference/SpaCET.GeneSetScore.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate gene set score for each spot. — SpaCET.GeneSetScore","text":"","code":"SpaCET.GeneSetScore(SpaCET_obj, GeneSets)"},{"path":"/reference/SpaCET.GeneSetScore.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate gene set score for each spot. — SpaCET.GeneSetScore","text":"SpaCET_obj SpaCET object. GeneSets string -house gene sets, list object user-defined gene sets. See details.","code":""},{"path":"/reference/SpaCET.GeneSetScore.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate gene set score for each spot. — SpaCET.GeneSetScore","text":"SpaCET object","code":""},{"path":"/reference/SpaCET.GeneSetScore.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate gene set score for each spot. — SpaCET.GeneSetScore","text":"1) Set `GeneSets` \"Hallmark\", \"CancerCellState\", \"TLS\" use -house gene sets. \"Hallmark\": https://www.gsea-msigdb.org/gsea/msigdb/human/collections.jsp#H \"CancerCellState\": https://www.nature.com/articles/s41588-022-01141-9 \"TLS\": https://www.researchsquare.com/article/rs-3921508 2) Set `GeneSets` list use user-defined gene sets. entry vector gene symbols. function `ScoreSignatures_UCell` `UCell` used calculate gene-set scores. https://bioconductor.org/packages/release/bioc/html/UCell.html.","code":""},{"path":"/reference/SpaCET.GeneSetScore.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate gene set score for each spot. — SpaCET.GeneSetScore","text":"","code":"SpaCET_obj <- SpaCET.GeneSetScore(SpaCET_obj, GeneSets=\"Hallmark\")"},{"path":"/reference/SpaCET.combine.interface.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine interaction spots to interface — SpaCET.combine.interface","title":"Combine interaction spots to interface — SpaCET.combine.interface","text":"Demonstrate spatial position interaction spots tumor microenvironment.","code":""},{"path":"/reference/SpaCET.combine.interface.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine interaction spots to interface — SpaCET.combine.interface","text":"","code":"SpaCET.combine.interface(SpaCET_obj, cellTypePair)"},{"path":"/reference/SpaCET.combine.interface.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine interaction spots to interface — SpaCET.combine.interface","text":"SpaCET_obj SpaCET object. cellTypePair pair cell types.","code":""},{"path":"/reference/SpaCET.combine.interface.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine interaction spots to interface — SpaCET.combine.interface","text":"SpaCET object.","code":""},{"path":"/reference/SpaCET.combine.interface.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine interaction spots to interface — SpaCET.combine.interface","text":"","code":"SpaCET_obj <- SpaCET.combine.interface(SpaCET_obj,cellTypePair=c(\"CAF\", \"Macrophage M2\")) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"Interface\", spatialFeature = \"Interaction\")"},{"path":"/reference/SpaCET.deconvolution.html","id":null,"dir":"Reference","previous_headings":"","what":"Deconvolve tumor ST data set — SpaCET.deconvolution","title":"Deconvolve tumor ST data set — SpaCET.deconvolution","text":"Estimate cell fraction cell lineages sub lineages.","code":""},{"path":"/reference/SpaCET.deconvolution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deconvolve tumor ST data set — SpaCET.deconvolution","text":"","code":"SpaCET.deconvolution(SpaCET_obj, cancerType, coreNo = 8)"},{"path":"/reference/SpaCET.deconvolution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deconvolve tumor ST data set — SpaCET.deconvolution","text":"SpaCET_obj SpaCET object. cancerType Cancer type current tumor ST dataset. coreNo Core number parallel computation.","code":""},{"path":"/reference/SpaCET.deconvolution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deconvolve tumor ST data set — SpaCET.deconvolution","text":"SpaCET object.","code":""},{"path":"/reference/SpaCET.deconvolution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Deconvolve tumor ST data set — SpaCET.deconvolution","text":"","code":"SpaCET_obj <- SpaCET.deconvolution(SpaCET_obj, cancerType=\"BRCA\", coreNo=8)"},{"path":"/reference/SpaCET.deconvolution.malignant.html","id":null,"dir":"Reference","previous_headings":"","what":"Deconvolve malignant cell fraction — SpaCET.deconvolution.malignant","title":"Deconvolve malignant cell fraction — SpaCET.deconvolution.malignant","text":"Explore different malignant cell states tumor ST dataset.","code":""},{"path":"/reference/SpaCET.deconvolution.malignant.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deconvolve malignant cell fraction — SpaCET.deconvolution.malignant","text":"","code":"SpaCET.deconvolution.malignant(   SpaCET_obj,   Malignant = \"Malignant\",   malignantCutoff = 0.7,   coreNo = 8 )"},{"path":"/reference/SpaCET.deconvolution.malignant.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deconvolve malignant cell fraction — SpaCET.deconvolution.malignant","text":"SpaCET_obj SpaCET object. Malignant Indicates name malignant cell type major lineage layer deconvolution results. Default: \"Malignant\". malignantCutoff Fraction cutoff defining spots high abundant malignant cells. Default: 0.7. coreNo Core number parallel.","code":""},{"path":"/reference/SpaCET.deconvolution.malignant.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deconvolve malignant cell fraction — SpaCET.deconvolution.malignant","text":"SpaCET object","code":""},{"path":"/reference/SpaCET.deconvolution.malignant.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Deconvolve malignant cell fraction — SpaCET.deconvolution.malignant","text":"","code":"SpaCET_obj <- SpaCET.deconvolution.malignant(SpaCET_obj)"},{"path":"/reference/SpaCET.deconvolution.matched.scRNAseq.html","id":null,"dir":"Reference","previous_headings":"","what":"Deconvolve ST data set with matched scRNAseq data — SpaCET.deconvolution.matched.scRNAseq","title":"Deconvolve ST data set with matched scRNAseq data — SpaCET.deconvolution.matched.scRNAseq","text":"Estimate fraction cell lineage sub lineage.","code":""},{"path":"/reference/SpaCET.deconvolution.matched.scRNAseq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deconvolve ST data set with matched scRNAseq data — SpaCET.deconvolution.matched.scRNAseq","text":"","code":"SpaCET.deconvolution.matched.scRNAseq(   SpaCET_obj,   sc_includeMalignant = TRUE,   cancerType,   sc_counts,   sc_annotation,   sc_lineageTree,   sc_nCellEachLineage = 100,   coreNo = 8 )"},{"path":"/reference/SpaCET.deconvolution.matched.scRNAseq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deconvolve ST data set with matched scRNAseq data — SpaCET.deconvolution.matched.scRNAseq","text":"SpaCET_obj SpaCET object. sc_includeMalignant Logical. Indicate whether single cell data includes malignant cells. , please input cancer type SpaCET predict malignant cell fraction based build-reference. cancerType Cancer type current tumor ST dataset. sc_counts Single cell count matrix gene name (row) x cell ID (column). sc_annotation Single cell annotation matrix. matrix include two columns, ,e., cellID cellType. row represents single cell. sc_lineageTree Cell lineage tree. organized using list, name element major lineages value elements corresponding sublineages. major lineage sublineages, value major lineage . sc_nCellEachLineage Cell count lineage. Default: 100. cell type comprised >100 cells, 100 cells per cell identity randomly selected generate cell type reference. coreNo Core number.","code":""},{"path":"/reference/SpaCET.deconvolution.matched.scRNAseq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deconvolve ST data set with matched scRNAseq data — SpaCET.deconvolution.matched.scRNAseq","text":"SpaCET object","code":""},{"path":"/reference/SpaCET.deconvolution.matched.scRNAseq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Deconvolve ST data set with matched scRNAseq data — SpaCET.deconvolution.matched.scRNAseq","text":"","code":"SpaCET_obj <- SpaCET.deconvolution.matched.scRNAseq(SpaCET_obj, sc_counts, sc_annotation, sc_lineageTree)"},{"path":"/reference/SpaCET.distance.to.interface.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance to tumor border — SpaCET.distance.to.interface","title":"Distance to tumor border — SpaCET.distance.to.interface","text":"Calculate distance cell-cell interactions tumor-immune interface.","code":""},{"path":"/reference/SpaCET.distance.to.interface.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance to tumor border — SpaCET.distance.to.interface","text":"","code":"SpaCET.distance.to.interface(   SpaCET_obj,   cellTypePair = c(\"CAF\", \"Macrophage M2\"),   nPermutation = 1000 )"},{"path":"/reference/SpaCET.distance.to.interface.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distance to tumor border — SpaCET.distance.to.interface","text":"SpaCET_obj SpaCET object. cellTypePair pair cell types. nPermutation Permutation number.","code":""},{"path":"/reference/SpaCET.distance.to.interface.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distance to tumor border — SpaCET.distance.to.interface","text":"ggplot object.","code":""},{"path":"/reference/SpaCET.distance.to.interface.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Distance to tumor border — SpaCET.distance.to.interface","text":"","code":"SpaCET.distance.to.interface(SpaCET_obj, cellTypePair=c(\"CAF\", \"Macrophage M2\"))"},{"path":"/reference/SpaCET.identify.interface.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify tumor-stroma interface — SpaCET.identify.interface","title":"Identify tumor-stroma interface — SpaCET.identify.interface","text":"Identify spots tumor-stroma interface.","code":""},{"path":"/reference/SpaCET.identify.interface.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify tumor-stroma interface — SpaCET.identify.interface","text":"","code":"SpaCET.identify.interface(   SpaCET_obj,   Malignant = \"Malignant\",   MalignantCutoff = 0.5 )"},{"path":"/reference/SpaCET.identify.interface.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify tumor-stroma interface — SpaCET.identify.interface","text":"SpaCET_obj SpaCET object. Malignant Indicates name malignant cell type major lineage layer deconvolution results. Default: \"Malignant\". MalignantCutoff Malignant cell fraction cutoff tumor boundary. Default: 0.5.","code":""},{"path":"/reference/SpaCET.identify.interface.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify tumor-stroma interface — SpaCET.identify.interface","text":"SpaCET object.","code":""},{"path":"/reference/SpaCET.identify.interface.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify tumor-stroma interface — SpaCET.identify.interface","text":"","code":"SpaCET_obj <- SpaCET.identify.interface(SpaCET_obj) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"Interface\")"},{"path":"/reference/SpaCET.quality.control.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter spatial spots and calculate the QC metrics — SpaCET.quality.control","title":"Filter spatial spots and calculate the QC metrics — SpaCET.quality.control","text":"Spots less `min.genes` expressed genes removed.","code":""},{"path":"/reference/SpaCET.quality.control.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter spatial spots and calculate the QC metrics — SpaCET.quality.control","text":"","code":"SpaCET.quality.control(SpaCET_obj, min.genes = 1)"},{"path":"/reference/SpaCET.quality.control.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter spatial spots and calculate the QC metrics — SpaCET.quality.control","text":"SpaCET_obj SpaCET object. min.genes Minimum number expressed genes. Default: 1.","code":""},{"path":"/reference/SpaCET.quality.control.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter spatial spots and calculate the QC metrics — SpaCET.quality.control","text":"SpaCET object.","code":""},{"path":"/reference/SpaCET.quality.control.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter spatial spots and calculate the QC metrics — SpaCET.quality.control","text":"","code":"SpaCET_obj <- SpaCET.quality.control(SpaCET_obj) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"QualityControl\", spatialFeatures=c(\"UMI\",\"Gene\"))"},{"path":"/reference/SpaCET.visualize.cellTypePair.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell-type pair visualization — SpaCET.visualize.cellTypePair","title":"Cell-type pair visualization — SpaCET.visualize.cellTypePair","text":"Visualize interaction analysis co-localized cell-type pair.","code":""},{"path":"/reference/SpaCET.visualize.cellTypePair.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell-type pair visualization — SpaCET.visualize.cellTypePair","text":"","code":"SpaCET.visualize.cellTypePair(SpaCET_obj, cellTypePair)"},{"path":"/reference/SpaCET.visualize.cellTypePair.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cell-type pair visualization — SpaCET.visualize.cellTypePair","text":"SpaCET_obj SpaCET object. cellTypePair pair cell types.","code":""},{"path":"/reference/SpaCET.visualize.cellTypePair.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cell-type pair visualization — SpaCET.visualize.cellTypePair","text":"ggplot object.","code":""},{"path":"/reference/SpaCET.visualize.cellTypePair.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cell-type pair visualization — SpaCET.visualize.cellTypePair","text":"","code":"SpaCET.visualize.cellTypePair(SpaCET_obj, cellTypePair=c(\"CAF\",\"Macrophage M2\"))"},{"path":"/reference/SpaCET.visualize.colocalization.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell-cell colocalization visualization — SpaCET.visualize.colocalization","title":"Cell-cell colocalization visualization — SpaCET.visualize.colocalization","text":"Visualize cell-type pair colocalization.","code":""},{"path":"/reference/SpaCET.visualize.colocalization.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell-cell colocalization visualization — SpaCET.visualize.colocalization","text":"","code":"SpaCET.visualize.colocalization(SpaCET_obj)"},{"path":"/reference/SpaCET.visualize.colocalization.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cell-cell colocalization visualization — SpaCET.visualize.colocalization","text":"SpaCET_obj SpaCET object.","code":""},{"path":"/reference/SpaCET.visualize.colocalization.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cell-cell colocalization visualization — SpaCET.visualize.colocalization","text":"ggplot object.","code":""},{"path":"/reference/SpaCET.visualize.colocalization.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cell-cell colocalization visualization — SpaCET.visualize.colocalization","text":"","code":"SpaCET.visualize.colocalization(SpaCET_obj)"},{"path":"/reference/SpaCET.visualize.spatialFeature.html","id":null,"dir":"Reference","previous_headings":"","what":"Spatial feature visualization — SpaCET.visualize.spatialFeature","title":"Spatial feature visualization — SpaCET.visualize.spatialFeature","text":"Visualize multiple types spatial features ST data.","code":""},{"path":"/reference/SpaCET.visualize.spatialFeature.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spatial feature visualization — SpaCET.visualize.spatialFeature","text":"","code":"SpaCET.visualize.spatialFeature(   SpaCET_obj,   spatialType = c(\"QualityControl\", \"GeneExpression\", \"CellFraction\", \"LRNetworkScore\",     \"Interface\", \"GeneSetScore\"),   spatialFeatures = NULL,   scaleTypeForGeneExpression = \"LogTPM\",   sameScaleForFraction = FALSE,   colors = NULL,   pointSize = 1,   nrow = 1,   imageBg = TRUE,   interactive = FALSE )"},{"path":"/reference/SpaCET.visualize.spatialFeature.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spatial feature visualization — SpaCET.visualize.spatialFeature","text":"SpaCET_obj SpaCET object. spatialType Type spatial features, .e., \"QualityControl\", \"GeneExpression\", \"CellFraction\", \"LRNetworkScore\", \"Interface\", \"GeneSetScore\". See ‘details’ information. spatialFeatures vector spatial features. scaleTypeForGeneExpression Scale type gene expression, .e., \"RawCounts\",\"LogRawCounts\",\"LogTPM/10\", \"LogTPM\". sameScaleForFraction Indicate whether cell types scale cell fraction. nrow Row number combined panel multiple spatial features. imageBg logical: image shown?","code":""},{"path":"/reference/SpaCET.visualize.spatialFeature.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spatial feature visualization — SpaCET.visualize.spatialFeature","text":"ggplot2 object.","code":""},{"path":"/reference/SpaCET.visualize.spatialFeature.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Spatial feature visualization — SpaCET.visualize.spatialFeature","text":"`SpaCET.visualize.spatialFeature` able plot multiple types spatial features, including \"QC\", \"GeneExp\", \"CellFraction\", \"LRNetworkScore\". \"QualityControl\" refers quality control metrics. User can visualize total counts UMI genes across spots. \"GeneExpr\" set visualize expression level genes. \"CellFraction\" refers cell fraction cell types. \"LRNetworkScore\" selected show Ligand-Receptor network score. See `SpaCET.CCI.LRNetworkScore` calculate .","code":""},{"path":"/reference/SpaCET.visualize.spatialFeature.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Spatial feature visualization — SpaCET.visualize.spatialFeature","text":"","code":"SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"QualityControl\", spatialFeatures=c(\"UMI\",\"Gene\")) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"GeneExpression\", spatialFeatures=c(\"EPCAM\",\"MS4A1\")) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"CellFraction\", spatialFeatures=c(\"Malignant\",\"Macrophage\")) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"CellFraction\", spatialFeatures=\"All\", pointSize = 0.1, nrow=5) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"LRNetworkScore\", spatialFeatures=c(\"Network_Score\",\"Network_Score_pv\"))"},{"path":"/reference/addTo.Seurat.html","id":null,"dir":"Reference","previous_headings":"","what":"Add SpaCET to Seurat — addTo.Seurat","title":"Add SpaCET to Seurat — addTo.Seurat","text":"Add deconvolution results SpaCET object Seurat object new assay.","code":""},{"path":"/reference/addTo.Seurat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add SpaCET to Seurat — addTo.Seurat","text":"","code":"addTo.Seurat(SpaCET_obj, Seurat_obj)"},{"path":"/reference/addTo.Seurat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add SpaCET to Seurat — addTo.Seurat","text":"SpaCET_obj SpaCET object. Seurat_obj Seurat object.","code":""},{"path":"/reference/addTo.Seurat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add SpaCET to Seurat — addTo.Seurat","text":"Seurat object.","code":""},{"path":"/reference/addTo.Seurat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add SpaCET to Seurat — addTo.Seurat","text":"","code":"visiumPath <- file.path(system.file(package = \"SpaCET\"), \"extdata/Visium_BC\") Seurat_obj <- Seurat::Load10X_Spatial(data.dir = visiumPath) SpaCET_obj <- convert.Seurat(Seurat_obj) SpaCET_obj <- SpaCET.quality.control(SpaCET_obj) SpaCET_obj <- SpaCET.deconvolution(SpaCET_obj, cancerType=\"BRCA\", coreNo=8) Seurat_obj <- addTo.Seurat(SpaCET_obj, Seurat_obj) Seurat::DefaultAssay(Seurat_obj) <- \"propMatFromSpaCET\" Seurat::SpatialFeaturePlot(Seurat_obj, features = c(\"CAF\", \"Macrophage\"))"},{"path":"/reference/convert.Seurat.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Seurat to SpaCET — convert.Seurat","title":"Convert Seurat to SpaCET — convert.Seurat","text":"Convert Seurat object SpaCET object.","code":""},{"path":"/reference/convert.Seurat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Seurat to SpaCET — convert.Seurat","text":"","code":"convert.Seurat(Seurat_obj)"},{"path":"/reference/convert.Seurat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Seurat to SpaCET — convert.Seurat","text":"Seurat_obj Seurat object.","code":""},{"path":"/reference/convert.Seurat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Seurat to SpaCET — convert.Seurat","text":"SpaCET object.","code":""},{"path":"/reference/convert.Seurat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Seurat to SpaCET — convert.Seurat","text":"","code":"visiumPath <- file.path(system.file(package = \"SpaCET\"), \"extdata/Visium_BC\") Seurat_obj <- Seurat::Load10X_Spatial(data.dir = visiumPath) SpaCET_obj <- convert.Seurat(Seurat_obj) SpaCET_obj <- SpaCET.quality.control(SpaCET_obj) SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = \"QualityControl\", spatialFeatures=c(\"UMI\",\"Gene\"))"},{"path":"/reference/create.SpaCET.object.10X.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an SpaCET object from 10X Visium — create.SpaCET.object.10X","title":"Create an SpaCET object from 10X Visium — create.SpaCET.object.10X","text":"Read ST dataset create SpaCET object.","code":""},{"path":"/reference/create.SpaCET.object.10X.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an SpaCET object from 10X Visium — create.SpaCET.object.10X","text":"","code":"create.SpaCET.object.10X(visiumPath)"},{"path":"/reference/create.SpaCET.object.10X.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an SpaCET object from 10X Visium — create.SpaCET.object.10X","text":"visiumPath Path Space Ranger output folder. See ‘details’ information.","code":""},{"path":"/reference/create.SpaCET.object.10X.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an SpaCET object from 10X Visium — create.SpaCET.object.10X","text":"SpaCET object.","code":""},{"path":"/reference/create.SpaCET.object.10X.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create an SpaCET object from 10X Visium — create.SpaCET.object.10X","text":"users analyzing ST data set 10X Visium platform, need input \"visiumPath\". Please make sure \"visiumPath\" points standard output folder 10X Space Ranger, `filtered_feature_bc_matrix` `spatial` folders. \"filtered_feature_bc_matrix\" folder includes  \"barcodes.tsv.gz\": spot level barcodes;  \"features.tsv.gz\": list genes;  \"matrix.mtx.gz\": (sparse) matrix counts. \"spatial\" folder includes  “tissue_positions_list.csv” : barcodes spatial information;  “tissue_lowres_image.png” : hematoxylin eosin (H&E) image;  “scalefactors_json.json” : scaling factors adjusting coordinates.","code":""},{"path":"/reference/create.SpaCET.object.10X.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an SpaCET object from 10X Visium — create.SpaCET.object.10X","text":"","code":"visiumPath <- file.path(system.file(package = \"SpaCET\"), \"extdata/Visium_BC\") SpaCET_obj <- create.SpaCET.object.10X(visiumPath = visiumPath)"},{"path":"/reference/create.SpaCET.object.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an SpaCET object — create.SpaCET.object","title":"Create an SpaCET object — create.SpaCET.object","text":"Read ST dataset create SpaCET object.","code":""},{"path":"/reference/create.SpaCET.object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an SpaCET object — create.SpaCET.object","text":"","code":"create.SpaCET.object(counts, spotCoordinates, imagePath, platform)"},{"path":"/reference/create.SpaCET.object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an SpaCET object — create.SpaCET.object","text":"counts Count matrix gene name (row) x spot ID (column). spotCoordinates Spot coordinate matrix spot ID (row) x coordinates (column). matrix include two columns, ,e., X Y coordinates, respectively, represent position spots H&E image. imagePath Path H&E image file. Can NA available. platform character string indicating platform, .e., \"Visium\", \"OldST\", \"Slide-Seq\". \"OldST\" early situ capturing method \"Visium\" developed.","code":""},{"path":"/reference/create.SpaCET.object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an SpaCET object — create.SpaCET.object","text":"SpaCET object.","code":""},{"path":"/reference/create.SpaCET.object.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create an SpaCET object — create.SpaCET.object","text":"create SpaCET object, user need input four parameters, .e., \"counts\", \"spotCoordinates\", \"imagePath\", \"platform\". However, analyzing Visium data, easy use `create.SpaCET.object.10X` read ST data.","code":""},{"path":"/reference/create.SpaCET.object.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an SpaCET object — create.SpaCET.object","text":"","code":"SpaCET_obj <- create.SpaCET.object(counts, spotCoordinates, imagePath, platform)"},{"path":"/reference/read.gmt.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a gmt file. — read.gmt","title":"Read a gmt file. — read.gmt","text":"Read gmt file gene set list.","code":""},{"path":"/reference/read.gmt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a gmt file. — read.gmt","text":"","code":"read.gmt(gmtPath)"},{"path":"/reference/read.gmt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a gmt file. — read.gmt","text":"gmtPath Path gmt file.","code":""},{"path":"/reference/read.gmt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a gmt file. — read.gmt","text":"gene set list","code":""},{"path":"/reference/read.gmt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read a gmt file. — read.gmt","text":"","code":"gmt <- read.gmt(gmtPath)"},{"path":"/reference/write.gmt.html","id":null,"dir":"Reference","previous_headings":"","what":"Write a gmt file. — write.gmt","title":"Write a gmt file. — write.gmt","text":"Write gene set list gmt file.","code":""},{"path":"/reference/write.gmt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write a gmt file. — write.gmt","text":"","code":"write.gmt(gmt, gmtPath)"},{"path":"/reference/write.gmt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write a gmt file. — write.gmt","text":"gmt gene set list. gmtPath Path gmt file.","code":""},{"path":"/reference/write.gmt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Write a gmt file. — write.gmt","text":"","code":"write.gmt(gmt, gmtPath)"},{"path":"/news/index.html","id":"spacet-120","dir":"Changelog","previous_headings":"","what":"SpaCET 1.2.0","title":"SpaCET 1.2.0","text":"2024-03-01 Add new function SpaCET.GeneSetScore calculate gene set score. Update convert.Seurat addTo.Seurat compatible Seurat v5.","code":""},{"path":"/news/index.html","id":"spacet-110","dir":"Changelog","previous_headings":"","what":"SpaCET 1.1.0","title":"SpaCET 1.1.0","text":"2023-12-28 Add interactive visualization panel browse deconvolution analysis results SpaCET.visualize.spatialFeature(SpaCET_obj,interactive=TRUE). Add new function combine tumor-immune interface interaction spots SpaCET.combine.interface().","code":""},{"path":"/news/index.html","id":"spacet-100","dir":"Changelog","previous_headings":"","what":"SpaCET 1.0.0","title":"SpaCET 1.0.0","text":"2023-02-02 Release SpaCET package.","code":""}]
