Last updated: 2020-01-29

Checks: 6 0

Knit directory: 10x-adipocyte-analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.2.0). The Report tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


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.

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.

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.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

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:    code/.Rhistory
    Ignored:    figures/
    Ignored:    output/bulk_analysis/
    Ignored:    output/demuxlet/
    Ignored:    output/harmony/
    Ignored:    output/markergenes/
    Ignored:    output/monocle/
    Ignored:    output/seurat_objects/
    Ignored:    output/velocyto/
    Ignored:    output/wgcna/
    Ignored:    tables/

Untracked files:
    Untracked:  .rstudio_old10/
    Untracked:  10x-adipocyte-analysis-copy.Rproj
    Untracked:  analysis/.ipynb_checkpoints/10x-180831_harmony_palantir-checkpoint.ipynb
    Untracked:  analysis/.ipynb_checkpoints/velocyto_notebook_180831-checkpoint.ipynb
    Untracked:  code/BEAM-heatmaps.R
    Untracked:  code/BEAM_gsea.R
    Untracked:  code/__pycache__/
    Untracked:  code/colors.R
    Untracked:  code/convert_raw_data_to_csv_harmony.R
    Untracked:  code/harmony.py
    Untracked:  code/test.csv

Unstaged changes:
    Deleted:    10x-adipocyte-analysis.Rproj
    Deleted:    analysis/velocyto_notebook_180504.ipynb
    Deleted:    analysis/velocyto_notebook_180831.ipynb
    Modified:   analysis/vijay_analysis.Rmd
    Deleted:    code/REMOVE/find-brown-sample-markers-180504-REMOVE.R
    Deleted:    code/REMOVE/find-white-sample-markers-180504-REMOVE.R
    Deleted:    code/REMOVE/get-genes-monocle-180831-REMOVE.R
    Modified:   code/compute-genelists-monocle-depots.R
    Modified:   code/find-depot-markers-180504.R
    Modified:   code/find-markers.R
    Modified:   code/preprocess-data.R
    Modified:   code/run-alignment.R
    Modified:   code/run-monocle.R
    Modified:   code/velocyto_preprocess.py

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.


These are the previous versions of the R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view them.

File Version Author Date Message
Rmd 3007452 Pytrik Folkertsma 2020-01-29 added violinplots
html 9851315 Pytrik Folkertsma 2020-01-28 Build site.
Rmd c5acb13 Pytrik Folkertsma 2020-01-28 added violinplots
html 154ebe3 Pytrik Folkertsma 2020-01-27 Build site.
Rmd fcdc606 Pytrik Folkertsma 2020-01-27 vijay analysis notebooks
html 059dac7 Pytrik Folkertsma 2020-01-25 Build site.
Rmd e8c3271 Pytrik Folkertsma 2020-01-25 wflow_publish(c(“analysis/vijay_U-L-branch-markers.Rmd”))
html 225ae0c Pytrik Folkertsma 2020-01-24 Build site.
Rmd c880351 Pytrik Folkertsma 2020-01-24 wflow_publish(c(“analysis/vijay_U-L-branch-markers.Rmd”))
html f3a9239 Pytrik Folkertsma 2020-01-23 Build site.
Rmd 4d2a8d3 Pytrik Folkertsma 2020-01-23 wflow_publish(c(“analysis/vijay_U-L-branch-markers.Rmd”))
html d411e51 Pytrik Folkertsma 2020-01-23 Build site.
Rmd e8b1c83 Pytrik Folkertsma 2020-01-23 wflow_publish(c(“analysis/vijay_U-L-branch-markers.Rmd”))

library(Seurat)
library(cowplot)
library(dplyr)
library(tidyr)
library(knitr)
library(kableExtra)
library(dplyr)
vijay <- readRDS('output/seurat_objects/vijay/vijay.rds')
markers <- read.table('output/markergenes/180831/markers_10x-180831_upperbranch_lowerbranch_negbinom.tsv', header=T)
plot_featureplots <- function(data, markergenes, dir, branch){
  plots <- FeaturePlot(data, features=as.vector(markergenes$gene[1:56]), combine = FALSE, pt.size=0.2, cols=c('gray', 'blue'))

  plots_edited <- list()

  for(i in 1:length(plots)) {
    plots_edited[[i]] <- plots[[i]] + NoAxes()
    save_plot(paste(dir, '/', branch, '/', as.vector(markergenes$gene[i]) ,'.pdf', sep=''), plots_edited[[i]], base_height=6, base_width=6)
  }
  
  grid_1 <- plot_grid(plotlist=plots_edited[1:28], ncol=3)
  grid_2 <- plot_grid(plotlist=plots_edited[29:56], ncol=3)
  
  #pdf
  save_plot(paste(dir, 'markers_', branch, '_1-28.pdf', sep=''), grid_1, base_height=25, base_width=9)
  save_plot(paste(dir, 'markers_', branch, '_29-56.pdf', sep=''), grid_2, base_height=25, base_width=9)
  
  #png
    save_plot(paste(dir, 'markers_', branch, '_1-28.png', sep=''), grid_1, base_height=25, base_width=9)
  save_plot(paste(dir, 'markers_', branch, '_29-56.png', sep=''), grid_2, base_height=25, base_width=9)
  
  return(list(grid_1, grid_2))
}

U branch marker genes all vijay data

markers_u <- markers[markers$avg_logFC > 0,]
markers_u <- markers_u[order(-markers_u$avg_logFC),]

Top 56 markers for U branch sorted on logFC.

grids <- plot_featureplots(vijay, markergenes=markers_u, dir='figures/figures_paper/supplementary_figures/vijay/u_l_branch_markers/all_data/', branch='U_branch')
UMAPPlot(vijay, group.by='celltype', label=T)

Version Author Date
059dac7 Pytrik Folkertsma 2020-01-25
225ae0c Pytrik Folkertsma 2020-01-24
f3a9239 Pytrik Folkertsma 2020-01-23
d411e51 Pytrik Folkertsma 2020-01-23
grids[[1]]

Version Author Date
225ae0c Pytrik Folkertsma 2020-01-24
f3a9239 Pytrik Folkertsma 2020-01-23
d411e51 Pytrik Folkertsma 2020-01-23
grids[[2]]

Version Author Date
225ae0c Pytrik Folkertsma 2020-01-24
f3a9239 Pytrik Folkertsma 2020-01-23
VlnPlot(vijay, features=markers_u$gene[1:28], group.by='celltype', pt.size=-1, ncol=2)

Version Author Date
9851315 Pytrik Folkertsma 2020-01-28
VlnPlot(vijay, features=markers_u$gene[29:56], group.by='celltype', pt.size=-1, ncol=2)

Version Author Date
d411e51 Pytrik Folkertsma 2020-01-23

L branch marker genes all vijay data

markers_l <- markers[markers$avg_logFC < 0,]
markers_l <- markers_l[order(markers_l$avg_logFC),]

Top 56 markers for L branch sorted on logFC.

grids <- plot_featureplots(vijay, markergenes=markers_l, dir='/projects/pytrik/sc_adipose/analyze_10x_fluidigm/10x-adipocyte-analysis/figures/figures_paper/supplementary_figures/vijay/u_l_branch_markers/all_data', branch='L_branch')
Warning in FetchData(object = object, vars = c(dims, "ident", features), :
The following requested variables were not found: RP11-572C15.6, PPAP2B
UMAPPlot(vijay, group.by='celltype', label=T)

Version Author Date
9851315 Pytrik Folkertsma 2020-01-28
225ae0c Pytrik Folkertsma 2020-01-24
f3a9239 Pytrik Folkertsma 2020-01-23
grids[[1]]

Version Author Date
9851315 Pytrik Folkertsma 2020-01-28
grids[[2]]

Version Author Date
9851315 Pytrik Folkertsma 2020-01-28
VlnPlot(vijay, features=markers_l$gene[1:28], group.by='celltype', pt.size=-1, ncol=2)
Warning in FetchData(object = object, vars = features, slot = slot): The
following requested variables were not found: RP11-572C15.6

VlnPlot(vijay, features=markers_l$gene[29:56], group.by='celltype', pt.size=-1, ncol=2)
Warning in FetchData(object = object, vars = features, slot = slot): The
following requested variables were not found: PPAP2B


sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Storage

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.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] kableExtra_1.1.0 knitr_1.22       tidyr_0.8.3      dplyr_0.8.0.1   
[5] cowplot_0.9.4    ggplot2_3.1.0    Seurat_3.1.1    

loaded via a namespace (and not attached):
  [1] tsne_0.1-3          nlme_3.1-140        bitops_1.0-6       
  [4] fs_1.2.7            webshot_0.5.1       RcppAnnoy_0.0.13   
  [7] RColorBrewer_1.1-2  httr_1.4.0          rprojroot_1.3-2    
 [10] sctransform_0.2.0   tools_3.5.3         backports_1.1.3    
 [13] R6_2.4.0            irlba_2.3.3         KernSmooth_2.23-15 
 [16] uwot_0.1.4          lazyeval_0.2.2      colorspace_1.4-1   
 [19] withr_2.1.2         npsurv_0.4-0        gridExtra_2.3      
 [22] tidyselect_0.2.5    compiler_3.5.3      git2r_0.25.2       
 [25] rvest_0.3.3         xml2_1.2.0          plotly_4.8.0       
 [28] labeling_0.3        caTools_1.17.1.2    scales_1.0.0       
 [31] lmtest_0.9-36       readr_1.3.1         ggridges_0.5.1     
 [34] pbapply_1.4-0       stringr_1.4.0       digest_0.6.18      
 [37] rmarkdown_1.12      R.utils_2.8.0       pkgconfig_2.0.2    
 [40] htmltools_0.3.6     bibtex_0.4.2        htmlwidgets_1.3    
 [43] rlang_0.3.2         rstudioapi_0.10     zoo_1.8-5          
 [46] jsonlite_1.6        ica_1.0-2           gtools_3.8.1       
 [49] R.oo_1.22.0         magrittr_1.5        Matrix_1.2-17      
 [52] Rcpp_1.0.1          munsell_0.5.0       ape_5.3            
 [55] reticulate_1.11.1   R.methodsS3_1.7.1   stringi_1.4.3      
 [58] whisker_0.3-2       yaml_2.2.0          gbRd_0.4-11        
 [61] MASS_7.3-51.4       gplots_3.0.1.1      Rtsne_0.15         
 [64] plyr_1.8.4          grid_3.5.3          parallel_3.5.3     
 [67] gdata_2.18.0        listenv_0.7.0       ggrepel_0.8.0      
 [70] crayon_1.3.4        lattice_0.20-38     splines_3.5.3      
 [73] hms_0.4.2           SDMTools_1.1-221    pillar_1.3.1       
 [76] igraph_1.2.4        reshape2_1.4.3      future.apply_1.3.0 
 [79] codetools_0.2-16    leiden_0.3.1        glue_1.3.1         
 [82] evaluate_0.13       lsei_1.2-0          metap_1.1          
 [85] RcppParallel_4.4.4  data.table_1.12.0   png_0.1-7          
 [88] Rdpack_0.10-1       gtable_0.3.0        RANN_2.6.1         
 [91] purrr_0.3.2         future_1.15.0       assertthat_0.2.1   
 [94] xfun_0.5            rsvd_1.0.2          survival_2.43-3    
 [97] viridisLite_0.3.0   tibble_2.1.1        workflowr_1.2.0    
[100] cluster_2.1.0       globals_0.12.4      fitdistrplus_1.0-14
[103] ROCR_1.0-7