Last updated: 2019-11-12

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/wolfrum-scmap.Rmd
    Modified:   analysis/wolfrum_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
    Deleted:    docs/.nojekyll

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
html 1c9d3ae Pytrik Folkertsma 2019-11-12 Build site.
Rmd cb1f113 Pytrik Folkertsma 2019-11-12 wflow_publish(c(“analysis/wolfrum_U-L-branch-markers.Rmd”))
html de58caf Pytrik Folkertsma 2019-11-12 Build site.
Rmd b6a5a90 Pytrik Folkertsma 2019-11-12 wflow_publish(c(“analysis/wolfrum_U-L-branch-markers.Rmd”))
html 6bd1632 Pytrik Folkertsma 2019-11-11 Build site.
Rmd 77918ba Pytrik Folkertsma 2019-11-11 U and L branch markers in wolfrum data
html cf6e507 Pytrik Folkertsma 2019-11-11 Build site.
Rmd 403855e Pytrik Folkertsma 2019-11-11 U and L branch markers in wolfrum data

library(Seurat)
library(cowplot)
library(dplyr)
library(tidyr)
library(knitr)
library(kableExtra)
library(dplyr)
wolfrum <- readRDS('/projects/timshel/sc-scheele_lab_adipose_fluidigm_c1/data-wolfrum/wolfrum.compute.seurat_obj.rds')
markers <- read.table('/projects/pytrik/sc_adipose/analyze_10x_fluidigm/10x-adipocyte-analysis/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 wolfrum 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(wolfrum, markergenes=markers_u, dir='/projects/pytrik/sc_adipose/analyze_10x_fluidigm/10x-adipocyte-analysis/figures/figures_paper/supplementary_figures/wolfrum/u_l_branch_markers/all_data', branch='U_branch')
grids[[1]]

Version Author Date
1c9d3ae Pytrik Folkertsma 2019-11-12
de58caf Pytrik Folkertsma 2019-11-12
6bd1632 Pytrik Folkertsma 2019-11-11
cf6e507 Pytrik Folkertsma 2019-11-11
grids[[2]]

Version Author Date
1c9d3ae Pytrik Folkertsma 2019-11-12
de58caf Pytrik Folkertsma 2019-11-12
6bd1632 Pytrik Folkertsma 2019-11-11
cf6e507 Pytrik Folkertsma 2019-11-11

#L branch marker genes all wolfrum 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(wolfrum, markergenes=markers_l, dir='/projects/pytrik/sc_adipose/analyze_10x_fluidigm/10x-adipocyte-analysis/figures/figures_paper/supplementary_figures/wolfrum/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
Warning in FeaturePlot(data, features =
as.vector(markergenes$gene[1:56]), : All cells have the same value (0) of
IFITM1.
grids[[1]]

Version Author Date
1c9d3ae Pytrik Folkertsma 2019-11-12
de58caf Pytrik Folkertsma 2019-11-12
6bd1632 Pytrik Folkertsma 2019-11-11
cf6e507 Pytrik Folkertsma 2019-11-11
grids[[2]]

Version Author Date
1c9d3ae Pytrik Folkertsma 2019-11-12
de58caf Pytrik Folkertsma 2019-11-12
6bd1632 Pytrik Folkertsma 2019-11-11
cf6e507 Pytrik Folkertsma 2019-11-11

#U branch markers for wolfrum preadipocyte subset

wolfrum_subset <- readRDS('/projects/pytrik/sc_adipose/analyze_10x_fluidigm/10x-adipocyte-analysis/output/seurat_objects/wolfrum/wolfrum.preadipocyte_subset.rds')

Top 56 markers for U branch sorted on logFC.

grids <- plot_featureplots(wolfrum_subset, markergenes=markers_u, dir='/projects/pytrik/sc_adipose/analyze_10x_fluidigm/10x-adipocyte-analysis/figures/figures_paper/supplementary_figures/wolfrum/u_l_branch_markers/preadipocyte_subset', branch='U_branch')
grids[[1]]

Version Author Date
1c9d3ae Pytrik Folkertsma 2019-11-12
de58caf Pytrik Folkertsma 2019-11-12
6bd1632 Pytrik Folkertsma 2019-11-11
cf6e507 Pytrik Folkertsma 2019-11-11
grids[[2]]

Version Author Date
1c9d3ae Pytrik Folkertsma 2019-11-12
de58caf Pytrik Folkertsma 2019-11-12
6bd1632 Pytrik Folkertsma 2019-11-11
cf6e507 Pytrik Folkertsma 2019-11-11

#L branch markers for wolfrum adipocyte subset

Top 56 markers for L branch sorted on logFC.

grids <- plot_featureplots(wolfrum_subset, markergenes=markers_l, dir='/projects/pytrik/sc_adipose/analyze_10x_fluidigm/10x-adipocyte-analysis/figures/figures_paper/supplementary_figures/wolfrum/u_l_branch_markers/preadipocyte_subset', branch='L_branch')
Warning in FetchData(object = object, vars = c(dims, "ident", features), :
The following requested variables were not found: RP11-572C15.6, PPAP2B
Warning in FeaturePlot(data, features =
as.vector(markergenes$gene[1:56]), : All cells have the same value (0) of
IFITM1.
grids[[1]]

Version Author Date
1c9d3ae Pytrik Folkertsma 2019-11-12
de58caf Pytrik Folkertsma 2019-11-12
6bd1632 Pytrik Folkertsma 2019-11-11
cf6e507 Pytrik Folkertsma 2019-11-11
grids[[2]]

Version Author Date
1c9d3ae Pytrik Folkertsma 2019-11-12
de58caf Pytrik Folkertsma 2019-11-12
6bd1632 Pytrik Folkertsma 2019-11-11
cf6e507 Pytrik Folkertsma 2019-11-11


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