Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seurat v4.0.0 #3982

Merged
merged 913 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
913 commits
Select commit Hold shift + click to select a range
5957f5b
add doc archive
andrewwbutler Jan 1, 2021
be1c98e
correct tests
yuhanH Jan 4, 2021
0a86d95
minor fixes
andrewwbutler Jan 4, 2021
a948928
Merge branch 'release/4.0.0' into feat/SCTAModel
yuhanH Jan 4, 2021
24d42bf
Add check.matrix parameter to CreateSeuratObject
timoast Jan 4, 2021
2cfbcc9
Update docs
timoast Jan 4, 2021
04e6243
merge
andrewwbutler Jan 4, 2021
a420e11
Fix CreateSeuratObject generic arguments
timoast Jan 4, 2021
e37b372
updates to SCTAssay
andrewwbutler Jan 5, 2021
f1da33b
fix test tolerances
andrewwbutler Jan 5, 2021
9447957
Merge pull request #488 from satijalab/fix/test-tolerances
andrewwbutler Jan 5, 2021
614be90
merge
andrewwbutler Jan 5, 2021
2d9965c
cran check fixes
andrewwbutler Jan 6, 2021
d828a55
Merge branch 'release/4.0.0' into feat/checkmatrix
timoast Jan 7, 2021
1eacbce
Use check.matrix=FALSE internally
timoast Jan 7, 2021
51d50ce
Update DimPlot Manual Entry
samuel-marsh Jan 8, 2021
fa07777
Merge pull request #3898 from samuel-marsh/develop
timoast Jan 8, 2021
981d168
dims not start from 1
yuhanH Jan 8, 2021
4568f0a
update format
yuhanH Jan 8, 2021
d1a4a24
Fix FindWeights to make it consistent with R version
saketkc Jan 8, 2021
a48a939
Retire do.cpp
saketkc Jan 8, 2021
b9d8b01
draft new vignette landing, update mixscape vignette
andrewwbutler Jan 8, 2021
83b70f3
dims update
yuhanH Jan 8, 2021
2b6fe5f
update docs, bump version
andrewwbutler Jan 8, 2021
7dfae4f
Merge pull request #489 from satijalab/feat/transfer_dims
andrewwbutler Jan 8, 2021
856dc76
Fix tests
saketkc Jan 9, 2021
497264b
Fix tests
saketkc Jan 9, 2021
333a466
Fix tests
saketkc Jan 9, 2021
8a5a24b
Merge branch 'release/4.0.0' into fix/docpp
saketkc Jan 9, 2021
56ea410
bump version
andrewwbutler Jan 10, 2021
9903dea
Merge pull request #490 from satijalab/fix/docpp
andrewwbutler Jan 10, 2021
ac76ea5
Merge branch 'release/4.0.0' into feat/pkgdown-v4
andrewwbutler Jan 10, 2021
fa8cd5b
Merge branch 'release/4.0.0' into feat/SCTAModel
andrewwbutler Jan 10, 2021
f98a19f
groups to model, minor fixes, doc updates
andrewwbutler Jan 10, 2021
c1ce9af
Merge branch 'release/4.0.0' of github.com:satijalab/seurat into rele…
andrewwbutler Jan 10, 2021
7779258
update citation info
andrewwbutler Jan 10, 2021
ed53a84
update DESCRIPTION
andrewwbutler Jan 10, 2021
df05023
Fix title
timoast Jan 10, 2021
d78c9ae
add v4 NEWS items
andrewwbutler Jan 10, 2021
889246a
remove todo check
yuhanH Jan 10, 2021
1878017
Merge branch 'release/4.0.0' into feat/SCTAModel
yuhanH Jan 10, 2021
7e59de8
update docu
yuhanH Jan 10, 2021
05b5172
update docu
yuhanH Jan 10, 2021
3bb312d
update comments
yuhanH Jan 10, 2021
8dd24a4
update docu
yuhanH Jan 10, 2021
58a93e7
reorder fxns alphabetically in file
andrewwbutler Jan 11, 2021
679efe2
bump version
andrewwbutler Jan 11, 2021
787f172
Merge pull request #493 from satijalab/fix/WNN_docu
andrewwbutler Jan 11, 2021
a905192
Merge branch 'release/4.0.0' into feat/citation-update
andrewwbutler Jan 11, 2021
107beb9
Merge branch 'release/4.0.0' into feat/AnnotateAnchors
andrewwbutler Jan 11, 2021
fd96609
return NA for missing meta.data
yuhanH Jan 11, 2021
12261ea
change SCTassay show message
yuhanH Jan 11, 2021
81c7e26
reference model SCTAssay
yuhanH Jan 12, 2021
a8bec8f
refactor SCTransform
yuhanH Jan 12, 2021
c0df780
merge
andrewwbutler Jan 12, 2021
aa0f7db
Merge pull request #491 from satijalab/feat/citation-update
andrewwbutler Jan 12, 2021
2d4b75a
merge
andrewwbutler Jan 12, 2021
a120499
return different gene attr
yuhanH Jan 12, 2021
e844c69
vignette updates
andrewwbutler Jan 12, 2021
d712828
correct reference model
yuhanH Jan 12, 2021
22cc8af
format
yuhanH Jan 12, 2021
e023e13
modify merge, GetResiduals
yuhanH Jan 12, 2021
e5ac4fd
add banner, update landing, test new integration vignettes
andrewwbutler Jan 12, 2021
d4914f2
modify merge
yuhanH Jan 12, 2021
1bb58bb
merge sct when umi.assay not exsit
yuhanH Jan 12, 2021
298c8fe
Create Assay for scale.data
yuhanH Jan 12, 2021
475337d
add sessionInfo
andrewwbutler Jan 12, 2021
d0d9c31
integration vignette restructuring/updates
andrewwbutler Jan 12, 2021
3f84472
typo fix
andrewwbutler Jan 13, 2021
74b4fba
test pipeline
andrewwbutler Jan 13, 2021
1baa4e3
pipeline test
andrewwbutler Jan 13, 2021
93b8b41
minor tweaks
andrewwbutler Jan 13, 2021
771308a
add atacseq vignette
andrewwbutler Jan 13, 2021
3531170
fix duplicate chunk name
andrewwbutler Jan 13, 2021
d86fa02
Update R/preprocessing.R
yuhanH Jan 14, 2021
23fe750
Update R/preprocessing.R
yuhanH Jan 14, 2021
141afe2
Update R/preprocessing.R
yuhanH Jan 14, 2021
c56c064
update verbose
yuhanH Jan 14, 2021
6bb5617
update model name
yuhanH Jan 14, 2021
865f6dc
replace complete.cases
yuhanH Jan 14, 2021
451a4d0
revert changes
andrewwbutler Jan 14, 2021
afd6bf3
update docs for residual.features
Jan 15, 2021
f9f8d28
revert accidental loom doc update
Jan 15, 2021
ff48d5e
Merge branch 'feat/SCTransform_refactor' of https://github.com/satija…
Jan 15, 2021
f7b3542
Revert "Merge branch 'feat/SCTransform_refactor' of https://github.co…
Jan 15, 2021
a0cc1b9
Revert "revert accidental loom doc update"
Jan 15, 2021
320abd1
manual doc update
Jan 15, 2021
0255f03
merge
andrewwbutler Jan 15, 2021
43839ae
bump version, update NEWS
andrewwbutler Jan 15, 2021
3804c67
Merge pull request #473 from satijalab/feat/checkmatrix
andrewwbutler Jan 15, 2021
0bf3c46
merge Assay and SCTAssay
yuhanH Jan 15, 2021
cc77156
minor style fixes
andrewwbutler Jan 15, 2021
aef720e
Merge branch 'feat/SCTransform_refactor' of github.com:satijalab/seur…
andrewwbutler Jan 15, 2021
bd1eb04
Update R/objects.R
yuhanH Jan 15, 2021
927be0a
Update R/objects.R
yuhanH Jan 15, 2021
e30ca20
Merge pull request #495 from satijalab/feat/SCTransform_refactor
yuhanH Jan 15, 2021
6349dfa
Merge branch 'release/4.0.0' into feat/AnnotateAnchors
andrewwbutler Jan 15, 2021
7c3b8ea
bump version, update NEWS
andrewwbutler Jan 15, 2021
81e6361
Merge pull request #297 from satijalab/feat/AnnotateAnchors
andrewwbutler Jan 15, 2021
5c883d7
update PrepSCTIntegration
yuhanH Jan 15, 2021
279b29b
Merge branch 'release/4.0.0' of github.com:satijalab/seurat into rele…
andrewwbutler Jan 15, 2021
60e1ae5
minor formatting tweaks
andrewwbutler Jan 15, 2021
4817ea7
bump version, update NEWS
andrewwbutler Jan 15, 2021
82405f6
run docs
andrewwbutler Jan 15, 2021
d709431
Merge pull request #3876 from Hoohm/release/4.0.0
andrewwbutler Jan 15, 2021
36cd183
fake SCTAssay conversion
yuhanH Jan 15, 2021
fd0b318
Merge branch 'release/4.0.0' into feat/pkgdown-v4
andrewwbutler Jan 15, 2021
36a398b
add docker info, change get started link
andrewwbutler Jan 15, 2021
50e5ac9
Rasterization imrovements
saketkc Jan 16, 2021
176c56d
Update NEWS; bump version
saketkc Jan 16, 2021
8fec9a6
Merge pull request #498 from satijalab/feat/raster_featurescatter2
andrewwbutler Jan 17, 2021
6d435ed
convert all assay to SCTAssay
yuhanH Jan 17, 2021
a8c7543
Create SCT Assay
yuhanH Jan 17, 2021
3e6bac5
SCTAssay for integration
yuhanH Jan 17, 2021
0957c02
merge
andrewwbutler Jan 18, 2021
2a803fa
style fixes
andrewwbutler Jan 18, 2021
ac90078
Merge branch 'release/4.0.0' into feat/SCTAModel
andrewwbutler Jan 18, 2021
3b5362a
doc fix
andrewwbutler Jan 18, 2021
13cea16
fix CRAN skipped tests
andrewwbutler Jan 18, 2021
46f2c3a
return empty list for no SCTModel case
andrewwbutler Jan 18, 2021
d100b13
fix to GetResidual
andrewwbutler Jan 18, 2021
0d1cdaa
fix SCTAssay RenameCells and inherited class replacements
andrewwbutler Jan 18, 2021
8834c69
reference model IntegrateData
yuhanH Jan 18, 2021
08c06ed
update SCTModel
yuhanH Jan 18, 2021
efaf310
name integrated refmodel, minor style fixes
andrewwbutler Jan 18, 2021
602428c
Merge pull request #499 from satijalab/feat/IntegrationAnchor_referen…
andrewwbutler Jan 18, 2021
4e10257
fix merge NA
yuhanH Jan 18, 2021
5fe244b
fix GetResidualSCTModel
yuhanH Jan 18, 2021
2445a5f
Integrate data variable genes
yuhanH Jan 18, 2021
70e38d2
change reference model name
yuhanH Jan 18, 2021
a254590
update docu
yuhanH Jan 18, 2021
cd7b347
replace complete.cases with rowAnyNAs, avoid all NA features in GetRe…
andrewwbutler Jan 18, 2021
be23da4
integration merge fix
andrewwbutler Jan 18, 2021
c68d54a
Finalize SeuratObject split
mojaveazure Jan 19, 2021
a837c72
Merge branch 'release/4.0.0' into feat/ImportObject
mojaveazure Jan 19, 2021
752e699
Fix docs for subset.AnchorSet
mojaveazure Jan 19, 2021
e4203a7
Remove check.matrix from CreateAssayObject calls
mojaveazure Jan 19, 2021
95b3b3a
update integration titles/order
andrewwbutler Jan 19, 2021
0a6bd01
Merge branch 'release/4.0.0' into feat/pkgdown-v4
andrewwbutler Jan 19, 2021
e9343df
yaml fix
andrewwbutler Jan 19, 2021
918b0c4
Merge pull request #501 from satijalab/feat/ImportObject
andrewwbutler Jan 19, 2021
9969ce5
bump version
andrewwbutler Jan 19, 2021
755a215
update clusters annotations
yuhanH Jan 19, 2021
0f6209d
update clusters
yuhanH Jan 19, 2021
a596d33
merge
andrewwbutler Jan 19, 2021
9ddb7bf
normalize query in TransferAnchors
yuhanH Jan 19, 2021
ca487b3
fill in missing residuals in merge.SCTAssay
andrewwbutler Jan 19, 2021
fcb1324
update test
yuhanH Jan 19, 2021
25ecf24
Use RowMergeSparseMatrices from SeuratObject
mojaveazure Jan 19, 2021
8bf5899
merge
andrewwbutler Jan 19, 2021
1b55107
fix scale.data empty error
yuhanH Jan 19, 2021
3046bd7
fix empty scale.data
yuhanH Jan 20, 2021
40410fa
test against develop Signac
andrewwbutler Jan 20, 2021
553bb03
fix PrepVSTResult
yuhanH Jan 20, 2021
aa3c3bd
minor style tweaks
andrewwbutler Jan 20, 2021
0c1aeb7
remove Signac develop install
andrewwbutler Jan 20, 2021
edb34b7
update SCTAssay
yuhanH Jan 20, 2021
253d3af
add recompute.residuals parameter, update validation logic
andrewwbutler Jan 21, 2021
b15b5e0
fix tests
andrewwbutler Jan 21, 2021
9edad6f
doc fix
andrewwbutler Jan 21, 2021
cffdcc8
Merge branch 'feat/SCTAModel' into feat/TransAnchor_normalization
andrewwbutler Jan 21, 2021
ecb2b13
WNN three way
yuhanH Jan 21, 2021
e8ca9cc
UpdateSCTAssay -> UpdateSCTAssays
andrewwbutler Jan 21, 2021
36386a3
bump version, update NEWS
andrewwbutler Jan 21, 2021
4c58bf2
Merge pull request #465 from satijalab/feat/SCTAModel
andrewwbutler Jan 21, 2021
5408ca8
merge
andrewwbutler Jan 21, 2021
711c198
switch to devtools::check
andrewwbutler Jan 21, 2021
8af1a79
Merge pull request #509 from satijalab/fix/cran_tests
andrewwbutler Jan 21, 2021
0f99779
update docu
yuhanH Jan 21, 2021
e7f4ef5
Merge branch 'release/4.0.0' into feat/WNN_trimodal_SCTAssay
yuhanH Jan 21, 2021
3f29b87
Merge branch 'release/4.0.0' into feat/pkgdown-v4
andrewwbutler Jan 21, 2021
dadd9ea
remove CheckMatrix
andrewwbutler Jan 21, 2021
c58d382
bump version
andrewwbutler Jan 21, 2021
1c138db
Merge pull request #510 from satijalab/fix/remove-checkmatrix
andrewwbutler Jan 21, 2021
e68b712
Merge branch 'release/4.0.0' into feat/RemoveDeprecated
mojaveazure Jan 21, 2021
7cf45f7
Merge branch 'release/4.0.0' into feat/WNN_trimodal_SCTAssay
yuhanH Jan 22, 2021
a2f3be5
Update conversion vignette for current h5ad and loom options
mojaveazure Jan 22, 2021
c2684ba
Bump develop version
mojaveazure Jan 22, 2021
98aea37
restore subset.SCTAssay
andrewwbutler Jan 22, 2021
a9ff71b
bump version
andrewwbutler Jan 22, 2021
ad84e40
Merge pull request #511 from satijalab/fix/restore_subset
andrewwbutler Jan 22, 2021
04c0412
Merge branch 'release/4.0.0' into feat/pkgdown-v4
andrewwbutler Jan 22, 2021
6c13b40
Merge branch 'release/4.0.0' into feat/WNN_trimodal_SCTAssay
yuhanH Jan 22, 2021
04a8651
Remove TF.IDF
timoast Jan 22, 2021
6a60a07
Merge branch 'release/4.0.0' into feat/RemoveDeprecated
andrewwbutler Jan 22, 2021
5b8ea21
minor style changes
andrewwbutler Jan 22, 2021
6c73245
Merge pull request #508 from satijalab/feat/WNN_trimodal_SCTAssay
yuhanH Jan 22, 2021
b767dc5
Merge branch 'release/4.0.0' into feat/RemoveDeprecated
mojaveazure Jan 22, 2021
ed7afc7
Bump develop version
mojaveazure Jan 22, 2021
d4763e0
Remove old source files
mojaveazure Jan 23, 2021
ece1d9e
Remove old test files
mojaveazure Jan 23, 2021
3166806
Merge pull request #429 from satijalab/feat/RemoveDeprecated
mojaveazure Jan 23, 2021
068a66b
merge
andrewwbutler Jan 23, 2021
3827f7c
Merge branch 'release/4.0.0' into feat/TransAnchor_normalization
andrewwbutler Jan 23, 2021
10266e0
suppress unnecessary warning
andrewwbutler Jan 24, 2021
e3f28ad
bump version, update NEWS
andrewwbutler Jan 24, 2021
95382db
modify stops
yuhanH Jan 24, 2021
b783a16
Merge pull request #502 from satijalab/feat/TransAnchor_normalization
andrewwbutler Jan 24, 2021
c90f83e
Merge branch 'release/4.0.0' into feat/pkgdown-v4
andrewwbutler Jan 24, 2021
66efaa6
correctly store UMI assay when running SCTransform
andrewwbutler Jan 24, 2021
c0d19a4
bump version
andrewwbutler Jan 25, 2021
85aabd7
Merge pull request #512 from satijalab/fix/SCT_umiassay
andrewwbutler Jan 25, 2021
89c553f
Merge branch 'release/4.0.0' into feat/pkgdown-v4
andrewwbutler Jan 25, 2021
11629ab
Rahul adds
Jan 25, 2021
ddacdd5
Update author list
mojaveazure Jan 25, 2021
896e7f1
Update .Rbuildignore
mojaveazure Jan 25, 2021
8b8ed16
Update author list
mojaveazure Jan 25, 2021
3db9b57
Add glmGamPoi
jaisonj708 Jan 25, 2021
760894d
use more dims
jaisonj708 Jan 25, 2021
420d6b1
Merge branch 'feat/rs_vignettes' into feat/pkgdown-v4
andrewwbutler Jan 26, 2021
9a198c2
link + minor fixes
andrewwbutler Jan 26, 2021
8ba505a
update CITATION
andrewwbutler Jan 26, 2021
6757dd4
remote fixes
andrewwbutler Jan 26, 2021
88a25f6
fix 3k load
andrewwbutler Jan 26, 2021
d3999ff
fix duplicate chunk label issue
andrewwbutler Jan 26, 2021
51fb042
another duplicate chunk fix
andrewwbutler Jan 26, 2021
d3193a0
more fixes
andrewwbutler Jan 26, 2021
6eb14c3
minor fix
andrewwbutler Jan 26, 2021
80d3009
trigger rebuild
andrewwbutler Jan 26, 2021
607304f
testing
andrewwbutler Jan 26, 2021
a7ba6c6
testing
andrewwbutler Jan 26, 2021
5fd154f
testing
andrewwbutler Jan 26, 2021
a26d41f
testing
andrewwbutler Jan 26, 2021
8d5d9df
testing
andrewwbutler Jan 26, 2021
040536c
revert to 20 dims
andrewwbutler Jan 26, 2021
98260e4
Add HSPCs
jaisonj708 Jan 26, 2021
d32c791
minor fixes, use SeuratData when possible
andrewwbutler Jan 26, 2021
537002b
merge
andrewwbutler Jan 26, 2021
737d80c
update maintainer, minor fixes
andrewwbutler Jan 26, 2021
d5dc9d6
ATAC/RNA vignette
Jan 26, 2021
f3908ab
Merge branch 'feat/rs_vignettes' into feat/pkgdown-v4
andrewwbutler Jan 26, 2021
be1e70b
test atac vignette
andrewwbutler Jan 27, 2021
0163a42
Bump minimum R version
mojaveazure Jan 27, 2021
7b5b220
test timings upload
andrewwbutler Jan 27, 2021
827f1fa
full build
andrewwbutler Jan 27, 2021
663e6f9
Merge pull request #513 from satijalab/fix/rversion
andrewwbutler Jan 27, 2021
ff1bb15
Merge branch 'release/4.0.0' into feat/pkgdown-v4
andrewwbutler Jan 27, 2021
21e2bb3
image fix
andrewwbutler Jan 27, 2021
9242f58
Merge pull request #487 from satijalab/feat/pkgdown-v4
andrewwbutler Jan 27, 2021
2cab995
prep for CRAN release
andrewwbutler Jan 27, 2021
aacba25
Update docs
mojaveazure Jan 27, 2021
7c77437
Update date, package docs
mojaveazure Jan 27, 2021
86d204f
Update CRAN comments
mojaveazure Jan 27, 2021
623bf07
More DOI replacements
mojaveazure Jan 27, 2021
a8ad427
Merge pull request #514 from satijalab/release/4.0.0
mojaveazure Jan 27, 2021
1e29aff
fix FVF on SCTAssay
andrewwbutler Jan 28, 2021
ad86a5c
set min to avoid NA warnings
andrewwbutler Jan 28, 2021
05c783b
Merge branch 'master' into develop
mojaveazure Jan 28, 2021
55df279
Merge pull request #516 from satijalab/fix/FVF_SCT
mojaveazure Jan 28, 2021
12a93a5
Merge branch 'develop' of github.com:satijalab/seurat-private into de…
mojaveazure Jan 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
link + minor fixes
  • Loading branch information
andrewwbutler committed Jan 26, 2021
commit 9a198c2d0b45b22487f6262400ebaf029181e59e
2 changes: 1 addition & 1 deletion vignettes/de_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ head(monocyte.de.markers)
The results data frame has the following columns :

* p_val : p_val (unadjusted)
* avg_logFC : log fold-chage of the average expression between the two groups. Positive values indicate that the feature is more highly expressed in the first group.
* avg_logFC : log fold-change of the average expression between the two groups. Positive values indicate that the feature is more highly expressed in the first group.
* pct.1 : The percentage of cells where the feature is detected in the first group
* pct.2 : The percentage of cells where the feature is detected in the second group
* p_val_adj : Adjusted p-value, based on Bonferroni correction using all features in the dataset.
Expand Down
2 changes: 1 addition & 1 deletion vignettes/future_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ggplot(timing.comparisons, aes(fxn, time)) + geom_bar(aes(fill = strategy), stat
# Frequently asked questions

1. **Where did my progress bar go?**
<br>Unfortantely, the when running these functions in any of the parallel plan modes you will lose the progress bar. This is due to some technical limitations in the `future` framework and R generally. If you want to monitor function progress, you'll need to forgo parallelization and use `plan("sequential")`.
<br>Unfortunately, the when running these functions in any of the parallel plan modes you will lose the progress bar. This is due to some technical limitations in the `future` framework and R generally. If you want to monitor function progress, you'll need to forgo parallelization and use `plan("sequential")`.

2. **What should I do if I keep seeing the following error?**
```
Expand Down
2 changes: 1 addition & 1 deletion vignettes/hashing_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pbmc.hashtag <- ScaleData(pbmc.hashtag, features = VariableFeatures(pbmc.hashtag

## Adding HTO data as an independent assay

You can read more about working with multi-modal data [here](https://satijalab.org/seurat/multimodal_vignette.html)
You can read more about working with multi-modal data [here](multimodal_vignette.html)

```{r hto_assay}
# Add HTO data as a new assay independent from RNA
Expand Down
48 changes: 26 additions & 22 deletions vignettes/integration_introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ We then identify anchors using the `FindIntegrationAnchors()` function, which ta
```{r find.anchors}
immune.anchors <- FindIntegrationAnchors(object.list = ifnb.list, anchor.features = features)
```
```{r integrate.data}

```{r integrate.data}
# this command creates an 'integrated' data assay
immune.combined <- IntegrateData(anchorset = immune.anchors)
```
Expand All @@ -99,7 +99,6 @@ immune.combined <- IntegrateData(anchorset = immune.anchors)
Now we can run a single integrated analysis on all cells!

```{r clustering, results='hide', message=FALSE}

# specify that we will perform downstream analysis on the corrected data
# note that the original unmodified data still resides in the 'RNA' assay
DefaultAssay(immune.combined) <- "integrated"
Expand Down Expand Up @@ -140,14 +139,12 @@ We can explore these marker genes for each cluster and use them to annotate our

```{r annotate, results = 'hide', message=FALSE, fig.height = 8}
FeaturePlot(immune.combined, features = c("CD3D", "SELL", "CREM", "CD8A", "GNLY", "CD79A", "FCGR3A", "CCL2", "PPBP"), min.cutoff = "q9")

immune.combined <- RenameIdents(immune.combined, "0" = "CD14 Mono", "1" = "CD4 Naive T", "2" = "CD4 Memory T", "3" = "CD16 Mono", "4" = "B", "5" = "CD8 T", "6" = "NK" , "7" = "T activated", "8" = "DC", "9" = "B Activated", "10" = "Mk", "11" = "pDC", "12" = "Mono/Mk Doublets", "13" = "Eryth")
immune.combined <- RenameIdents(immune.combined, "0" = "CD14 Mono", "1" = "CD4 Naive T", "2" = "CD4 Memory T", "3" = "CD16 Mono", "4" = "B", "5" = "CD8 T", "6" = "NK" , "7" = "T activated", "8" = "DC", "9" = "B Activated", "10" = "Mk", "11" = "pDC", "12" = "Eryth", "13" = "Mono/Mk Doublets")
ifnb.list <- lapply(X = ifnb.list, FUN = function(x) {
x[['seurat_annotations']] <- Idents(immune.combined)[Cells(x)]
Idents(x) <- 'seurat_annotations'
x
})

DimPlot(immune.combined, label = TRUE)
```

Expand All @@ -163,6 +160,12 @@ DotPlot(immune.combined, features = markers.to.plot, cols = c('blue', 'red'),
dot.scale = 8, split.by = "stim") + RotatedAxis()
```

```{r save.img, include = FALSE}
plot <- DotPlot(immune.combined, features = markers.to.plot, cols = c('blue', 'red'),
dot.scale = 6, split.by = "stim") + RotatedAxis()
ggsave(filename = "../output/images/pbmc_alignment.png", height = 7, width = 12, plot = plot)
```

### Identify differential expressed genes across conditions

Now that we've aligned the stimulated and control cells, we can start to do comparative analyses and look at the differences induced by stimulation. One way to look broadly at these changes is to plot the average expression of both the stimulated and control cells and look for genes that are visual outliers on a scatter plot. Here, we take the average expression of both the stimulated and control naive T cells and CD14 monocyte populations and generate the scatter plots, highlighting genes that exhibit dramatic responses to interferon stimulation.
Expand Down Expand Up @@ -201,11 +204,12 @@ b.interferon.response <- FindMarkers(immune.combined, ident.1 = "B_STIM", ident.
head(b.interferon.response, n = 15)
```

Another useful way to visualize these changes in gene expression is with the `split.by` option to the `FeaturePlot` or `VlnPlot` function. This will display FeaturePlots of the list of given genes, split by a grouping variable (stimulation condition here). Genes such as CD3D and GNLY are canonical cell type markers (for T cells and NK/CD8 T cells) that are virtually unaffected by interferon stimulation and display similar gene expression patterns in the control and stimulated group. IFI6 and ISG15, on the other hand, are core interferon response genes and are upregulated accordingly in all cell types. Finally, CD14 and CXCL10 are genes that show a cell type specific interferon response. CD14 expression decreases after stimulation in CD14 monocytes, which could lead to misclassification in a supervised analysis framework, underscoring the value of integrated analysis. CXCL10 shows a distinct upregulation in monocytes and B cells after interferon stimulation but not in other cell types.
Another useful way to visualize these changes in gene expression is with the `split.by` option to the `FeaturePlot()` or `VlnPlot()` function. This will display FeaturePlots of the list of given genes, split by a grouping variable (stimulation condition here). Genes such as CD3D and GNLY are canonical cell type markers (for T cells and NK/CD8 T cells) that are virtually unaffected by interferon stimulation and display similar gene expression patterns in the control and stimulated group. IFI6 and ISG15, on the other hand, are core interferon response genes and are upregulated accordingly in all cell types. Finally, CD14 and CXCL10 are genes that show a cell type specific interferon response. CD14 expression decreases after stimulation in CD14 monocytes, which could lead to misclassification in a supervised analysis framework, underscoring the value of integrated analysis. CXCL10 shows a distinct upregulation in monocytes and B cells after interferon stimulation but not in other cell types.

```{r feature.heatmaps, fig.height = 14}
FeaturePlot(immune.combined, features = c("CD3D", "GNLY", "IFI6"), split.by = "stim", max.cutoff = 3, cols = c("grey", "red"))
```

```{r splitvln, fig.height = 12}
plots <- VlnPlot(immune.combined, features = c("LYZ", "ISG15", "CXCL10"), split.by = "stim", group.by = "celltype", pt.size = 0, combine = FALSE)
wrap_plots(plots = plots, ncol = 1)
Expand All @@ -215,14 +219,6 @@ wrap_plots(plots = plots, ncol = 1)
saveRDS(immune.combined, file = "../output/immune.combined.rds")
```

```{r save.img, include = FALSE}
plot <- DimPlot(immune.combined, group.by = "stim") +
xlab("UMAP 1") + ylab("UMAP 2") +
theme(axis.title = element_text(size = 18), legend.text = element_text(size = 18)) +
guides(colour = guide_legend(override.aes = list(size = 10)))
ggsave(filename = "../output/images/pbmc_alignment.png", height = 7, width = 12, plot = plot)
```

```{r save.times, include = FALSE}
write.csv(x = t(as.data.frame(all_times)), file = "../output/timings/immune_alignment_times.csv")
```
Expand All @@ -233,20 +229,17 @@ In [Hafemeister and Satija, 2019](https://genomebiology.biomedcentral.com/articl

Below, we demonstrate how to modify the Seurat integration workflow for datasets that have been normalized with the sctransform workflow. The commands are largely similar, with a few key differences:

* Normalize datasets individually by `SCTransform`, instead of `NormalizeData` prior to integration
* Normalize datasets individually by `SCTransform()`, instead of `NormalizeData()` prior to integration
* As discussed further in our [SCTransform vignette](sctransform_vignette.html), we typically use 3,000 or more features for analysis downstream of sctransform.
* Run the `PrepSCTIntegration` function prior to identifying anchors
* When running `FindIntegrationAnchors`, and `IntegrateData`, set the `normalization.method` parameter to the value `SCT`.
* When running sctransform-based workflows, including integration, do not run the `ScaleData` function
* Run the `PrepSCTIntegration()` function prior to identifying anchors
* When running `FindIntegrationAnchors()`, and `IntegrateData()`, set the `normalization.method` parameter to the value `SCT`.
* When running sctransform-based workflows, including integration, do not run the `ScaleData()` function


```{r panc8.cca.sct.init, results='hide', message=FALSE, fig.keep='none'}
LoadData('ifnb')
ifnb.list <- SplitObject(ifnb, split.by = "stim")

ifnb.list <- lapply(X = ifnb.list, FUN = function(x) {
x <- SCTransform(x)
})
ifnb.list <- lapply(X = ifnb.list, FUN = SCTransform)
features <- SelectIntegrationFeatures(object.list = ifnb.list, nfeatures = 3000)
ifnb.list <- PrepSCTIntegration(object.list = ifnb.list, anchor.features = features)
```
Expand All @@ -268,3 +261,14 @@ p1 + p2
```

Now that the datasets have been integrated, you can follow the previous steps in this vignette identify cell types and cell type-specific responses.

```{r save.times, include = FALSE}
write.csv(x = t(as.data.frame(all_times)), file = "../output/timings/integration_introduction.csv")
```

<details>
<summary>**Session Info**</summary>
```{r}
sessionInfo()
```
</details>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'Introduction to scRNA-seq integration'
title: 'Fast integration using reciprocal PCA (RPCA)'
output:
html_document:
theme: united
Expand Down Expand Up @@ -30,9 +30,7 @@ knitr::opts_chunk$set(
)
```

# Fast integration using reciprocal PCA (RPCA)

In this vignette, we present a slightly modified workflow for the integration of scRNA-seq datasets. Instead of utilizing canonical correlation analysis (‘CCA’) to identify anchors, we instead utilize reciprocal PCA (‘RPCA’). When determining anchors between any two datasets using RPCA, we project each dataset into the other's PCA space and constrain the anchors by the same mutual neighborhood requirement. The commands for both workflows are largely identical, but the two methods may be applied in different context.
In this vignette, we present a slightly modified workflow for the integration of scRNA-seq datasets. Instead of utilizing canonical correlation analysis (‘CCA’) to identify anchors, we instead utilize reciprocal PCA (‘RPCA’). When determining anchors between any two datasets using RPCA, we project each dataset into the others PCA space and constrain the anchors by the same mutual neighborhood requirement. The commands for both workflows are largely identical, but the two methods may be applied in different context.

By identifying shared sources of variation between datasets, CCA is well-suited for identifying anchors when cell types are conserved, but there are very substantial differences in gene expression across experiments. CCA-based integration therefore enables integrative analysis when experimental conditions or disease states introduce very strong expression shifts, or when integrating datasets across modalities and species. However, CCA-based integration may also lead to overcorrection, especially when a large proportion of cells are non-overlapping across datasets.

Expand Down Expand Up @@ -71,25 +69,24 @@ ifnb.list <- lapply(X = ifnb.list, FUN = function(x) {
})
```

## Perform integration
# Perform integration

We then identify anchors using the `FindIntegrationAnchors()` function, which takes a list of Seurat objects as input, and use these anchors to integrate the two datasets together with `IntegrateData()`.

```{r find.anchors}
immune.anchors <- FindIntegrationAnchors(object.list = ifnb.list, anchor.features = features,reduction = 'rpca')
```
```{r integrate.data}

```{r integrate.data}
# this command creates an 'integrated' data assay
immune.combined <- IntegrateData(anchorset = immune.anchors)
```

## Perform an integrated analysis
# Perform an integrated analysis

Now we can run a single integrated analysis on all cells!

```{r clustering, results='hide', message=FALSE}

# specify that we will perform downstream analysis on the corrected data
# note that the original unmodified data still resides in the 'RNA' assay
DefaultAssay(immune.combined) <- "integrated"
Expand Down Expand Up @@ -122,34 +119,36 @@ immune.combined <- RunPCA(immune.combined, npcs = 30, verbose = FALSE)
immune.combined <- RunUMAP(immune.combined, reduction = "pca", dims = 1:30)
immune.combined <- FindNeighbors(immune.combined, reduction = "pca", dims = 1:30)
immune.combined <- FindClusters(immune.combined, resolution = 0.5)

```

```{r viz, results='hide', message=FALSE}
# Visualization
p1 <- DimPlot(immune.combined, reduction = "umap", group.by = "stim")
p2 <- DimPlot(immune.combined, reduction = "umap", label = TRUE, repel = TRUE)
p1 + p2
```

```{r save.img, include = FALSE}
plot <- DimPlot(immune.combined, group.by = "stim") +
xlab("UMAP 1") + ylab("UMAP 2") +
theme(axis.title = element_text(size = 18), legend.text = element_text(size = 18)) +
guides(colour = guide_legend(override.aes = list(size = 10)))
ggsave(filename = "../output/images/rpca_integration.png", height = 7, width = 12, plot = plot)
```

Now that the datasets have been integrated, you can follow the previous steps in the [introduction to scRNA-seq integration vignette](integration_introduction.html) to identify cell types and cell type-specific responses.

## Performing integration on datasets normalized with SCTransform
# Performing integration on datasets normalized with SCTransform

As an additional example, we repeat the analyses performed above, but normalize the datasets using [SCTransform](sctransform_vignette.html). We may choose to set the `method` parameter to `glmGamPoi` (install [here](https://bioconductor.org/packages/release/bioc/html/glmGamPoi.html)) in order to enable faster estimation of regression parameters in `SCTransform`.
As an additional example, we repeat the analyses performed above, but normalize the datasets using [SCTransform](sctransform_vignette.html). We may choose to set the `method` parameter to `glmGamPoi` (install [here](https://bioconductor.org/packages/release/bioc/html/glmGamPoi.html)) in order to enable faster estimation of regression parameters in `SCTransform()`.

```{r panc8.cca.sct.init, results='hide', message=FALSE, fig.keep='none'}
LoadData('ifnb')
ifnb.list <- SplitObject(ifnb, split.by = "stim")

ifnb.list <- lapply(X = ifnb.list, FUN = function(x) {
x <- SCTransform(x, method = 'glmGamPoi')
})
ifnb.list <- lapply(X = ifnb.list, FUN = SCTransform, method = "glmGamPoi")
features <- SelectIntegrationFeatures(object.list = ifnb.list, nfeatures = 3000)
ifnb.list <- PrepSCTIntegration(object.list = ifnb.list, anchor.features = features)

ifnb.list <- lapply(X = ifnb.list, FUN = function(x) {
x <- RunPCA(x)
})
ifnb.list <- lapply(X = ifnb.list, FUN = RunPCA)
```

```{r ifnb.cca.sct.anchors}
Expand All @@ -168,3 +167,15 @@ p1 <- DimPlot(immune.combined.sct, reduction = "umap", group.by = "stim")
p2 <- DimPlot(immune.combined.sct, reduction = "umap", group.by = 'seurat_annotations',label = TRUE, repel = TRUE)
p1 + p2
```

```{r save.times, include = FALSE}
write.csv(x = t(as.data.frame(all_times)), file = "../output/timings/integration_rpca.csv")
```

<details>
<summary>**Session Info**</summary>
```{r}
sessionInfo()
```
</details>

6 changes: 4 additions & 2 deletions vignettes/interaction_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ knitr::opts_chunk$set(

# Load in the data

This vignette demonstrates some useful features for interacting with the Seurat object. For demonstration purposes, we will be using the 2,700 PBMC object that is created in the first guided tutorial. You can download the pre-computed object [here](https://www.dropbox.com/s/63gnlw45jf7cje8/pbmc3k_final.rds?dl=1). To simulate the scenario where we have two replicates, we will randomly assign half the cells in each cluster to be from "rep1" and other half from "rep2".
This vignette demonstrates some useful features for interacting with the Seurat object. For demonstration purposes, we will be using the 2,700 PBMC object that is created in the first guided tutorial. You can load the data from our [SeuratData](https://github.com/satijalab/seurat-data) package. To simulate the scenario where we have two replicates, we will randomly assign half the cells in each cluster to be from "rep1" and other half from "rep2".

```{r load_data}
library(Seurat)
pbmc <- readRDS(file = "../data/pbmc3k_final.rds")
library(SeuratData)
InstallData("pbmc3k")
pbmc <- LoadData(ds = pbmc3k.final)

# pretend that cells were originally assigned to one of two replicates (we assign randomly here)
# if your cells do belong to multiple replicates, and you want to add this info to the Seurat object
Expand Down
6 changes: 4 additions & 2 deletions vignettes/merge_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ table(pbmc.combined$orig.ident)

# Merging More Than Two `Seurat` Objects

To merge more than two `Seurat` objects, simply pass a vector of multiple `Seurat` objects to the `y` parameter for `merge`; we'll demonstrate this using the 4K and 8K PBMC datasets as well as our previously computed Seurat object from the 2,700 PBMC tutorial (download [here](https://www.dropbox.com/s/63gnlw45jf7cje8/pbmc3k_final.rds?dl=1)).
To merge more than two `Seurat` objects, simply pass a vector of multiple `Seurat` objects to the `y` parameter for `merge`; we'll demonstrate this using the 4K and 8K PBMC datasets as well as our previously computed Seurat object from the 2,700 PBMC tutorial (loaded via the [SeuratData](https://github.com/satijalab/seurat-data) package).

```{r merge_three}
pbmc3k <- readRDS(file = '../data/pbmc3k_final.rds')
library(SeuratData)
InstallData("pbmc3k")
pbmc3k <- LoadData(ds = "pbmc3k.final")
pbmc3k

pbmc.big <- merge(pbmc3k, y = c(pbmc4k, pbmc8k), add.cell.ids = c('3K', '4K', '8K'), project = 'PBMC15K')
Expand Down
Loading