OSCR

scTrends: automated classification and strength quantification of gene expression trends along pseudotime in single-cell RNA-seq.

Code ↔ Paper

3 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 3 matches
  1. [1] § Implementation › Adaptive parameter selection › Feature extraction from fitted trajectories ↔ scTrends-Test.R, lines 60–129 · score 0.59 · scPS, autocorrelation, CV, ratio, variance, slopes
  2. [2] § Results › Automatic, dataset-specific calibration of scTrends parameters ↔ scTrends-Test.R, lines 60–129 · score 0.55 · CV threshold, scPS, autocorrelation, slope, prominence, cells
  3. [3] § Results › Pseudotime analysis and binning ↔ scTrends-Test.R, lines 1–58 · score 0.52 · CD4 TCM, UMAP, PCA, PBMC, positioned, cell

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R · 237 lines · 7 KB · CC-BY-4.0 · 3 matches

  1. library(SeuratData)
  2. library(Seurat)
  3. library(scTrends)
  4. AvailableData()
  5. data("pbmcMultiome")
  6. data("pbmc3k", package = "SeuratData")
  7. pbmc3k=UpdateSeuratObject(pbmc3k)
  8. table(pbmc3k$seurat_annotations)
  9. SeuratData::InstallData("pbmcMultiome")
  10. PBMC=pbmc.rna
  11. table(PBMC$seurat_annotations)
  12. DimPlot(PBMC)
  13. PBMC <- FindVariableFeatures(PBMC,selection.method = "vst", nfeatures = 3000)
  14. PBMC <- ScaleData(PBMC,verbose = T)
  15. PBMC <- RunPCA(PBMC,npcs = 50, verbose = T)
  16. PBMC=RunUMAP(PBMC,dim = 1:50)
  17. Idents(PBMC)="seurat_annotations"
  18. sceT=subset(PBMC, idents=c("CD4 Naive","CD4 TCM"))
  19. sceT <- ScaleData(sceT,verbose = T)
  20. sceT <- RunPCA(sceT,npcs = 50, verbose = T)
  21. sceT=RunUMAP(sceT,dim = 1:50)
  22. DimPlot(sceT)
  23. print(sceT)
  24. sceT=PBMC
  25. #Figure 2A
  26. CellDimPlot(
  27. sceT,
  28. group.by = "seurat_annotations",
  29. reduction = "UMAP",
  30. palcolor = c("#FB9A99","#B2DF8A"),
  31. pt.size = 2,
  32. label = F,
  33. label.size= 5,
  34. theme_use = "theme_blank",
  35. legend.position = "none"
  36. )
  37. library(CytoTRACE2)
  38. cytotrace2 <- cytotrace2(sceT,
  39. is_seurat = TRUE,
  40. slot_type = "counts",
  41. species = "human",
  42. seed =5201314)
  43. df=[email hidden]
  44. df$cellID=row.names(df)
  45. UMAP=cytotrace2@reductions[["umap"]]@cell.embeddings
  46. UMAP=as.data.frame(UMAP)
  47. UMAP$cellID=row.names(UMAP)
  48. head(df)
  49. # 替换df$cellID中的"."为"-"
  50. df$cellID <- gsub("\\.", "-", df$cellID)
  51. df$UMAP_1 <- UMAP[df$cellID, "umap_1"]
  52. df$UMAP_2 <- UMAP[df$cellID, "umap_2"]
  53. head(df)
  54. #Figure 2B
  55. plotthis::FeatureDimPlot(df, dims = 11:12,features = c("CytoTRACE2_Relative"), palcolor = (RColorBrewer::brewer.pal(11, "Spectral")),
  56. pt_size = 2,theme = "theme_blank",hex = TRUE,hex_bins = 30,theme_args = list(
  57. legend.text = element_text(size = 20), # 设置图注文本字体大小
  58. legend.title = element_text(size = 14) # 设置图注标题字体大小
  59. ))
  60. result=scBin(
  61. cytotrace2,
  62. pseudotime_col="CytoTRACE2_Relative",
  63. assay = "RNA",
  64. slot = "data",
  65. n_bins = 20,
  66. overlap_ratio = 0,
  67. pseudotime_order ="decreasing",
  68. x_range = c(0, 1),
  69. filter_genes = TRUE,
  70. max_zero_bins_pct = 0,
  71. min_expression = 0,
  72. min_cells_per_bin = 20,
  73. verbose = TRUE
  74. )
  75. bin_means <- result$bin_means
  76. x <- result$x
  77. head(bin_means)
  78. str(bin_means)
  79. mat20 <- bin_means[1:20,]
  80. #Figure 2c
  81. pheatmap(
  82. mat20,
  83. scale = "row",
  84. show_rownames = TRUE,
  85. show_colnames = TRUE,
  86. cluster_rows = FALSE,
  87. cluster_cols = FALSE,
  88. border_color = "white",
  89. fontsize = 12,
  90. fontsize_row = 20,
  91. fontsize_col = 20,
  92. color = colorRampPalette(
  93. rev(brewer.pal(n = 11, name = "Spectral"))
  94. )(100)
  95. )
  96. ps <- scPS(result, test_genes =9702, sample_method = "none")
  97. Tcell=scTrends(result,
  98. min_cells = 4,
  99. peak_position_margin = 0.15,
  100. max_sign_changes_mono = 1,
  101. gam_k = 8,
  102. stable_cv_threshold = 0.168,
  103. stable_range_threshold = 0.100,
  104. stable_autocorr_threshold = 0.750,
  105. min_peak_prominence = 0.200,
  106. min_slope_ratio = 0.100,
  107. total_change_up = 0.991,
  108. total_change_down = -0.793,
  109. monotone_consistency = 0.750,
  110. min_sign_changes_complex = 3,
  111. complex_variance_threshold = 0.350,
  112. compute_pvalue = T,
  113. n_perm = 1000,
  114. adjust_method = "BH",
  115. alpha = 0.05,
  116. n_cores = 16,
  117. use_parallel = TRUE,
  118. return_details = FALSE,
  119. verbose = TRUE)
  120. data=Tcell$results
  121. write.xlsx(data,"E:/足细胞应激/函数/data.xlsx")
  122. #Figure 3A-F
  123. plot_trends(
  124. trend_result = data,
  125. bin_means = bin_means,
  126. x = x,
  127. trend_type = "Complex",
  128. max_genes = 30,
  129. sig_metric = "p_value",
  130. sig_cutoff = 1,
  131. show_individual = TRUE,
  132. show_mean = TRUE,
  133. show_se = TRUE,
  134. individual_color = "gray80",
  135. individual_alpha = 0.3,
  136. individual_size = 0.5,
  137. mean_color ="#999999",
  138. mean_size = 1.5,
  139. se_fill = "#F5D2A8",
  140. se_alpha = 0.3,
  141. se_scale = 1.96
  142. )+
  143. labs(
  144. title = "Down-Up (Top 30)",
  145. x = "Pseudotime (0 = Early, 1 = Late)",
  146. y = "Expression Level"
  147. ) +
  148. theme_minimal() +
  149. theme(
  150. plot.title = element_text(face = "bold", size = 24, hjust = 0.5),
  151. axis.title = element_blank(),
  152. axis.text = element_text(size = 20),
  153. panel.grid.major = element_line(color = "gray90", linewidth = 0.3),
  154. panel.grid.minor = element_blank(),
  155. panel.border = element_rect(color = "black", fill = NA, linewidth = 1),
  156. panel.background = element_rect(fill = "white", color = NA))+coord_cartesian(
  157. xlim = c(0, 1),
  158. ylim = c(0, 0.5),
  159. expand = FALSE
  160. )
  161. colors <- c(
  162. "#FB9A99", "#377EB8", "#4DAF4A", "#F781BF", "#BC9DCC", "#A65628", "#54B0E4", "#F5D2A8",
  163. "#222F75","#B2DF8A", "#E3BE00", "#E7298A", "#E41A1C", "#D2EBC8", "#00CDD1",
  164. "#5E4FA2", "#8CA77B", "#1B9E77","#8DD3C7", "#7DBFC7", "#B3DE69", "#999999", "#FCED82",
  165. "#F5CFE4", "#F5D2A8", "#B383B9", "#EE934E", "#BBDD78"
  166. )
  167. #Figure 3G
  168. my_genes=c("LEF1","TCF7","CD27","CD28")
  169. plot_genes(bin_means, x, genes = my_genes, color = colors, size = 1.2, alpha = 0.5) +
  170. labs(
  171. x = "Pseudotime (0 = Early, 1 = Late)",
  172. y = "Expression Level"
  173. ) +
  174. theme_minimal() +
  175. theme(
  176. plot.title = element_text(face = "bold", size = 24, hjust = 0.5),
  177. axis.title = element_text(size = 24),
  178. axis.text = element_text(size = 24),
  179. legend.text = element_text(size = 24),
  180. legend.title = element_text(size = 24),
  181. panel.grid.major = element_line(color = "gray90", linewidth = 0.3),
  182. panel.grid.minor = element_blank(),
  183. legend.position = "right",
  184. panel.border = element_rect(color = "black", fill = NA, linewidth = 1),
  185. panel.background = element_rect(fill = "white", color = NA)
  186. ) +
  187. coord_cartesian(
  188. xlim = c(0, 1),
  189. ylim = c(0, 5),
  190. expand = FALSE
  191. ) +
  192. guides(color = guide_legend(override.aes = list(size = 5)))
  193. genes_remove <- c("SCAMP2", "FAM13A", "RAD51-AS1", "MRPL38", "IDH3B")
  194. top_genes <- top_genes %>%
  195. filter(!gene %in% genes_remove)
  196. top_genes <- data %>%
  197. group_by(trend) %>%
  198. arrange(p_value) %>%
  199. slice_head(n = 5) %>%
  200. ungroup()
  201. genes_use <- top_genes$gene
  202. bin_sub <- bin_means[genes_use, ]
  203. #Figure 3H
  204. pheatmap(
  205. bin_sub,
  206. scale = "row",
  207. show_rownames = TRUE,
  208. show_colnames = TRUE,
  209. cluster_rows = FALSE,
  210. cluster_cols = FALSE,
  211. border_color = "white",
  212. fontsize = 12,
  213. fontsize_row = 24,
  214. fontsize_col = 20,
  215. color = colorRampPalette(
  216. rev(brewer.pal(n = 11, name = "Spectral"))
  217. )(100)
  218. )
  219. saveRDS(sceT,"E:/足细胞应激/函数/投稿/PBMC.rds")

scTrends-Test.R, under CC-BY-4.0 · at the source

Overview

Authors: Jianbo Qing1, Jiaying Hu1, Xiao Wang2, Junnan Wu1
  1. Department of Nephrology, Sir Run Run Shaw Hospital, Zhejiang University School of Medicine,Hangzhou, 310000 China
  2. Core Laboratory, Sir Run Run Shaw Hospital, Zhejiang University School of Medicine,Hangzhou, 310000 China
Institutions: Zhejiang University (China)
Journal: BMC genomics, volume 27, issue 1, article 649
Dates: received 30 January 2026; accepted 20 May 2026; published online 30 May 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1186/s12864-026-12987-2 · PMID 42218405 · PMCID PMC13435386 · OpenAlex W7162852431
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), mouse (organism), cellular / molecular (subfield)
Keywords: scTrends, Single-cell, Pseudotime, Gene trends, Automatic classification
MeSH: Gene Expression Profiling*, RNA-Seq*, Single-Cell Analysis*, Software*, Transcriptome*, Algorithms, Animals, Humans, Mice, Single-Cell Gene Expression Analysis (* major topic)
Journal subjects: Software
Topic: Single-cell and spatial transcriptomics (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: National Natural Science Foundation of China (National Science Foundation of China) (82370717); Key Program of the Natural Science Foundation of Zhejiang Province (LZ23H050001)
Citations: not cited yet (Europe PMC); 41 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.

figshare 32325834

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Languages: R (1)
Size: 4 files, 1 script
Software Heritage: not checked
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Seurat (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
1 file

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 1 script, each with its path and the digest of its content;
  • 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1186/s12864-026-12987-2.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 5 keywords, 10 MeSH terms, 2 funders, 41 references.

Cite

This paper

Qing, J., Hu, J., Wang, X., & Wu, J. (2026). scTrends: automated classification and strength quantification of gene expression trends along pseudotime in single-cell RNA-seq. BMC genomics, 27(1), 649. https://doi.org/10.1186/s12864-026-12987-2

BibTeX

@article{qing2026sctrends,
author = {Qing, Jianbo and Hu, Jiaying and Wang, Xiao and Wu, Junnan},
title = {{scTrends: automated classification and strength quantification of gene expression trends along pseudotime in single-cell RNA-seq}},
journal = {BMC genomics},
year = {2026},
month = may,
volume = {27},
number = {1},
pages = {649},
publisher = {BMC},
issn = {1471-2164},
doi = {10.1186/s12864-026-12987-2},
url = {https://doi.org/10.1186/s12864-026-12987-2},
pmid = {42218405},
pmcid = {PMC13435386}
}

RIS

TY - JOUR
AU - Qing, Jianbo
AU - Hu, Jiaying
AU - Wang, Xiao
AU - Wu, Junnan
TI - scTrends: automated classification and strength quantification of gene expression trends along pseudotime in single-cell RNA-seq
T2 - BMC genomics
J2 - BMC Genomics
PY - 2026
DA - 2026/05/30
VL - 27
IS - 1
SP - 649
SN - 1471-2164
PB - BMC
DO - 10.1186/s12864-026-12987-2
UR - https://doi.org/10.1186/s12864-026-12987-2
LA - en
ER -

CSL-JSON

{
"id": "10.1186/s12864-026-12987-2",
"type": "article-journal",
"title": "scTrends: automated classification and strength quantification of gene expression trends along pseudotime in single-cell RNA-seq",
"container-title": "BMC genomics",
"author": [
{
"family": "Qing",
"given": "Jianbo"
},
{
"family": "Hu",
"given": "Jiaying"
},
{
"family": "Wang",
"given": "Xiao"
},
{
"family": "Wu",
"given": "Junnan"
}
],
"container-title-short": "BMC Genomics",
"volume": "27",
"issue": "1",
"page": "649",
"DOI": "10.1186/s12864-026-12987-2",
"PMID": "42218405",
"PMCID": "PMC13435386",
"ISSN": "1471-2164",
"publisher": "BMC",
"URL": "https://doi.org/10.1186/s12864-026-12987-2",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
30
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41467-026-75722-1 [code]
Single-nucleus analysis of the adult human olfactory epithelium uncovers shared neurogenesis programs with the brain.
Journal: Nature communications
In common: Seurat, genetics / omics, 3 references
[2] doi:10.1093/bioinformatics/btag652 [code]
mmVelo: a deep generative model for estimating cell state-dependent dynamics across multiple modalities.
Journal: Bioinformatics (Oxford, England)
In common: genetics / omics, mouse, 3 references
[3] doi:10.1038/s41588-026-02737-1 [code]
Human and mouse adrenal glands are characterized by species-specific steroidogenic states and tissue turnover.
Journal: Nature genetics
In common: Seurat, genetics / omics, mouse, cellular / molecular, 2 references
[4] doi:10.1038/s41467-026-70523-y [code]
mist: a hierarchical Bayesian framework for detecting differential DNA methylation dynamics in single-cell data.
Journal: Nature communications
In common: Seurat, genetics / omics, mouse, 2 references
[5] doi:10.1038/s41380-026-03585-5 [code]
Multiomics analysis identifies VPA-induced changes in neural progenitor cells, ventricular-like regions, and cellular microenvironment in dorsal forebrain organoids.
Journal: Molecular psychiatry
In common: Seurat, genetics / omics, mouse, 2 references
[6] doi:10.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: Seurat, genetics / omics, cellular / molecular, 2 references
[7] doi:10.1038/s42003-026-09915-1
Single cell and spatial sequencing analysis of cancer associated fibroblasts in the brain metastasis tumor microenvironment.
Journal: Communications biology
In common: genetics / omics, cellular / molecular, 3 references
[8] doi:10.1038/s41586-026-10797-w [code]
A global molecular code for birth order and neuronal identity in Drosophila.
Journal: Nature
In common: Seurat, genetics / omics, cellular / molecular, 2 references
[9] doi:10.1038/s41586-026-10629-x [code]
Whole-genome duplication shaped cell-type evolution in the vertebrate brain.
Journal: Nature
In common: Seurat, genetics / omics, mouse, cellular / molecular, 1 reference
[10] doi:10.1038/s41593-026-02367-0 [code]
A reproducible three-dimensional model of human brain tissue to investigate physiological and disease-associated microglia phenotypes.
Journal: Nature neuroscience
In common: Seurat, cellular / molecular, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.