Last updated: 2018-11-12
workflowr checks: (Click a bullet for more information)
-
✔ R Markdown file: up-to-date
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
-
✔ Environment: empty
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
-
✔ Seed: set.seed(20181026)
The command set.seed(20181026)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
-
✔ Session information: recorded
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
-
✔ Repository version: ea6b42e
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: analysis/figure/
Ignored: output/monocle/
Unstaged changes:
Modified: code/10x-180504-config.R
Deleted: code/preprocess-10x-180504.R
Deleted: code/preprocess-10x-180831.R
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
Expand here to see past versions:
File
|
Version
|
Author
|
Date
|
Message
|
html
|
6e36947
|
PytrikFolkertsma
|
2018-11-07
|
Build site.
|
Rmd
|
1c178af
|
PytrikFolkertsma
|
2018-11-07
|
wflow_publish(c(“analysis/10x-180504-alignment.Rmd”, “analysis/10x-180504-beforeQC.Rmd”,
|
Rmd
|
9ef503f
|
PytrikFolkertsma
|
2018-11-05
|
before QC analysis
|
html
|
19b3950
|
PytrikFolkertsma
|
2018-11-05
|
Build site.
|
Rmd
|
673b520
|
PytrikFolkertsma
|
2018-11-05
|
wflow_publish(c(“analysis/10x-180504-general-analysis.Rmd”))
|
html
|
661156c
|
PytrikFolkertsma
|
2018-11-05
|
Build site.
|
Rmd
|
76112cb
|
PytrikFolkertsma
|
2018-11-05
|
wflow_publish(c(“analysis/10x-180504-general-analysis.Rmd”))
|
html
|
9e51a0a
|
PytrikFolkertsma
|
2018-11-02
|
Build site.
|
html
|
eaa7e4a
|
PytrikFolkertsma
|
2018-11-02
|
Build site.
|
Rmd
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
general analysis + alignment
|
html
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
general analysis + alignment
|
html
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
Build site.
|
Rmd
|
f7080f1
|
PytrikFolkertsma
|
2018-10-30
|
wflow_publish(c(“analysis/10x-180504-general-analysis.Rmd”,
|
Analysis of the 10x-180504 samples.
Loading the required packages and datasets.
library(Seurat)
library(dplyr)
all10x <- readRDS('output/10x-180504')
all10x.ccregout <- readRDS('output/10x-180504-ccregout')
QC Plots
VlnPlot(all10x, features.plot='nGene', group.by='sample_name', point.size.use=-1, x.lab.rot=T)
Expand here to see past versions of unnamed-chunk-2-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
VlnPlot(all10x, features.plot='nUMI', group.by='sample_name', point.size.use=-1, x.lab.rot=T)
Expand here to see past versions of unnamed-chunk-3-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
VlnPlot(all10x, features.plot='percent.mito', group.by='sample_name', point.size.use=-1, x.lab.rot=T)
Expand here to see past versions of unnamed-chunk-4-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
GenePlot(all10x, 'nUMI', 'nGene')
Expand here to see past versions of unnamed-chunk-5-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
TSNE
Below are several tSNE plots of the 10x-180504 data. tSNE was performed on the first 15 principal components of the log-normalized scaled (nUMI and percent.mito regressed out) data.
Visceral and perirenal seem a bit mixed, and supraclavicular and subcutaneous too.
TSNEPlot(all10x, pt.size=0.1, group.by='sample_name', do.label=T)
Expand here to see past versions of unnamed-chunk-6-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
tSNE plots of samples within their depot. Peri2 and Peri3 seem to overlap really well, as well as Supra1 and Supra2, and Visce1 and Visce3.
plot_grid(t1, t2, t3, t4)
Expand here to see past versions of unnamed-chunk-8-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
tSNE colored on subtissue.
TSNEPlot(all10x, group.by='depot', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-9-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
tSNE colored by type.
TSNEPlot(all10x, group.by='type', pt.size=0.1, colors.use=c('#964B00', '#F7E7CE'))
Expand here to see past versions of unnamed-chunk-10-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
tSNE colored by cell cycle phase.
TSNEPlot(all10x, group.by='Phase', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-11-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
Clusters
Some clustering with different resolutions. res=0.5
TSNEPlot(all10x, pt.size=0.1, group.by='res.0.5', do.label=T)
Expand here to see past versions of unnamed-chunk-12-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
res=0.7
TSNEPlot(all10x, pt.size=0.1, group.by='res.0.7', do.label=T)
Expand here to see past versions of unnamed-chunk-13-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
res=1
TSNEPlot(all10x, pt.size=0.1, group.by='res.1', do.label=T)
Expand here to see past versions of unnamed-chunk-14-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
Cell cycle regression
T-SNE of the data with cell cycle effects regressed out. There does not seem to be a lot of structure within clusters now.
TSNEPlot(all10x.ccregout, pt.size=0.1, group.by='sample_name')
Expand here to see past versions of unnamed-chunk-15-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
No cell cycle effect anymore.
TSNEPlot(all10x.ccregout, pt.size=0.1, group.by='Phase')
Expand here to see past versions of unnamed-chunk-16-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
Subtissues
plot_grid(t1, t2, t3, t4)
Expand here to see past versions of unnamed-chunk-18-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
TSNEPlot(all10x.ccregout, pt.size=0.1, group.by='depot')
Expand here to see past versions of unnamed-chunk-19-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
TSNEPlot(all10x.ccregout, group.by='type', pt.size=0.1, colors.use=c('#964B00', '#F7E7CE'))
Expand here to see past versions of unnamed-chunk-20-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
PCA
Some PCA plots. PC1 seems to capture cell cycle effects, and PC2 seems to capture some of the sample variability.
PCAPlot(all10x, group.by='Phase', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-21-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
PCAPlot(all10x, group.by='sample_name', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-22-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
PCA plot of the cell cycle regressed out data. There is no cell cycle effect anymore.
PCAPlot(all10x.ccregout, group.by='Phase', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-23-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
PCAPlot(all10x.ccregout, group.by='sample_name', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-24-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
Metadata plots
FeaturePlot(all10x, c("nGene"), cols.use = c("grey","blue"), no.legend=F)
Expand here to see past versions of unnamed-chunk-25-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
FeaturePlot(all10x, c("percent.mito"), cols.use = c("grey","blue"), no.legend=F)
Expand here to see past versions of unnamed-chunk-26-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
FeaturePlot(all10x, c("nUMI"), cols.use = c("grey","blue"), no.legend=F)
Expand here to see past versions of unnamed-chunk-27-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
Diff
TSNEPlot(all10x, group.by='diff', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-28-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
all10x@meta.data['diff_int'] <- unlist(lapply(as.vector(unlist(all10x@meta.data$diff)), function(x){return(strtoi(strsplit(x, '%')))}))
FeaturePlot(all10x, features.plot='diff_int', cols.use=c('gray', 'blue'), no.legend=F)
Expand here to see past versions of unnamed-chunk-29-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
ucp1.ctrl
TSNEPlot(all10x, group.by='ucp1.ctrl', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-30-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
ucp1.ne
TSNEPlot(all10x, group.by='ucp1.ne', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-31-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
bmi
TSNEPlot(all10x, group.by='bmi', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-32-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
age
TSNEPlot(all10x, group.by='age', pt.size=0.1)
Expand here to see past versions of unnamed-chunk-33-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
VlnPlot(all10x, group.by='sample_name', features.plot=c('nGene'), point.size.use = -1, x.lab.rot=T)
Expand here to see past versions of unnamed-chunk-34-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
VlnPlot(all10x, group.by='sample_name', features.plot=c('nUMI'), point.size.use = -1, x.lab.rot=T)
Expand here to see past versions of unnamed-chunk-35-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
VlnPlot(all10x, group.by='sample_name', features.plot=c('percent.mito'), point.size.use = -1, x.lab.rot=T)
Expand here to see past versions of unnamed-chunk-36-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
Mixture cluster 12
Sample composition in cluster 12.
cluster12 <- SubsetData(all10x, cells.use=rownames(all10x@meta.data)[which(all10x@meta.data$res.0.5 %in% 12)])
rotate_x <- function(data, column_to_plot, labels_vec, rot_angle) {
plt <- barplot(data[[column_to_plot]], col='steelblue', xaxt="n")
text(plt, par("usr")[3], labels = labels_vec, srt = rot_angle, adj = c(1.1,1.1), xpd = TRUE, cex=1)
}
rotate_x((cluster12@meta.data %>% count(sample_name))[,2], 'n', as.vector(unlist((cluster12@meta.data %>% count(sample_name))[,1])), 45)
Expand here to see past versions of unnamed-chunk-37-1.png:
Version
|
Author
|
Date
|
120215c
|
PytrikFolkertsma
|
2018-11-02
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
cluster12 <- SubsetData(all10x, cells.use=rownames(all10x@meta.data)[which(all10x@meta.data$res.0.5 %in% 12)])
rotate_x <- function(data, column_to_plot, labels_vec, rot_angle) {
plt <- barplot(data[[column_to_plot]], col='steelblue', xaxt="n")
text(plt, par("usr")[3], labels = labels_vec, srt = rot_angle, adj = c(1.1,1.1), xpd = TRUE, cex=1)
}
rotate_x((cluster12@meta.data %>% count(sample_name))[,2], 'n', as.vector(unlist((cluster12@meta.data %>% count(sample_name))[,1])), 90)
Expand here to see past versions of unnamed-chunk-38-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
Figures for report
fig1 <- plot_grid(
PCAPlot(all10x, group.by='Phase', pt.size=0.1),
TSNEPlot(all10x, group.by='sample_name', pt.size=0.1),
TSNEPlot(all10x, group.by='Phase', pt.size=0.1),
TSNEPlot(all10x.ccregout, group.by='sample_name', pt.size=0.1),
labels = "auto", nrow = 2)
Expand here to see past versions of unnamed-chunk-39-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
save_plot("plots/180504_pca_tsne.pdf", fig1, base_width=12, base_height = 9)
fig1
Expand here to see past versions of fig1-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
#Supplementary figures
sfig1 <- plot_grid(
VlnPlot(all10x, group.by='sample_name', features.plot=c('nGene'), point.size.use = -1, x.lab.rot=T, size.x.use=8),
VlnPlot(all10x, group.by='sample_name', features.plot=c('nUMI'), point.size.use = -1, x.lab.rot=T, size.x.use=8),
VlnPlot(all10x, group.by='sample_name', features.plot=c('percent.mito'), point.size.use = -1, x.lab.rot=T, size.x.use=8),
labels="auto", nrow=1
)
save_plot("plots/supplementary_figures/sfig_180504_qcplots.pdf", sfig1, base_width=12, base_height=3)
sfig1
Expand here to see past versions of fig2-1.png:
Version
|
Author
|
Date
|
1f7e0da
|
PytrikFolkertsma
|
2018-10-30
|
sfig2 <- plot_grid(
PCElbowPlot(all10x, num.pc=30),
PCElbowPlot(all10x.ccregout, num.pc=30),
labels="auto", nrow=1)
save_plot("plots/supplementary_figures/sfig_180504_pcelbow.pdf", sfig2, base_width=12, base_height=4)
sfig2
Expand here to see past versions of fig3-1.png:
Version
|
Author
|
Date
|
19b3950
|
PytrikFolkertsma
|
2018-11-05
|
661156c
|
PytrikFolkertsma
|
2018-11-05
|
This reproducible R Markdown
analysis was created with
workflowr 1.1.1