Type of data: flow cytometry and bulkRNA-seq (Exploratory), scRNAseq, spectral flow cytometry
CD8 This script can be divided into 3 parts
A)Define/create the directories where our files are located, merge 2 experiments, perform Arcsinh transformation and create flowSet
- Define the directory where this script and the fcs files are located NB: we are using pregated CD8+ fcs files obtained with flowJo software
- Define workingDirectory and create the directory
- Create flowsets for the two experiments and merge the two flowsets
- Perform Arcsinh transformation (#Arcsinh transformation (this is necessary when you have flow citometry data in fcs format instead of csv) It is well explained here https://wiki.centenary.org.au/display/SPECTRE/Data+transformation, choose cofactors for each channel)
- Define the directory where the transformed files are located and save fcs
- Read the transformed files as flowset
B) Prepare the data to create a single cell experiment (sce) using CATALYST
- Create panel dataframe
- Create metadata dataframe
- Create sce object
C) Perform QC, clustering and dimensionality reduction
- Visualize CATALYST QC plots
- Run FlowSOM and ConsensusClusterPlus
- Run dimensionality reduction (UMAP) and visualize
- Add annotations and visualize
This script plots gene signature enrichments from Zheng et al.
This script includes 3 parts (Preprocessing, integration/batch correction and clonotype data addition, subclustering):
A) Preprocessing
- Load in CellRanger output
- rename rowData, colData and barcodes
- define dimnames(sce)
- Add metadata
- Remove undetected genes
- Infer and remove doublets
- Calculate QC metrics and diagnostic plots
- Find and remove outliers
B) Integration/batch correction and clonotype data addition
- Create seurat object from sce
- Split by batch them normalize, find the most variable features and scale
- integrate the different datasets
- Scale the integrated datased and run PCA, TSNE and UMAP
- Computes the k.param nearest neighbors and then identifies clusters of cells by a shared nearest neighbor (SNN) modularity optimization based clustering algorithm (Louvain).
- Adds the data on TCR (it's a VDJ scRNAseq) to the Seurat object
C) Subclustering
- Pick the resolution for clustering
- Visualize not-annotated clusters' distribution onto 2D UMAP
- Using scGate (https://github.com/carmonalab/scGate) to plot the subsets of interest
- Label the clusters according to scGate results
- Use gating models to subset and save into single rds objects
- Use cluster annotation to subset CD4 cells (identified by scGate). This because CD4 gene is not very well detected in scRNA-seq hence the gating model can be not enough senesitive to "gate" on CD4 (this was discussed a little bit here: carmonalab/scGate#15)
This script can be organized into 8 subsections (A-H)
A)Subclustering and use of custom and published markers along with bulk-RNA seq results and DGE to annotate clusters
- Subclustering as suggested here satijalab/seurat#2087 by timoast
- Use of custom single markers and visualize as DotPlot and FeaturePlot
- Use published signatures and signature of senescence obtained by bulk-seq and plot as feature and violin plots
- Correlation plot of dysfunction vs senescence signature
- DGE (top10 markers)
- Gene coexpression matrix and find genes with correlation > q99
- Annotate clusters
B) Analyze annotated subsets
- Plot and look at clusters proportions and densities across samples, between conditions (group_id)
- Combine top10 and custom markers and plot them as heatmap and as scores with FeaturePlot
- DA analysis using permutation test, speckle (Anova) and CNA
C) Compute trajectories to infer CD8+ cells differentiation path
- Run Slingshot and plot the two trajectories
- Use tradeSeq to fit a generalized additive model (GAM) and then use patternTest to study gene expression
D) Compute gene set variation analysis and infer pathway activity
- Use GSVA and limma to study gene set enrichments between couples of subsets (SenLvsStL, SenLvsActEx, ActExvsStL)
- Use SCpubr and decoupleR for pathway activity inference
E) TCR repertoire analysis
- scRepertoire analysis
- Putative tumor reactive
F) Reclustering with increased resolution and further analyses
- Reclustering and clusters frequencies across conditions
- STARTRAC method
- DGE Int vs. SenL
- Gating model for SLEC markers
- Trm markers
- Gating model for Int markers (from spectral flow data)
G) Velocity inference
- Load in loom files and prepare to analyze in Python via scVelo
- import from python the csv with the info on latent time and different subsets and plot
H) SCENIC
- Download the required databases
- Run SCENIC workflow
- Use exportsForArboreto to export matrix and scenicOptions and analyze in Python using GRNBoost
- Read in GRNBoost output from Python and proceed with the workflow
This script uses the GRNBoost2 function to infer gene regulatory networks
This script
- loads the h5ad file obtained from the Seurat object in python as AnnData
- performs RNA velocity using the scvelo: it uses scv.tl.recover_dynamics to recover the full dynamics and scv.tl.velocity to infer the velocity for each gene
- computes the velocity graph and the cell transitions predicted via the function scvelo.tl.velocity_graph
- computes the latent time using scvelo.tl.latent_time and setting the Naive subset as the key of root cells to be used
This script can be organized into 4 parts
A)Define/create the directories where our files are located, transform the csv in fcs and create flowSet
- Define the directory where this script is located
- Define the directory where the csv files are located NB: we are using pregated CD8+ csv files obtained with the flowJo csv channel values option and then transform them here in fcs files so that we won't need to arcsinh transform the data as explained here https://wiki.centenary.org.au/display/SPECTRE/Data+transformation)
- Define and create the WorkingDirectory (here we'll save the plots) and the directory that will contain the fcs files
- Transform the csv in fcs, save and create the flowSet
B) Prepare the data to create a single cell experiment (sce) using CATALYST
- Create panel dataframe
- Create metadata dataframe
- Visualize density plots and use warpSet to normalize
- Create sce object
C) Perform QC, clustering and dimensionality reduction
- Visualize CATALYST QC plots and remove Ki67 channel because of the very low NRS
- Run FlowSOM and ConsensusClusterPlus
- Run dimensionality reduction - PCA, UMAP and visualize
- Add annotations and visualize
D) Trajectory inference
- Use PCA as dimensionality reduction algorithm and run Slingshot
- Visualize trajectories on first 3 PCs
- Visualize subsets distribution along PT (jitter plot)
- Use UMAP as dimensionality reduction algorithm and run Slingshot
- Visualize trajectories onto 2D UMAP