Skip to content

About

Portfolio-oriented Seurat single-cell/snRNA-seq workflow helpers demonstrating QC, integration, annotation, DE, and reproducible repo hygiene

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single-Cell RNA-seq Portfolio: Seurat Workflow Helpers

Portfolio repository with R helpers for downstream single-cell / single-nucleus RNA-seq analysis using Seurat. The code is adapted from applied research notebooks and organized to show practical bioinformatics workflow design for CV and technical review.

Core areas:

  • Seurat-based QC, filtering, integration, clustering, and UMAP workflow design
  • metadata-aware analysis across samples, groups, and covariates
  • Harmony integration
  • scType-assisted annotation
  • cell type proportions, MAST differential expression, and marker-positive cell analysis

Scope

This repository is intended for downstream analysis after Cell Ranger or an equivalent count-generation step. It includes helper code for:

  1. loading 10x filtered feature-barcode matrices
  2. adding sample metadata and QC metrics
  3. applying QC filters
  4. cell-cycle scoring
  5. sample integration with Harmony
  6. graph clustering and UMAP visualization
  7. optional scType-assisted cell type annotation
  8. cell type proportion summaries
  9. cell type-level differential expression with MAST
  10. gene-positive / gene-negative proportion analysis for senescence-style marker questions

Repository Layout

  • R/seurat_workflow_helpers.R: reusable Seurat workflow helpers extracted from the main notebook logic
  • R/sctype_annotation.R: portable scType annotation wrapper without local hard-coded paths
  • R/senescence_helpers.R: gene-positive proportion utilities based on the senescence notebook
  • scTypeasFunction.R: compatibility wrapper for older code that called runsctype()
  • examples/metadata_template.csv: minimal sample metadata template
  • docs/portfolio_skills.md: CV-oriented skills matrix
  • docs/workflow.md: workflow outline and expected inputs
  • docs/source_validation.md: notes on how the local notebooks map to this repo
  • tests/smoke_parse.R: parser smoke test for the public helper files
  • tests/test_workflow_helpers.R: lightweight Seurat-free tests for metadata and proportion helpers
  • tests/test_senescence_helpers.R: lightweight Seurat-free tests for senescence helpers

Dependencies

The helper files are organized around these package families:

  • Seurat workflow: Seurat, SeuratObject
  • integration: harmony
  • data wrangling: dplyr, tidyr, readr, tibble
  • statistical modeling: optional betareg, MAST
  • visualization and output: optional ggplot2, readr
  • annotation: scType helper functions and an explicit scType database path or URL

Minimal local checks use dplyr, tidyr, and readr:

install.packages(c("dplyr", "tidyr", "readr", "tibble", "ggplot2"))

Full workflow execution additionally requires packages such as Seurat, SeuratObject, harmony, and Bioconductor MAST.

Local Checks

Rscript --vanilla tests/smoke_parse.R
Rscript --vanilla tests/test_workflow_helpers.R
Rscript --vanilla tests/test_senescence_helpers.R

These tests validate parser integrity and Seurat-free helper behavior. Full Seurat, Harmony, Cell Ranger, scType, and MAST execution requires real input data and the relevant R packages.

Minimal Example

source("R/seurat_workflow_helpers.R")
source("R/sctype_annotation.R")

metadata <- read_sample_metadata(
  "examples/metadata_template.csv",
  count_col = "SEQ_ID",
  sample_col = "SAMPLE"
)

samples <- load_cellranger_samples(
  metadata = metadata,
  counts_dir = "cellranger_mRNA_premRNA",
  project = "example_project"
)

seurat_obj <- merge_seurat_samples(
  samples = samples,
  sample_ids = metadata$SEQ_ID,
  project = "example_project"
)

seurat_obj <- add_sample_metadata(
  seurat_obj = seurat_obj,
  metadata = metadata,
  count_col = "SEQ_ID"
)

seurat_obj <- add_qc_metrics(seurat_obj)
seurat_obj <- filter_seurat_qc(seurat_obj)

scType Annotation

The earlier scType helper used local RDS inputs and local database paths. The current helper accepts an in-memory Seurat object and an explicit database path or URL:

Remote scType helper sourcing is disabled by default. Use allow_remote_source = TRUE only as an explicit convenience option, or load/pin the scType helper functions separately and pass them through gene_sets_prepare_fun and sctype_score_fun.

source("R/sctype_annotation.R")

annotated <- run_sctype_annotation(
  seurat_obj = seurat_obj,
  gene_set_db = "https://raw.githubusercontent.com/IanevskiAleksandr/sc-type/master/ScTypeDB_full.xlsx",
  tissue = "Brain",
  output_dir = "sctype_figures",
  figure_prefix = "example",
  allow_remote_source = TRUE
)

Current Maturity

Portfolio-quality analysis-helper repository. The reusable logic is separated into functions and documented; it is not packaged as a formal R library.

References

About

Portfolio-oriented Seurat single-cell/snRNA-seq workflow helpers demonstrating QC, integration, annotation, DE, and reproducible repo hygiene

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages