Last updated: 2018-11-05

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: f6e9077

    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:
    
    Untracked files:
        Untracked:  tables/
    
    Unstaged changes:
        Modified:   analysis/10x-180504-general-analysis.Rmd
        Modified:   code/10x-180504-preprocessing.R
        Modified:   plots/180504_pca_tsne.pdf
        Modified:   plots/supplementary_figures/sfig_180504_pcelbow.pdf
        Modified:   plots/supplementary_figures/sfig_180504_qcplots.pdf
    
    
    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
    Rmd f6e9077 PytrikFolkertsma 2018-11-05 wflow_publish(c(“analysis/10x-180504-beforeQC.Rmd”, “analysis/index.Rmd”))
    html 8641eaa PytrikFolkertsma 2018-11-05 Build site.
    Rmd a6a6359 PytrikFolkertsma 2018-11-05 wflow_publish(c(“analysis/10x-180504-beforeQC.Rmd”))


Plots of 10x-180504 before quality control.

library(Seurat)
Loading required package: ggplot2
Loading required package: cowplot

Attaching package: 'cowplot'
The following object is masked from 'package:ggplot2':

    ggsave
Loading required package: Matrix
library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
all10x.beforeqc <- readRDS('output/10x-180504-beforeQC')
all10x <- readRDS('output/10x-180504')
pm <- VlnPlot(all10x.beforeqc, features.plot='percent.mito', group.by='sample_name', point.size.use = -1, do.return=T, x.lab.rot=T, size.x.use=8) + geom_hline(yintercept=0.08, linetype="dashed", color = "red")
pm

numi <- VlnPlot(all10x.beforeqc, features.plot='nUMI', group.by='sample_name', point.size.use = -1, do.return=T, x.lab.rot=T, size.x.use=8) + geom_hline(yintercept=110000, linetype="dashed", color = "red")
numi

ngene <- VlnPlot(all10x.beforeqc, features.plot='nGene', group.by='sample_name', point.size.use = -1, do.return=T, x.lab.rot=T, size.x.use=8) + geom_hline(yintercept=200, linetype="dashed", color = "red") + geom_hline(yintercept=9000, linetype="dashed", color = "red")
ngene
Warning: Removed 1 rows containing missing values (geom_hline).

GenePlot(all10x.beforeqc, 'nUMI', 'nGene', cex.use = 0.2, do.return=T)
Warning in plot.window(...): "do.return" is not a graphical parameter
Warning in plot.xy(xy, type, ...): "do.return" is not a graphical parameter
Warning in axis(side = side, at = at, labels = labels, ...): "do.return" is
not a graphical parameter

Warning in axis(side = side, at = at, labels = labels, ...): "do.return" is
not a graphical parameter
Warning in box(...): "do.return" is not a graphical parameter
Warning in title(...): "do.return" is not a graphical parameter

Expand here to see past versions of unnamed-chunk-6-1.png:
Version Author Date
8641eaa PytrikFolkertsma 2018-11-05

Number of cells before and after QC

before <- all10x.beforeqc@meta.data %>% count(sample_name)
after <- all10x@meta.data %>% count(sample_name)
ncells <- merge(before, after, by='sample_name', suffixes=c('.before', '.after'))
ncells
   sample_name n.before n.after
1       Peri_1     3973    3934
2       Peri_2     2889    2852
3       Peri_3     1346    1273
4       Subq_1     3087    3007
5       Subq_2     2071    2002
6       Subq_3     8661    8619
7       Subq_4     5022    4885
8      Supra_1     3056    3047
9      Supra_2     3664    3570
10     Supra_3     1035     880
11     Supra_4     3014    2785
12     Visce_1     4624    4539
13     Visce_2     4956    4893
14     Visce_3    10121   10085
write.table(ncells, file='tables/10x-180504-nCells.txt', sep='\t', row.names = F, quote=F)

Figures for report

sfig <- plot_grid(
  pm,
  numi,
  ngene,
  labels="auto", nrow=1
)
Warning: Removed 1 rows containing missing values (geom_hline).
save_plot("plots/supplementary_figures/sfig_180504_qcplots.pdf", sfig, base_width=12, base_height=3)
sfig

Expand here to see past versions of fig1-1.png:
Version Author Date
8641eaa PytrikFolkertsma 2018-11-05

Session information

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_0.7.6   Seurat_2.3.4  Matrix_1.2-14 cowplot_0.9.3 ggplot2_3.0.0

loaded via a namespace (and not attached):
  [1] Rtsne_0.13          colorspace_1.3-2    class_7.3-14       
  [4] modeltools_0.2-22   ggridges_0.5.0      mclust_5.4.1       
  [7] rprojroot_1.3-2     htmlTable_1.12      base64enc_0.1-3    
 [10] rstudioapi_0.7      proxy_0.4-22        flexmix_2.3-14     
 [13] bit64_0.9-7         mvtnorm_1.0-8       codetools_0.2-15   
 [16] splines_3.4.3       R.methodsS3_1.7.1   robustbase_0.93-2  
 [19] knitr_1.20          Formula_1.2-3       jsonlite_1.5       
 [22] workflowr_1.1.1     ica_1.0-2           cluster_2.0.7-1    
 [25] kernlab_0.9-27      png_0.1-7           R.oo_1.22.0        
 [28] compiler_3.4.3      httr_1.3.1          backports_1.1.2    
 [31] assertthat_0.2.0    lazyeval_0.2.1      lars_1.2           
 [34] acepack_1.4.1       htmltools_0.3.6     tools_3.4.3        
 [37] bindrcpp_0.2.2      igraph_1.2.2        gtable_0.2.0       
 [40] glue_1.3.0          RANN_2.6            reshape2_1.4.3     
 [43] Rcpp_0.12.18        trimcluster_0.1-2.1 gdata_2.18.0       
 [46] ape_5.1             nlme_3.1-137        iterators_1.0.10   
 [49] fpc_2.1-11.1        gbRd_0.4-11         lmtest_0.9-36      
 [52] stringr_1.3.1       irlba_2.3.2         gtools_3.8.1       
 [55] DEoptimR_1.0-8      MASS_7.3-50         zoo_1.8-3          
 [58] scales_1.0.0        doSNOW_1.0.16       parallel_3.4.3     
 [61] RColorBrewer_1.1-2  yaml_2.2.0          reticulate_1.10    
 [64] pbapply_1.3-4       gridExtra_2.3       rpart_4.1-13       
 [67] segmented_0.5-3.0   latticeExtra_0.6-28 stringi_1.2.4      
 [70] foreach_1.4.4       checkmate_1.8.5     caTools_1.17.1.1   
 [73] bibtex_0.4.2        Rdpack_0.9-0        SDMTools_1.1-221   
 [76] rlang_0.2.2         pkgconfig_2.0.2     dtw_1.20-1         
 [79] prabclus_2.2-6      bitops_1.0-6        evaluate_0.11      
 [82] lattice_0.20-35     ROCR_1.0-7          purrr_0.2.5        
 [85] bindr_0.1.1         labeling_0.3        htmlwidgets_1.2    
 [88] bit_1.1-14          tidyselect_0.2.4    plyr_1.8.4         
 [91] magrittr_1.5        R6_2.2.2            snow_0.4-2         
 [94] gplots_3.0.1        Hmisc_4.1-1         pillar_1.3.0       
 [97] whisker_0.3-2       foreign_0.8-70      withr_2.1.2        
[100] fitdistrplus_1.0-9  mixtools_1.1.0      survival_2.42-6    
[103] nnet_7.3-12         tsne_0.1-3          tibble_1.4.2       
[106] crayon_1.3.4        hdf5r_1.0.0         KernSmooth_2.23-15 
[109] rmarkdown_1.10      grid_3.4.3          data.table_1.11.4  
[112] git2r_0.23.0        metap_1.0           digest_0.6.15      
[115] diptest_0.75-7      tidyr_0.8.1         R.utils_2.7.0      
[118] stats4_3.4.3        munsell_0.5.0      

This reproducible R Markdown analysis was created with workflowr 1.1.1