Skip to main content
7 votes
Accepted

Finding the optimal resolution parameter in Seurat's FindClusters function

Assuming you have an informative selection of variable genes from which you have constructed a number of useful PCs, I'd run a number of iterations with ...
Peter's user avatar
  • 2,634
7 votes
Accepted

Using Seurat to compare mutant vs.wt

Single-cell analysis to compare samples is a long a difficult process. There is very good documentation for 10x Genomics cellranger, the DropSeq Pipeline and the Seurat R package. These tools all have ...
Tom Kelly's user avatar
  • 873
6 votes
Accepted

Seurat with normalized count matrix?

This was addressed by the Seurat developers here: if you have TPM counts, I suggest you don't use Seurat::NormalizeData(), since TPM counts are already normalized for sequencing depth and ...
burger's user avatar
  • 2,199
6 votes
Accepted

Subset on multiple genes in Seurat

I was able to achieve this in the following way: ...
Nikita Vlasenko's user avatar
6 votes
Accepted

Cells with zero expression of a given gene

This has been debated for a few years now as the "dropout" problem, which is actually a mixture of different issues. On one hand, you are sequencing a relatively low input at a depth that ...
gdagstn's user avatar
  • 131
5 votes
Accepted

Which are the use cases for the methods for DE in Seurat

You can take a look at the recently published article: Bias, robustness and scalability in single-cell differential expression analysis. We evaluated 36 approaches using experimental and synthetic ...
plat's user avatar
  • 1,042
5 votes
Accepted

Mapping a list of cells in seurat featureplot

To color the TSNEPlot, you can generate a new column in metadata with the expression levels (High, low, etc). Then use pt.shape to set a shape for each identity. To show binary expression based on ...
Mack123456's user avatar
5 votes

How to set the position of groups in a Seurat object on a FeatureHeatmap plot

I don't think this is possible in Seurat v2, but in v3 you can change the factor levels of the grouping variable to change the plot order: ...
TimStuart's user avatar
  • 684
5 votes
Accepted

How can I obtain the percentage gene expression per identity class in Seurat as further processible numbers (e.g. matrix)?

This can be solved like this: ...
Charles's user avatar
  • 537
5 votes

Merging two dataframes in R

For merging dataframes, I find it easiest to use the tidyverse / dplyr functions inner/full/left/right_join. See the "Data Transformation Cheatsheet" on this page. For the merge that @...
gringer's user avatar
  • 14.3k
5 votes
Accepted

TCR-seq or scRNA-seq

The 3' gene expression protocol will capture TCR and BCR mRNAs but this may not be very helpful to you. As you already mentioned only the 3' end will be sequenced, which are the constant regions. With ...
PPK's user avatar
  • 886
4 votes

Is it possible to identify cells that are expressing two or more genes in Seurat?

The counts stored in the Seurat object are: raw counts ([email protected]), the log + normalized counts (seuratobject@data), and the scaled counts ([email protected]). ...
Peter's user avatar
  • 2,634
4 votes
Accepted

Violinplot of gene expression

You want to (1) see the mean for each gene, and also to (2) calculate a ratio of expression levels of two genes, then compare it between clusters. (1) First, notice that ...
Peter's user avatar
  • 2,634
4 votes
Accepted

Percentage distribution of cells in all clusters based on their treatment condition?

Here is a solution using dplyr and ggplot2: ...
TimStuart's user avatar
  • 684
4 votes
Accepted

how to merge more than two sample in Seurat?

You have fed arguments to the MergeSeurat() function that it does not expect. In terms of objects, MergeSeurat() accepts only 2 ...
haci's user avatar
  • 4,142
4 votes

Is it important to filter out poor quality cells before performing an integration analysis on single cell RNA sequencing data?

It is absolutely necessary to remove low quality cells: In the case of CCA (and this applies to other "integration" or "data alignment" methods as well), one would ...
haci's user avatar
  • 4,142
4 votes
Accepted

The biological meaning of the random variables and the responses in Seurat analysis

In the linked article the authors formalize microarray analysis as the study of the joint distributions of $\overrightarrow{X}_i$ and $Y_i$, where $\overrightarrow{X}_i$ is a vector of random ...
Ian Sudbery's user avatar
  • 3,321
3 votes

Seurat Merged objects tSNE - How to paint on original IDs?

Below a few lines of code that accompany BC Wang's answer. After using MergeSeurat the sample name will be added to meta data under orig.ident. this can then be used to color the tSNE either using ...
Mack123456's user avatar
3 votes

How I can test my hypothesises computationally

This is what packages like FateID and Monocle are for, namely taking single-cell RNAseq data and inferring differentiation trajectories from it. Don't try to reinvent the wheel on this, there are a ...
Devon Ryan's user avatar
  • 19.6k
3 votes

Finding the optimal resolution parameter in Seurat's FindClusters function

Have a look into clustree to assess the different clusters by clustering them and see different levels. Example: ...
Samad Elka's user avatar
3 votes
Accepted

How I can reproduce this heat map

In case it is still helpful as the post is rather old, the code below would generate a heatmap with annotations thanks to the ComplexHeatmap package. But before ...
haci's user avatar
  • 4,142
3 votes
Accepted

Output of Seurat FindAllMarkers parameters

pct.1– The percentage of cells where the gene is detected in the first group p_val_adj– Adjusted p-value, based on bonferroni ...
Kohl Kinning's user avatar
  • 1,149
3 votes

Manually define clusters in Seurat and determine marker genes

Seurat has functions for adding metadata and setting identities. Get unique cell names: cell.labels <- seuratobject@ident Replace column and its name with ...
Peter's user avatar
  • 2,634
3 votes
Accepted

Manually define clusters in Seurat and determine marker genes

I think you are looking to FindAllMarkers function from Seurat. As you said, you just have to define your ...
plat's user avatar
  • 1,042
3 votes

Finding the optimal resolution parameter in Seurat's FindClusters function

That is a very general recommendation. Depending on your experiment, you can get a very different number of clusters with the same number of cells at the same resolution. You can actually use a vector ...
burger's user avatar
  • 2,199
3 votes
Accepted

FeaturePlot from Seurat: change its title

I tried with some data that I have and this is working for me: ...
plat's user avatar
  • 1,042
3 votes
Accepted

about dotplot legend meaning

The expression values for each gene are scaled / standardized by subtracting the genes mean expression and dividing by its standard deviation. A value of -1 would imply it's one standard deviation ...
GWW's user avatar
  • 752
3 votes
Accepted

Using external list of PCs for clustering

There is a way to do this, and even better--there is documentation for how to do it! No surprise coming from the Satija Lab. In the vignette they perform multidimensional scaling, but the idea is the ...
Kohl Kinning's user avatar
  • 1,149
3 votes

Changing a wide range of colours to a limited gradient

TSNEPlot() TSNEPlot() will always treat your variables as discrete. My approach is to manually generate a gradient with unique colors for each factor level and ...
Kohl Kinning's user avatar
  • 1,149
3 votes
Accepted

Changing a wide range of colours to a limited gradient

If you would like to color discrete intervals on a gradient as opposed to having a continuous gradient (like your second plot), use this approach. It is similar to the approach in the answer I ...
Kohl Kinning's user avatar
  • 1,149

Only top scored, non community-wiki answers of a minimum length are eligible