Last updated: 2025-06-03

Checks: 7 0

Knit directory: single-cell-jamboree/analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks 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(1) 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 job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version a3d82ce. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

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:  data/GSE132188_adata.h5ad.h5
    Untracked:  data/Immune_ALL_human.h5ad
    Untracked:  data/pancreas_endocrine.RData
    Untracked:  data/pancreas_endocrine_alldays.h5ad

Unstaged changes:
    Modified:   analysis/pbmc_facs.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.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/mcf7.Rmd) and HTML (docs/mcf7.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd a3d82ce Peter Carbonetto 2025-06-03 wflow_publish("mcf7.Rmd", verbose = TRUE, view = FALSE)

The MCF-7 data set from Sanford et al eLife paper could be a great data set for illustrating many of the ideas behind NMF analysis of single-cell data (even though it is actually a bulk RNA-seq data set). This paper analyzed the transcriptional response of human MCF-7 cells to retinoic acid and TGF-\(\beta\), applied individually and in combination. The data were downloaded from GEO accession GSE152749.

The following abbreviations were used in analysis: EtOH = ethanol; RA = retinoic acid; TGFb = TGF-\(\beta\).

Load packages used to process the data, perform the analyses, and create the plots.

library(rsvd)
library(fastglmpca)
library(fastTopics)
library(flashier)
library(data.table)
library(GEOquery)
library(singlecelljamboreeR)

Set the seed for reproducibility:

set.seed(1)

Prepare the data for analysis with fastTopics and flashier

Load the RNA-seq counts:

counts <- fread("../data/GSE152749_raw_counts_GRCh38.p13_NCBI.tsv.gz",
                sep = "\t",header = TRUE,stringsAsFactors = FALSE)
class(counts) <- "data.frame"
rownames(counts) <- counts$GeneID
counts <- counts[,-1]
counts <- as.matrix(counts)
storage.mode(counts) <- "double"
counts <- t(counts)
ids <- rownames(counts)

Load the gene information:

genes <- fread("../data/Human.GRCh38.p13.annot.tsv.gz",sep = "\t",
               header = TRUE,stringsAsFactors = FALSE)
class(genes) <- "data.frame"
genes <- genes[1:10]
genes <- transform(genes,
                   GeneType = factor(GeneType),
                   Status   = factor(Status))

Load the sample information:

geo <- getGEO(filename = "../data/GSE152749_family.soft.gz")
samples <- data.frame(id = names(GSMList(geo)),
                      treatment = sapply(GSMList(geo),
                                         function (x) Meta(x)$title))
samples <- samples[ids,]
rownames(samples) <- NULL
samples <- transform(samples,
                     EtOH = grepl("EtOH",treatment,fixed = TRUE),
                     RA   = grepl("RA",treatment,fixed = TRUE),
                     TGFb = grepl("TGFb",treatment,fixed = TRUE))
samples$label                 <- "EtOH"
samples[samples$RA,"label"]   <- "RA"
samples[samples$TGFb,"label"] <- "TGFb"
samples[with(samples,RA & TGFb),"label"] <- "RA+TGFb"
samples <- transform(samples,
                     label = factor(label,c("EtOH","RA","TGFb","RA+TGFb")))

sessionInfo()
# R version 4.3.3 (2024-02-29)
# Platform: aarch64-apple-darwin20 (64-bit)
# Running under: macOS 15.4.1
# 
# Matrix products: default
# BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
# LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0
# 
# locale:
# [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
# 
# time zone: America/Chicago
# tzcode source: internal
# 
# attached base packages:
# [1] stats     graphics  grDevices utils     datasets  methods   base     
# 
# other attached packages:
#  [1] singlecelljamboreeR_0.1-3 GEOquery_2.70.0          
#  [3] Biobase_2.62.0            BiocGenerics_0.48.1      
#  [5] data.table_1.15.2         flashier_1.0.55          
#  [7] ebnm_1.1-34               fastTopics_0.7-24        
#  [9] fastglmpca_0.1-108        rsvd_1.0.5               
# 
# loaded via a namespace (and not attached):
#  [1] distr_2.9.3          pbapply_1.7-2        rlang_1.1.5         
#  [4] magrittr_2.0.3       git2r_0.33.0         horseshoe_0.2.0     
#  [7] compiler_4.3.3       vctrs_0.6.5          reshape2_1.4.4      
# [10] daarem_0.7           quadprog_1.5-8       stringr_1.5.1       
# [13] pkgconfig_2.0.3      crayon_1.5.2         fastmap_1.1.1       
# [16] utf8_1.2.4           promises_1.2.1       rmarkdown_2.26      
# [19] tzdb_0.4.0           purrr_1.0.2          xfun_0.42           
# [22] cachem_1.0.8         trust_0.1-8          jsonlite_1.8.8      
# [25] progress_1.2.3       later_1.3.2          irlba_2.3.5.1       
# [28] parallel_4.3.3       prettyunits_1.2.0    R6_2.5.1            
# [31] bslib_0.6.1          stringi_1.8.3        RColorBrewer_1.1-3  
# [34] SQUAREM_2021.1       limma_3.58.1         jquerylib_0.1.4     
# [37] Rcpp_1.0.12          knitr_1.45           R.utils_2.12.3      
# [40] readr_2.1.5          httpuv_1.6.14        Matrix_1.6-5        
# [43] splines_4.3.3        tidyselect_1.2.1     yaml_2.3.8          
# [46] lattice_0.22-5       tibble_3.2.1         plyr_1.8.9          
# [49] evaluate_1.0.3       Rtsne_0.17           RcppParallel_5.1.10 
# [52] startupmsg_0.9.6.1   xml2_1.3.6           pillar_1.9.0        
# [55] whisker_0.4.1        plotly_4.10.4        softImpute_1.4-1    
# [58] generics_0.1.3       rprojroot_2.0.4      invgamma_1.1        
# [61] truncnorm_1.0-9      hms_1.1.3            ggplot2_3.5.0       
# [64] munsell_0.5.0        scales_1.3.0         ashr_2.2-66         
# [67] gtools_3.9.5         RhpcBLASctl_0.23-42  glue_1.8.0          
# [70] scatterplot3d_0.3-44 lazyeval_0.2.2       tools_4.3.3         
# [73] fs_1.6.5             cowplot_1.1.3        grid_4.3.3          
# [76] tidyr_1.3.1          colorspace_2.1-0     sfsmisc_1.1-18      
# [79] deconvolveR_1.2-1    cli_3.6.4            Polychrome_1.5.1    
# [82] workflowr_1.7.1      fansi_1.0.6          mixsqp_0.3-54       
# [85] viridisLite_0.4.2    dplyr_1.1.4          uwot_0.2.3          
# [88] gtable_0.3.4         R.methodsS3_1.8.2    sass_0.4.9          
# [91] digest_0.6.34        ggrepel_0.9.5        htmlwidgets_1.6.4   
# [94] R.oo_1.26.0          htmltools_0.5.8.1    lifecycle_1.0.4     
# [97] httr_1.4.7           statmod_1.5.0        MASS_7.3-60.0.1