生物信息學/Seurat
< 生物信息学
Seurat整合不同條件、技術和物種的單細胞轉錄組數據
編輯Seurat相關鏈接
編輯- Seurat教程
- Seurat的github頁面
- 基於Seurat的擴展包
- Seurat函數參考
- 老版本的Seurat
- Seurat文獻:https://doi.org/10.1038/nbt.4096
Seurat的安裝
編輯Seurat包發布在CRAN官方上。
安裝最新版Seurat
編輯安裝代碼:
install.packages('Seurat')
library(Seurat)
如果出現以下提示,請輸入y
package which is only available in source form, and may need compilation of C/C++/Fortran: 'Seurat'
Do you want to attempt to install these from sources?
y/n:y
安裝較早版本的Seurat
編輯### 安装Seurat3的包
remotes::install_version("Seurat", version = "3.X.X")
### 安装Seurat2的包
source("https://z.umn.edu/archived-seurat")
# 安装remotes包
install.packages('remotes')
# 替换'2.3.0'为你需要的版本
remotes::install_version(package = 'Seurat', version = package_version('2.3.0'))
library(Seurat)
安裝開發中的Seurat
編輯install.packages('remotes')
remotes::install_github(repo = 'satijalab/seurat', ref = 'develop')
library(Seurat)
Docker安裝Seurat
編輯docker pull satijalab/seurat:latest
FROM satijalab/seurat:latest
Seurat的函數
編輯對象交互:用於與 Seurat 對象交互的函數
編輯AnchorSet-class
|
AnchorSet類 |
Cells(<SCTModel>) Cells(<SlideSeq>) Cells(<STARmap>) Cells(<VisiumV1>)
|
獲取細胞名 |
CreateSCTAssayObject()
|
創建SCT Assay對象 |
DietSeurat()
|
縮小Seurat對象 |
FilterSlideSeq()
|
Filter stray beads from Slide-seq puck |
GetAssay()
|
Get an Assay object from a given Seurat object. |
GetImage(<SlideSeq>) GetImage(<STARmap>) GetImage(<VisiumV1>)
|
Get Image Data |
GetIntegrationData()
|
Get integration data |
GetTissueCoordinates(<SlideSeq>) GetTissueCoordinates(<STARmap>) GetTissueCoordinates(<VisiumV1>)
|
Get Tissue Coordinates |
IntegrationAnchorSet-class
|
The IntegrationAnchorSet Class |
IntegrationData-class
|
The IntegrationData Class |
ModalityWeights-class
|
The ModalityWeights Class |
Radius(<SlideSeq>) Radius(<STARmap>) Radius(<VisiumV1>)
|
Get Spot Radius |
RenameCells(<SCTAssay>) RenameCells(<SlideSeq>) RenameCells(<STARmap>) RenameCells(<VisiumV1>)
|
Rename Cells in an Object |
levels(<SCTAssay>) `levels<-`(<SCTAssay>)
|
The SCTModel Class |
SCTResults() `SCTResults<-`()
|
Get SCT results from an Assay |
STARmap-class
|
The STARmap class |
ScaleFactors() scalefactors()
|
Get image scale factors |
SetIntegrationData()
|
Set integration data |
SplitObject()
|
Splits object into a list of subsetted objects. |
TopCells()
|
Find cells with highest scores for a given dimensional reduction technique |
TopFeatures()
|
Find features with highest scores for a given dimensional reduction technique |
TopNeighbors()
|
Get nearest neighbors for given cell |
TransferAnchorSet-class
|
The TransferAnchorSet Class |
UpdateSCTAssays()
|
Update pre-V4 Assays generated with SCTransform in the Seurat to the new SCTAssay class |
VisiumV1-class
|
The VisiumV1 class |
as.CellDataSet()
|
Convert objects to CellDataSet objects |
as.Seurat(<CellDataSet>) as.Seurat(<SingleCellExperiment>)
|
Convert objects to objectsSeurat
|
as.SingleCellExperiment()
|
Convert objects to SingleCellExperiment objects |
as.sparse(<H5Group>) as.data.frame(<Matrix>)
|
Cast to Sparse |
merge(<SCTAssay>)
|
Merge SCTAssay objects |
subset(<AnchorSet>)
|
Subset an AnchorSet object |
預處理:單細胞數據的預處理
編輯CalculateBarcodeInflections()
|
Calculate the Barcode Distribution Inflection |
FindSpatiallyVariableFeatures()
|
Find spatially variable features |
FindVariableFeatures()
|
Find variable features |
GetResidual()
|
Calculate pearson residuals of features not in the scale.data |
HTODemux()
|
Demultiplex samples based on data from cell 'hashing' |
Load10X_Spatial()
|
Load a 10x Genomics Visium Spatial Experiment into a objectSeurat
|
LoadSTARmap()
|
Load STARmap data |
LogNormalize()
|
Normalize raw data |
MULTIseqDemux()
|
Demultiplex samples based on classification method from MULTI-seq (McGinnis et al., bioRxiv 2018) |
NormalizeData()
|
Normalize Data |
Read10X()
|
Load in data from 10X |
Read10X_Image()
|
Load a 10X Genomics Visium Image |
Read10X_h5()
|
Read 10X hdf5 file |
ReadMtx()
|
Load in data from remote or local mtx files |
ReadSlideSeq()
|
Load Slide-seq spatial data |
RelativeCounts()
|
Normalize raw data to fractions |
RunMarkVario()
|
Run the mark variogram computation on a given position matrix and expression matrix. |
RunMoransI()
|
Compute Moran's I value. |
SCTransform()
|
Use regularized negative binomial regression to normalize UMI count data |
SampleUMI()
|
Sample UMI |
ScaleData()
|
Scale and center the data. |
SubsetByBarcodeInflections()
|
Subset a Seurat Object based on the Barcode Distribution Inflection Points |
差異分析
編輯FindAllMarkers()
|
Gene expression markers for all identity classes |
FindConservedMarkers()
|
Finds markers that are conserved between the groups |
FindMarkers()
|
Gene expression markers of identity classes |
FoldChange()
|
Fold Change |
降維分析
編輯JackStraw()
|
Determine statistical significance of PCA scores. |
L2CCA()
|
L2-Normalize CCA |
L2Dim()
|
L2-normalization |
PCASigGenes()
|
Significant genes from a PCA |
ProjectDim()
|
Project Dimensional reduction onto full dataset |
ProjectUMAP()
|
Project query into UMAP coordinates of a reference |
RunCCA()
|
Perform Canonical Correlation Analysis |
RunICA()
|
Run Independent Component Analysis on gene expression |
RunPCA()
|
Run Principal Component Analysis |
RunTSNE()
|
Run t-distributed Stochastic Neighbor Embedding |
RunUMAP()
|
Run UMAP |
ScoreJackStraw()
|
Compute Jackstraw scores significance. |
聚類
編輯FindClusters()
|
Cluster Determination |
FindMultiModalNeighbors()
|
Construct weighted nearest neighbor graph |
FindNeighbors()
|
(Shared) Nearest-neighbor graph construction |
FindSubCluster()
|
Find subclusters under one cluster |
整合分析:與 Seurat v3 集成和標籤傳輸算法相關的函數
編輯AnnotateAnchors()
|
Add info to anchor matrix |
FindIntegrationAnchors()
|
Find integration anchors |
FindTransferAnchors()
|
Find transfer anchors |
GetTransferPredictions()
|
Get the predicted identity |
IntegrateData()
|
Integrate data |
IntegrateEmbeddings()
|
Integrate low dimensional embeddings |
LocalStruct()
|
Calculate the local structure preservation metric |
MapQuery()
|
Map query cells to a reference |
MappingScore()
|
Metric for evaluating mapping success |
MixingMetric()
|
Calculates a mixing metric |
PredictAssay()
|
Predict value from nearest neighbors |
PrepSCTIntegration()
|
Prepare an object list normalized with sctransform for integration. |
SelectIntegrationFeatures()
|
Select integration features |
TransferData()
|
Transfer data |
空間:與空間分辨單細胞數據分析相關的功能
編輯Cells(<SCTModel>) Cells(<SlideSeq>) Cells(<STARmap>) Cells(<VisiumV1>)
|
Get Cell Names |
FilterSlideSeq()
|
Filter stray beads from Slide-seq puck |
FindSpatiallyVariableFeatures()
|
Find spatially variable features |
GetImage(<SlideSeq>) GetImage(<STARmap>) GetImage(<VisiumV1>)
|
Get Image Data |
GetTissueCoordinates(<SlideSeq>) GetTissueCoordinates(<STARmap>) GetTissueCoordinates(<VisiumV1>)
|
Get Tissue Coordinates |
ISpatialDimPlot()
|
Visualize clusters spatially and interactively |
ISpatialFeaturePlot()
|
Visualize features spatially and interactively |
LinkedDimPlot() LinkedFeaturePlot()
|
Visualize spatial and clustering (dimensional reduction) data in a linked, interactive framework |
PolyFeaturePlot()
|
Polygon FeaturePlot |
Radius(<SlideSeq>) Radius(<STARmap>) Radius(<VisiumV1>)
|
Get Spot Radius |
STARmap-class
|
The STARmap class |
ScaleFactors() scalefactors()
|
Get image scale factors |
SlideSeq-class
|
The SlideSeq class |
SpatialPlot() SpatialDimPlot() SpatialFeaturePlot()
|
Visualize spatial clustering and expression data. |
VisiumV1-class
|
The VisiumV1 class |
Mixscape:與mixscape算法相關的函數
編輯CalcPerturbSig()
|
Calculate a perturbation Signature |
DEenrichRPlot()
|
DE and EnrichR pathway visualization barplot |
MixscapeHeatmap()
|
Differential expression heatmap for mixscape |
MixscapeLDA()
|
Linear discriminant analysis on pooled CRISPR screen data. |
PlotPerturbScore()
|
Function to plot perturbation score distributions. |
PrepLDA()
|
Function to prepare data for Linear Discriminant Analysis. |
RunLDA()
|
Run Linear Discriminant Analysis |
RunMixscape()
|
Run Mixscape |
可視化
編輯AugmentPlot()
|
Augments ggplot2-based plot with a PNG image. |
BGTextColor()
|
Determine text color based on background color |
BarcodeInflectionsPlot()
|
Plot the Barcode Distribution and Calculated Inflection Points |
CellScatter()
|
Cell-cell scatter plot |
CellSelector() FeatureLocator()
|
Cell Selector |
CollapseEmbeddingOutliers()
|
Move outliers towards center on dimension reduction plot |
ColorDimSplit()
|
Color dimensional reduction plot by tree split |
CombinePlots()
|
Combine ggplot2-based plots into a single plot |
BlackAndWhite() BlueAndRed() CustomPalette() PurpleAndYellow()
|
Create a custom color palette |
DimHeatmap() PCHeatmap()
|
Dimensional reduction heatmap |
DimPlot() PCAPlot() TSNEPlot() UMAPPlot()
|
Dimensional reduction plot |
DiscretePalette()
|
Discrete colour palettes from the pals package |
DoHeatmap()
|
Feature expression heatmap |
DotPlot()
|
Dot plot visualization |
ElbowPlot()
|
Quickly Pick Relevant Dimensions |
FeaturePlot()
|
Visualize 'features' on a dimensional reduction plot |
FeatureScatter()
|
Scatter plot of single cell data |
GroupCorrelationPlot()
|
Boxplot of correlation of a variable (e.g. number of UMIs) with expression data |
HTOHeatmap()
|
Hashtag oligo heatmap |
HoverLocator()
|
Hover Locator |
IFeaturePlot()
|
Visualize features in dimensional reduction space interactively |
ISpatialDimPlot()
|
Visualize clusters spatially and interactively |
ISpatialFeaturePlot()
|
Visualize features spatially and interactively |
JackStrawPlot()
|
JackStraw Plot |
LabelClusters()
|
Label clusters on a ggplot2-based scatter plot |
LabelPoints()
|
Add text labels to a ggplot2 plot |
LinkedDimPlot() LinkedFeaturePlot()
|
Visualize spatial and clustering (dimensional reduction) data in a linked, interactive framework |
NNPlot()
|
Highlight Neighbors in DimPlot |
PlotClusterTree()
|
Plot clusters as a tree |
PolyDimPlot()
|
Polygon DimPlot |
PolyFeaturePlot()
|
Polygon FeaturePlot |
RidgePlot()
|
Single cell ridge plot |
SeuratTheme() CenterTitle() DarkTheme() FontSize() NoAxes() NoLegend() NoGrid() SeuratAxes() SpatialTheme() RestoreLegend() RotatedAxis() BoldTitle() WhiteBackground()
|
Seurat Themes |
SpatialPlot() SpatialDimPlot() SpatialFeaturePlot()
|
Visualize spatial clustering and expression data. |
VariableFeaturePlot()
|
View variable features |
VizDimLoadings()
|
Visualize Dimensional Reduction genes |
VlnPlot()
|
Single cell violin plot |
Intensity() Luminance()
|
Get the intensity and/or luminance of a color |
構建進化樹
編輯BuildClusterTree()
|
Phylogenetic Analysis of Identity Classes |
實用功能
編輯AddModuleScore()
|
Calculate module scores for feature expression programs in single cells |
AggregateExpression()
|
Aggregated feature expression by identity class |
AverageExpression()
|
Averaged feature expression by identity class |
CaseMatch()
|
Match the case of character vectors |
CellCycleScoring()
|
Score cell cycle phases |
CollapseSpeciesExpressionMatrix()
|
Slim down a multi-species expression matrix, when only one species is primarily of interenst. |
CustomDistance()
|
Run a custom distance function on an input data matrix |
ExpMean()
|
Calculate the mean of logged values |
ExpSD()
|
Calculate the standard deviation of logged values |
ExpVar()
|
Calculate the variance of logged values |
FastRowScale()
|
Scale and/or center matrix rowwise |
GroupCorrelation()
|
Compute the correlation of features broken down by groups with another covariate |
LoadAnnoyIndex()
|
Load the Annoy index file |
LogVMR()
|
Calculate the variance to mean ratio of logged values |
MetaFeature()
|
Aggregate expression of multiple features into a single feature |
MinMax()
|
Apply a ceiling and floor to all values in a matrix |
PercentageFeatureSet()
|
Calculate the percentage of all counts that belong to a given set of features |
RegroupIdents()
|
Regroup idents based on meta.data info |
SaveAnnoyIndex()
|
Save the Annoy index |
GeneSymbolThesarus() UpdateSymbolList()
|
Get updated synonyms for gene symbols |
as.sparse(<H5Group>) as.data.frame(<Matrix>)
|
Cast to Sparse |
數據:Seurat數據描述
編輯cc.genes
|
Cell cycle genes |
cc.genes.updated.2019
|
Cell cycle genes: 2019 update |
便利功能:為方便用戶並保持向後兼容性而包含的功能
編輯DimHeatmap() PCHeatmap()
|
Dimensional reduction heatmap |
DimPlot() PCAPlot() TSNEPlot() UMAPPlot()
|
Dimensional reduction plot |
SpatialPlot() SpatialDimPlot() SpatialFeaturePlot()
|
Visualize spatial clustering and expression data. |