Single-cell RNA sequencing has led to unprecedented levels of data complexity. Although several computational platforms are available, performing data analyses for multiple datasets remains a significant challenge. Here, we provide a comprehensive analytical protocol to interrogate multiple datasets on SingCellaR, an analysis package in R. This tool can be applied to general single-cell transcriptome analyses. We demonstrate steps for data analyses and visualization using bespoke pipelines, in conjunction with existing analysis tools to study human hematopoietic stem and progenitor cells.For complete details on the use and execution of this protocol, please refer to   •SingCellaR is an open-source analysis tool for single-cell RNA sequencing data•SingCellaR facilitates various analyses, including data integration and comparison•Step-by-step analysis and visualization using SingCellaR for human hematopoietic cells Single-cell RNA sequencing has led to unprecedented levels of data complexity. Although several computational platforms are available, performing data analyses for multiple datasets remains a significant challenge. Here, we provide a comprehensive analytical protocol to interrogate multiple datasets on SingCellaR, an analysis package in R. This tool can be applied to general single-cell transcriptome analyses. We demonstrate steps for data analyses and visualization using bespoke pipelines, in conjunction with existing analysis tools to study human hematopoietic stem and progenitor cells. This protocol describes a method for analyzing single-cell RNA sequencing (scRNA-seq) datasets using an R package called SingCellaR. In addition to standard functions , similar to those performed by available R and Python analysis tools like Seurat , MonocleSingCellaR supports multiple modalities for visualization, including tSNE, UMAP, force-directed graph (FDG) in two- or three-dimensional embeddings, diffusion maps, violin and bubble plots, and heatmaps. Cells can be identified on these plots according to user-defined parameters, such as cluster, donor, tissue of origin, disease state, etc., by accessing relevant information from the SingCellaR object. Multiple signature gene scores can also be superimposed on the same embeddings. For example, visualization of sets of canonical genes used to distinguish different blood cell lineages can help exploration of the cell types contained within a dataset independently of cell clustering algorithms. To annotate cell types and states, SingCellaR uses gene set enrichment analysis to calculate enrichment scores for user-defined, curated gene sets. This system can be used alongside manual inspection for canonical marker genes, or other existing algorithms .We recently demonstrated the utility of the SingCellaR pipeline in a study of human hematopoiesis. Studying the site- and stage-specific changes of normal hematopoiesis over human development is crucial to understanding the origin of disorders that tend to emerge at specific ages. We analyzed scRNA-seq datasets from hematopoietic stem and progenitor cells (HSPCs) from five different tissues sampled across four stages of the human lifetime . This stHere we present a comprehensive protocol for the analytical pipeline demonstrating step-by-step data analysis and visualization as employed in the recent publication . We coveTiming: 5–10 minIn this protocol, we use scRNA-seq datasets of hematopoietic stem and progenitor cells (HSPCs) from human tissues across different developmental stages, including early fetal liver (eFL), matched fetal liver (FL) and bone marrow (FBM) isolated from the same fetuses, pediatric bone marrow (PBM), and adult bone marrow (ABM). Here, human fetal liver samples from first and second trimester are referred to eFL and FL respectively. Table S1 in  shows thhttps://doi.org/10.5281/zenodo.5879071. Zenodo (https://zenodo.org/) is an open and citable repository for sharing curation and publication of data and software from research outputs, regardless of data format, size, and access restrictions or license.We have provided pre-processed datasets and available gene sets on Zenodo: 1.cellranger pipeline outputs of samples from different tissues: the file ‘cellranger_output.zip’ is a zipped folder containing the cellranger pipeline results of 9 samples ;2.human signature gene sets that are used in this protocol;3.codes (Code.zip) used in this protocol;4.generated R objects from this protocol.The compiled datasets consist of:https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger) contains analysis pipelines used to align sequencing reads to the reference genome, generate feature-barcode matrices, and perform other downstream analyses. We performed cellranger count as described in https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/count to obtain feature-barcode matrices for each library. The outputs of the pipeline include a Matrix Market file of gene expression (matrix.mtx.gz), cell barcode (barcodes.tsv.gz) and gene metadata (features.tsv.gz) files.) {> install.packages("devtools")> }> if(!require(BiocManager)) {> install.packages("BiocManager")> }> devtools::install_githubCRITICAL: We tested SingCellaR installation on macOS Mojave and Catalina, and Windows 10.Before we begin, the user has to install SingCellaR and other dependency packages. R packages are hosted across multiple repositories, namely Comprehensive R Archive Network (CRAN), Bioconductor, and Github. For a brief introduction, CRAN is the R central software repository for the latest and previous versions of the R distribution and packages. Bioconductor is the R repository to facilitate R packages developed for biological data analysis. GitHub is a commercial repository that hosts services for individuals and teams for software version control and collaboration. The R functions ‘install.packages’, ‘BiocManager::install’, and ‘devtools::install_github’ will be used to install packages from CRAN, Bioconductor, and Github, respectively. Prior to installation, the function ‘if(!require("package_name"))’ will be used to check if the package has already been installed on a computer, and installation will proceed for packages not yet installed on the computer.2.a.> library(reticulate)> conda_create> py_install> py_installModules required for the force-directed graph analysis.b.> py_installCRITICAL: We tested the fa2 python module for the force-directed graph analysis using Python versions 2.7, 3.6 and 3.8. Using Conda environment is recommended in conjunction with reticulate package. Conda (https://docs.conda.io/en/latest/) is a virtual environment management system for Python. With Conda, the user can create, remove, and update environments that have different versions of Python packages installed in them. This flexibility is especially helpful on devices in which the user does not have administrative privileges to install Python packages on the device and compile version control for specific packages.Module required for doublet removal using Scrublet.Install required python modules by running the following R code:3.a.> if(!require(harmony)) {> install.packages("harmony")> }harmony – required for data integration using Harmony method .> if(!reb.> if(!require(AUCell)) {> BiocManager::install("AUCell")> }AUCell – required for computing AUCell scores with specified gene signatures .> if) {> install.packages> }> if(!require(doRNG)) {> install.packages("doRNG")> }doParallel and doRNG – required for parallel processing in AUCell analysis.d.> if(!require(DAseq)) {> devtools::install_github("KlugerLab/DAseq")> }DAseq – required for the analysis of differential abundance .> if(!ree.> if(!require(destiny)) {> BiocManager::install("destiny")}destiny – required for the trajectory analysis using diffusion map .> ifNote: The destiny package is not available for Bioconductor version 3.13. The user can install this package from GitHub.> install_githubOptional: SingCellaR supports multiple dataset integration and batch correction methods including Scanorama Seurat CCA/RPCA – required for the data integration.i.> install.packages("rliger")rliger – required for the data integration.j.> if ) install.packages("BiocManager")> BiocManager::install("sva")ComBat – required for the batch removal.k.> if ) install.packages("BiocManager")> BiocManager::install("limma")Limma – required for the batch removal.Install required R packages by running the following R code:R version 4 or higher is required with other R packages, as shown in the Timing: 10–15 min for each sample, depending on the number of cells being analyzed4.Load SingCellaR package into R environment:> library(SingCellaR)> setwd("./SingCellaR_objects")Note: ‘./SingCellaR_objects’ is a local folder for this analysis. The user can change the folder name to a suitable file path in a local computer or server.5.Create SingCellaR object. SingCellaR object is an extension of the SingleCellExperiment (periment  object f> data_matrices_dir<-"./cellranger_output/eFL1/"> eFL_1<-new("SingCellaR")> eFL_1@dir_path_10x_matrix<-data_matrices_dir> eFL_1@sample_uniq_id<-"eFL_1"> load_matrices_from_cellranger> eFL_1This step creates a SingCellaR object for each sample and performs quality control (QC) to identify cells that qualify for further downstream analyses. We demonstrate the selection process of high-quality cells using multiple QC plots, data normalization, and identifying highly variable genes. The process starts from reading in the input files for each sample generated directly from the cellranger pipeline. Here, we show an early fetal liver (eFL_1) dataset as an example.CRITICAL: The ‘cellranger.version’ parameter is required to be compatible with the cellranger pipeline output file. The cellranger output file ‘features.tsv.gz’ for gene features is generated from Cell Ranger version 3 and above, whereas version 2 of Cell Ranger creates the file ‘genes.tsv.gz’.6.Create cell metadata. Cell metadata will be created. Rows represent cells and columns represent variables. Variables computed in this step include the number of UMIs and detected genes per cell, and percentage of mitochondrial gene expression for each cell.> process_cells_annotationa.mito_genes_start_with: Gene names starting with ‘MT-’ are used as a set of mitochondrial genes for human and ‘mt-’ for mouse samples.Note: The cell metadata can be accessed using the function ‘get_cells_annotation(eFL_1)’ or eFL_1@meta.data. The user can manually add additional information to the columns of the cell metadata.The following parameter is required:7.Visualize QC matrices. QC matrices computed in step 6 can be explored using the plotting functions:a.> plot_cells_annotationHistogram A.> plot_b.> plot_cells_annotationBoxplot B.> plot_c.> plot_UMIs_vs_Detected_genes(eFL_1)Plot of the number of UMIs versus the number of detected genes per cell C.> plot_Now the SingCellaR object – eFL_1 is created.8.Annotate cell quality, identify expressed genes, and assign cell and gene status into metadata. After visualizing QC matrices in step 7, the user can specify filtering parameters using the observed number of UMIs and detected genes per cell, and percentage of mitochondrial gene expression. The function ‘filter_cells_and_genes’ assigns a new column named IsPassed that will be added into the cell metadata. Cells that pass QC will be annotated as TRUE. Expressed genes will be identified in this step and the column named IsExpress will be added into the gene metadata. Genes expressed above and below the user-defined threshold will be annotated as TRUE or FALSE. Although all original cells and genes are retained in the metadata and gene expression matrix in this step, these annotations will be used to subset cells and expressed genes for further downstream analyses. The number of cells passing QC thresholds will be shown on the R console after running the following code:> filter_cells_and_genesa.min_UMIs: The lower threshold for UMI counts, above which cells are annotated as high-quality. To be used in conjunction with max_UMIs argument. Default value is 1,000.b.max_UMIs: The upper threshold for UMI counts, below which cells are annotated as high-quality. To be used in conjunction with min_UMIs argument. Default value is 30,000.c.min_detected_genes: The lower threshold for the number of expressed genes, above which cells are annotated as high-quality. To be used in conjunction with max_detected_genes argument. Default value is 1,000.d.max_detected_genes: The upper threshold for the number of expressed genes, below which cells are annotated as high-quality. To be used in conjunction with min_detected_genes argument. Default value is 8,000.e.genes_with_expressing_cells: The lower threshold for the number of cells in which a gene is expressed (UMI >=1), above which, the gene will be annotated as expressed. Default value is 10.f.isRemovedDoublets: If set to TRUE (default), doublets will be removed prior to downstream analyses.Note: Parameters used for filtering out cells with low quality can be varied across tissues and organs from different datasets. For example, the percentage threshold for mitochondrial gene expression, ‘max_percent_mito’ can be set higher for liver tissues The following parameters are described:9.Normalize UMI counts. SingCellaR scales UMI counts by normalizing each library size to 10,000 or mean library size.> normalize_UMIsThe following parameter is required:use.scaled.factor: When set to TRUE, the gene expression values will be multiplied by 10,000 (by default) and normalized against the library size  of each cell. The user can change the scale factor value using the scale.factor parameter. If set to FALSE, the function will use the mean of library size across all cells as the scale factor.CRITICAL: Using use.scaled.factor=TRUE is recommended for 10× genomics data. The user should consider specifying use.scaled.factor=FALSE for scRNA-seq data generated from plate-based protocols, e.g., Smart-seq2  as the fitting method for gene expression and coefficient of variation to identify highly variable genes. The GLM is suitable for modeling log-normal data from a sparse normalized gene expression matrix. A column named IsVarGenes is added to the gene metadata and genes identified as highly variable are annotated as TRUE, while all other genes are annotated as FALSE. The number of genes used to fit in the model and the number of identified variable genes will be shown after running the following code:> get_variable_genes_by_fitting_GLM_modela.mean_expr_cutoff: The mean normalized expression value, above which, the genes are identified as highly variable. Default value is 0.1.b.disp_zscore_cutoff: The dispersion of z-score, above which, the genes are identified as highly variable. Default value is 0.1.Note: In this step, we used lower cut-off values to increase the number of detected highly variable genes per sample for the downstream analyses.The following parameters are required:11.Save the R object for further analyses.> save12.Repeat the analyses for the rest of samples. R codes are available at Zenodo: https://doi.org/10.5281/zenodo.5879071.Pause point: The user can pause the analysis after pre-processing each sample.Timing: 15–30 min for each group, 1–2 h for all stages13.Load SingCellaR package.> library(SingCellaR)14.Integrate pre-processed biological replicates. The user will initialize the integrated SingCellaR class object ‘SingCellaR_Int’ and assign a unique identifier prior to merging two datasets using the ‘preprocess_integration’ function.> eFL <- new("SingCellaR_Int")> eFL@dir_path_SingCellR_object_files<-"./"> eFL@SingCellR_object_files=c> preprocess_integration(eFL)> eFL15.Annotate cell quality and expressed genes. Filtering process has been already performed separately for each sample (see step 8), therefore the filtering parameters for this step will be set to include all cells. From the filtering output below, all cells will be retained, after running the following code:> filter_cells_and_genes16.Normalize and scale UMI counts.> normalize_UMIsNote: See step 9 for details of required parameters.17.Regress out confounding factors. The normalized and scaled gene expression values from step 16 will be adjusted by regressing out cell-to-cell variation in gene expression values due to confounding factors . To this end, SingCellaR implements the ‘lmFit’ function from the R package limma ge limma , SingCela.residualModelFormulaStr: The formula format used to regress out confounding factors. The names of variables defined have to be the same as the column names of the cell metadata.Note: The user can change the residualModelFormulaStr parameter and perform the following steps down to step 23  to explore the effect on cell clustering by specifying different sets of confounding factors. For example, the user can set residualModelFormulaStr = "∼UMI_count+percent_mito" to compare with residualModelFormulaStr = "∼UMI_count+percent_mito+sampleID" to explore the effect of sample.The following parameter is required:18.Identify highly variable genes. The number of genes used for fitting the GLM model and the number of highly variable genes will be identified after running the following code:> get_variable_genes_by_fitting_GLM_modelNote: See step 10 for details of required parameters.19.Remove selected genes. Here, we remove mitochondrial and ribosomal genes from highly variable genes identified from step 18 to avoid the skewed effect of ribosomal and mitochondrial gene expression in downstream analyses. The number of genes that are excluded will be shown after running the following code:> remove_unwanted_genes_from_variable_gene_set)Note: The human.ribosomal-mitochondrial.genes.gmt file can be downloaded from Zenodo: https://doi.org/10.5281/zenodo.5879071 under the folder Human_genesets.20.Visualize highly variable genes A.Figure > plot_variable_genes(eFL)21.Perform principal component analysis (PCA). To interpret the relationship across single cells, dimensionality reduction methods are required to reduce high dimensionality data to the visualizable two- or three-dimensional space. In PCA, the reduced dimensional space is represented by principal components. The top PCs will capture most of the variance of the dataset. Here, we perform linear dimensionality reduction using PCA and then bring forward the most informative PCs for further nonlinear dimensionality reduction to visualize cells in a two-dimensional space. To this end, highly variable genes identified from steps 18–19 and visualized in step 20 will be used for PCA using the ‘runPCA’ function, a wrapper function for the ‘irlba’ function from the irlba package (http://bwlewis.github.io/irlba/).> SingCellaR::runPCAa.use.components: The number of principal components (PCs) to estimate. Default value is 50.b.use.regressout.data: If set to TRUE (default), the adjusted gene expression values from step 17 will be used.The following parameters are required:22.Visualize principal components. The elbow plot is used to determine the number of PCs to be included for further dimensionality reduction analyses 23.Perform nonlinear dimensionality reduction analyses. Running nonlinear dimension reduction on all highly variable genes requires high computational resources and processing time. Hence, using identified PCs from step 22 for nonlinear dimension reduction analysis is a standard technique for scRNA-seq analysis. Nonlinear dimension reduction analysis is suitable for capturing cellular heterogeneity (https://cran.r-project.org/web/packages/uwot/). Based on the elbow plot shown in step 22, we select the first 30 PCs for UMAP analysis.> SingCellaR::runUMAPogeneity . Here, wogeneity  by runnia.dim_reduction_method: The method name for the linear dimension reduction.b.n.dims.use: The number of selected PCs as determined in step 22.c.n.neighbors: The number of neighboring cells  used for manifold approximation. Default value is 30.d.uwot.metric: The distance metric name. Default is ‘cosine’.Note: The user can also apply the t-Distributed Stochastic Neighbor Embedding (tSNE) approach using the ‘runTSNE’ function. The reduced dimension coordinates for UMAP and tSNE can be accessed using functions ‘get_umap.result’ and ‘get_tsne.result’ respectively.The following parameters are required:24.Visualize cell lineages on low dimensional space. To explore whether the cells in each lineage are clustered in close proximity, we will visualize the UMAP result with the expression of multi-lineage gene sets using the ‘plot_umap_label_by_multiple_gene_sets’ function , custom_color = c, isNormalizedByHouseKeeping = F, point.size = 1)function C. Here, a.gmt.file: Path to the file containing the gene signatures in GMT format.b.show_gene_sets: The names of the gene signatures to plot on UMAP.c.custom_color: The color assignment to each signature specified in ‘show_gene_sets’.d.isNormalisedByHouseKeeping: When set to TRUE (default), the gene expression values of the individual genes of each gene signature specified will be normalized by the housekeeping genes. The housekeeping genes are defined as the top 100 genes with the highest total gene expression values across all cells.e.point.size: Size of the data points on UMAP plot. Default value is 2.Note: Lineage gene sets (human.signature.genes.v1.gmt) are available at Zenodo: https://doi.org/10.5281/zenodo.5879071 under Human_genesets folder and from original publication  is used for cell clustering.> identifyClustersa.n.dims.use: The number of PCs to use. Default number is 30.b.dim_reduction_method: The dimensionality reduction analysis name.c.n.neighbors: The number of neighboring cells. This number may be the same as specified in step 23 if UMAP is used. Default number is 30.d.knn.metric: The distance metric, ‘euclidean’ is used by default. Another option is ‘cosine’.Note: The cluster metadata for each cell can be accessed using the ‘get_cluster’ function.The following parameters are required:26.Visualize clusters on low dimensional space. Louvain clusters can be shown on UMAP using the ‘plot_umap_label_by_clusters’ function function D.> plot_a.show_method: The clustering detection name used as in step 25.b.mark.clusters: If set to TRUE (default) , cluster identifiers will be shown on the plot.The following parameters are required:27.Identify cluster-specific genes. The user can identify marker genes, which are particularly expressed in each cluster using the ‘findMarkerGenes’ function. Differentially expressed gene analysis between one cluster against all other clusters is performed using the nonparametric Wilcoxon test on normalized expression values for the comparison of expression level and Fisher’s exact test for the comparison of expressing cell frequency . This process is iterated for each cluster against all other clusters, therefore the processing time in this step is dependent on the number of cells and clusters. By default, the minimum log2 fold change ‘min.log2FC’ parameter is set to 0.5 and the minimum fraction of expressing cells in each cluster ‘min.expFraction’ parameter is set to 0.3.> findMarkerGenesrequency . P-valuea.cluster.type: The clustering detection method used in step 25.The following parameter is required:28.Save R object for further analyses.> save29.Repeat the integration process for all biological replicates of FL, FBM, and PBM samples. There is only one sample for ABM. Therefore, data integration is not required for this sample at this step. All R codes provided for each integration are available at Zenodo: https://doi.org/10.5281/zenodo.5879071.Pause point: The user can pause the analysis after integrating the biological replicates for each developmental stage and save the results in multiple SingCellaR objects.This step integrates the individual R objects from pre-processed biological or technical replicates generated from step 12. Here, we illustrate the integration of two early fetal liver samples collected from two donors .13.Load Timing: 2–3 hThe aim of integrating all samples is to assess the existence of batch or donor-specific effects that are confounding factors contributing to differences in gene expression profile across samples. Examples of batch effect include differences in library preparation methods, sequencing batch, and donor or sample ID . If the 30.Load SingCellaR package.> library(SingCellaR)31.Initialize the SingCellaR_Int object and merge datasets generated from step 29.> Human_HSPC <- new("SingCellaR_Int")> Human_HSPC@dir_path_SingCellR_object_files<-"./"> Human_HSPC@SingCellR_object_files=c> preprocess_integration(Human_HSPC)> Human_HSPC32.Annotate cell quality. Input parameters for integrated samples have been set to include all cells. The user should observe that there are no cells being filtered out after running the following code:> filter_cells_and_genes33.Incorporate donor and sequencing batch information into cell metadata. This information is required to perform the batch correction.> meta.data <- read.delim> Human_HSPC@meta.data<- meta.dataGeneral examples of data integration include integrating samples from healthy donors and patients  and from> head(Human_HSPC@meta.data)34.Normalize and scale UMI counts.> normalize_UMIs35.Identify highly variable genes.> get_variable_genes_by_fitting_GLM_model36.Remove ribosomal and mitochondrial genes.> remove_unwanted_genes_from_variable_gene_set)37.Visualize highly variable genes.> plot_variable_genes(Human_HSPC)38.Run PCA.> SingCellaR::runPCA39.Visualize principal components. Based on the elbow plot, the first 40 PCs will be used for data integration.> plot_PCA_Elbowplot(Human_HSPC)40.Integrate data using Supervised Harmony. We introduce Supervised Harmony, a method for data integration implemented in SingCellaR. Supervised Harmony can be performed using the ‘runSupervised_Harmony’ function. This method is an adaptation of Harmony method ,    n.dims.use = 40,    hcl.height.cutoff = 0.3,    harmony.max.iter = 20,    n.seed = 6)y method . More dey method . Here, sa.covariates: The name(s) of the covariate(s) specified as batch effect to be adjusted. The names should be the same as the column names of the cell metadata.b.n.dims.use: The number of PCs as determined from step 39 to be used in this step.c.hcl.height.cutoff: The cutree cut-off value for hierarchical clustering. Default value is 0.25.d.harmony.max.iter: The maximum number of rounds to run harmony. Default value is 10.e.n.seed: The random seed number generator. Default value is 1.CRITICAL: Before running Supervised Harmony method, the ‘findMarkerGenes’ function must be performed for each developmental stage analysis (see step 27). The seed number (random number generator) and software version can vary across different devices. Hence, the user may notice variations in the rotation of the plots and clusters, which can be verified and visualized using lineage genes (see step 24).The following parameters are required:41.Nonlinear dimension reduction analysis.> SingCellaR::runUMAPUpdated meta.data can be checked by running:> supervised_harmony.UMAP<-get_umap.result(Human_HSPC)> saveRDS42.Integrate data using Harmony. SingCellaR also implements a wrapper function for Harmony integration method (> library(harmony)> SingCellaR::runHarmony,     n.dims.use = 40,     harmony.max.iter = 20,     n.seed = 6)n method . Harmonya.covariates: The name(s) of the covariate(s) specified as batch effect to be adjusted. The names should be the same as the column names of the cell metadata.b.n.dims.use: The number of PCs as determined from step 39 to be used in this step.c.harmony.max.iter: The maximum number of rounds to run harmony. Default value is 10.d.n.seed: The random seed number generator. Default value is 1.> SingCellaR::runUMAP> harmony.UMAP<-get_umap.result(Human_HSPC)> saveRDSThe UMAP analysis result from Harmony integration will be saved. This UMAP object contains cell metadata and UMAP coordinates that will be used to compare with the results from other integrative methods.The following parameters are required:43.Integrate data using Seurat. SingCellaR implements two wrapper functions for Seurat integration . Due to the fast integration of using RPCA, in this protocol, we will demonstrate the function ‘runSeuratIntegration_with_rpca’ as an example. However, the user should try Seurat CCA to make a comparison of the integrative results. The user can find how to use the function ‘runSeuratIntegration’ from SingCellaR’s vignette. After the integration, the UMAP analysis from Seurat RPCA integration will be performed to obtain the embedding.> library(Seurat)> meta.data<-get_cells_annotation(Human_HSPC)> rownames(meta.data)<-meta.data$Cell> SingCellaR::runSeuratIntegration_with_rpcaegration . First, a.Seurat.metadata: The cell metadata.b.n.dims.use: The number of PCs as determined from step 39 to be used in this step.c.Seurat.split.by: The indicated feature name found in the cell metadata for splitting samples for integration.d.Use.SingCellaR.varGenes: If set to TRUE, the highly variable genes identified by SingCellaR will be used. If set to FALSE, the highly variable genes will be identified using Seurat. Default value is FALSE.> SingCellaR::runUMAP> Seurat_rpca.UMAP<-get_umap.result(Human_HSPC)> saveRDSNext, the UMAP analysis from Seurat RPCA integration will be performed and saved. This UMAP object will be used to compare with the results from other integrative methods.The following parameters are required:44.Integrate data using Scanorama. SingCellaR implements a wrapper function for Scanorama integration (egration . Scanora> runScanorama(Human_HSPC)> runPCA> SingCellaR::runUMAP> Scanorama.UMAP<-get_umap.result(Human_HSPC)> saveRDS45.Integrate data using Limma batch correction method. To perform Limma analysis > runPCA> SingCellaR::runUMAP> Limma.UMAP<-get_umap.result(Human_HSPC)> saveRDS46.Assign a cell type to single cells using the AUCell analysis. In this step, we will perform AUCell analysis (> library(AUCell)> exprMatrix <- get_umi_count(Human_HSPC)> human_HSPCs_cells_rankings <- AUCell_buildRankingsanalysis  with seva.exprMat: The raw expression count matrix. This can be retrieved from the SingCellaR object using the ‘get_umi_count’ function.b.nCores: The number of cores to use for parallel processing. The maximum number of cores is dependent on the user’s device. Default value is 1.c.plotStats: If set to TRUE (default), the expression statistics will be summarized and plotted in the histogram and boxplots.Note: This step may be time-consuming. The user is advised to save the output of this step using the following code:> save> human_HSPCs.AUCells.score <- Run_AUCellNext, the AUCell analysis will be performed using the ‘Run_AUCell’ function.The following parameters are required:d.AUCell_buildRankings.file: The input file name from the AUCell rankings.e.geneSets.gmt.file: The GMT file name that contains gene sets.> SingCellaR::runUMAP>plot_umap_label_by_AUCell_score,Human_HSPC.AUCells.Score,AUCell_cutoff=0.15,point.size = 0.5)To explore the AUCell scores on UMAP plots, the user can run UMAP analysis using different types of integrative methods. This step is to identify the AUCell cut-off score for a particular cell type. The example below shows the ‘plot_umap_label_by_AUCell_score’ function that will be used to plot the myeloid AUCell scores A.> SingC> Human_HSPC.CellType<-Human_HSPC.AUCells.Score> Human_HSPC.CellType$CellType<-""> Human_HSPC.CellType$CellType[Human_HSPC.CellType$HSPC_MPP >0.2]<-"HSC_MPP"> Human_HSPC.CellType$CellType[Human_HSPC.CellType$Erythroid >0.15]<-"Erythroid"> Human_HSPC.CellType$CellType[Human_HSPC.CellType$Myeloid >0.15]<-"Myeloid"> Human_HSPC.CellType$CellType[Human_HSPC.CellType$Lymphoid >0.15]<-"Lymphoid"> Human_HSPC.CellType$CellType[Human_HSPC.CellType$Megakaryocyte >0.15]<-"Megakaryocyte"> Human_HSPC.CellType$CellType[Human_HSPC.CellType$Eosinophil_Basophil_Mast >0.15]<-"Eo_Ba_Mast"> Human_HSPC.CellType$CellType[Human_HSPC.CellType$Endothelial_cells > 0.15]<-"Endothelial_cell"Next, cells with high AUCell scores  for each cell type will be assigned.> table(Human_HSPC.CellType$CellType)> saveRDSThe user can explore the number of cells with high AUCell scores for each cell type using the function below and the Human_HSPC.CellType data frame object will be saved for use as the reference to perform benchmarking explained in the next step.The following parameters are required:The UMAP analysis result from Supervised Harmony integration will be saved. This UMAP object will be used to compare with the results from other integrative methods (see steps below).47.Benchmark distinct integrative methods using LISI and kBET methods. Next, we assess whether single cells with identified cell types derived from the AUCell analysis are clustered well across covariate variables . SingCellaR provides the wrapper functions for a Local Inverse Simpson’s Index (LISI) (k-nearest-neighbor batch-effect test (kBET) (> library(lisi)> reference.celltypes<-"Human_HSPC.CellType_from_AUC_High.rds"> integrative.umaps<-c> method.names<-c> runLISIx (LISI)  and k-net (kBET)  to measut (kBET) B.> libraa.lisi_label1: The covariate variable name of interest such as batch or donor. Default value is donor.b.lisi_label2: The variable name that represents ground truth or high AUC score cell type. Default value is CellType.c.reference.celltype.rds.file: The RDS file name that contains cell type information.d.integrative.umap.rds.files: The RDS file names that contain UMAP coordinate information generated by different integrative methods.e.integrative.method.names: The integrative method names that represent in the same order as in integrative.umap.rds.files.f.IsShowPlot: If set to TRUE (default), the iLISI and cLISI scores will be plotted.> library(kBET)> reference.celltypes<-"Human_HSPC.CellType_from_AUC_High.rds"> integrative.umaps<-c> method.names<-c>kBET_result<-runKBETSecond, the ‘runKBET’ function is performed as shown below. This function will calculate kBET scores across different integrative methods and return a data frame that can be used for plotting.The following parameters are required:g.Covariate_variable_name: The covariate variable name of interest such as batch or donor. Default value is donor.h.reference.celltype.rds.file: The RDS file name that contains cell type information.i.integrative.umap.rds.files: The RDS file names that contain UMAP coordinate information generated by different integrative methods.j.integrative.method.names: The integrative method names that represent in the same order as in integrative.umap.rds.files.k.n.sample: The downsample size of data points used in kBET analysis. Default value is 1,000.Note: This step may be time-consuming, depending on the number of cells downsampled for kBET analysis.> level_order <- factor)> ggplot) +  + geom_boxplot+theme_classic+theme(axis.title.x=element_blank)Next, kBET scores across integrative methods will be plotted using the ‘ggplot’ function C.> levelIn this step, we illustrate how to benchmark integrative results generated from different methods using the wrapper functions for LISI and kBET analyses implemented in SingCellaR. We show the objective measurement of integration for each method using iLISI and cLISI scores B and kBEThe following parameters are required:48.Visualize selected features and cell lineages on low dimensional space. Here, we will assess whether the data integration was performed successfully. To this end, we annotate the UMAP by sample ID, donor type, sequencing batch, and lineage signature genes. After running the following codes, we observe that cells are clustered by cell lineage, while sample ID, donor type and sequencing batch effects are successfully corrected. These indicate that data integration and batch correction was effective in eliminating batch effect, while enabling functionally related cell to be clustered in close proximity.a.> plot_umap_label_by_a_feature_of_interestAnnotate UMAP plot by sample ID A.> plot_b.> plot_umap_label_by_a_feature_of_interestAnnotate UMAP plot by donor B.> plot_c.> plot_umap_label_by_a_feature_of_interestAnnotate UMAP plot by sequencing batch C.> plot_i.feature: The feature to annotate on UMAP plot. The feature name should match the column name of the cell metadata.ii.point.size: Size of the data points on UMAP. Default value is 1.iii.mark.feature: If set to TRUE (default), the feature name will be shown on the plot.The following parameters are required:d.> plot_umap_label_by_multiple_gene_sets, custom_color = c, isNormalizedByHouseKeeping = F, point.size = 1)Annotate UMAP plot by lineages genes D.> plot_49.Detect and assign clusters.> identifyClustersNote: Information in this step and the required parameters have been detailed in step 25 with the additional ‘integrative_method’ parameter specified to indicate the data integration and batch correction method used in step 40.50.Visualize clusters on low dimensional space. A.Figure > plot_umap_label_by_clusters51.Identify cluster-specific genes. This step will perform differential gene expression analysis to identify marker genes per each cluster.> findMarkerGenesNote: See details in step 27. This step will take time to run on the fully integrated datasets depending on the number of cells and identified clusters.52.Save the integrated R object for further analyses.> savePause point: The user can save the integrative SingCellaR_Int object for further downstream analyses.Timing: 1.5–2 hhttps://doi.org/10.5281/zenodo.5879071 in GMT file format and are also available in Table S3 from the original publication (53.Load the SingCellaR package.> library(SingCellaR)54.Load the integrated R object generated from step 52.> load(file = "./Human_HSPC_All.SingCellaR.rdata")55.Generate the pre-ranked genes. For each cluster, differential gene expression analysis is performed erformed  against a.cluster.type: The clustering method name.b.fishers_exact_test: The cut-off p-value. Default value is 0.1.c.min.expFraction: The fraction of expressing cells, above which, the gene will be included for GSEA. Default value is 0.01.d.min.log2FC: The log2 fold change, above which, the gene will be included for GSEA. Default value is 0.1.Note: The processing time of this step depends on the number of cells and clusters. The user is advised to save the output of this step using the following code:> saveThe following parameter is required:56.Perform GSEA. For each cluster, the ranked genes are subjected to GSEA to assess the enrichment for all curated hematopoietic gene sets.> fgsea_Results <- Run_fGSEA_for_multiple_comparisonsa.GSEAPrerankedGenes_list: The object containing the ranked genes for each cluster generated from step 55.b.gmt.file: Curated gene sets in GMT file format.Note: Here, we curated gene sets encompassing 75 hematopoietic signatures, but the user can also generate other customized gene sets in GMT file format as the input for GSEA. Each line of the GMT file represents one gene set. Specifically, the first column represents the name of the gene set, the second column represents the description of the gene set, and the third column onwards represents the genes that constitute the gene set, whereby each column represents one gene. The GMT file should be saved in tab-delimited format.The following parameters are required:57.Visualize GSEA results. A heatmap is used to observe and compare enrichment scores of each gene set (rows) across all clusters (columns). This visualization allows the user to annotate a cell type identity and cell states to each cluster based on the degree of enrichment of the curated gene sets. ne sets. B.> plot_a.isApplyCutoff: If set to TRUE, only the normalized enrichment scores (NES) of gene sets with adjusted P-values below the user-defined values in ‘adjusted_pval’ argument will be displayed on the heatmap. Default is FALSE.b.use_pvalues_for_clustering: If set to TRUE (default), the -log10 will be used instead of NES to cluster rows and/or columns.c.show_NES_score: If set to TRUE (default), NES will be displayed on the heatmap.d.fontsize_row: The font size of the gene set names along the rows of the heatmap. Default value is 5.e.adjusted_pval: The value, below which, NES will be displayed on the heatmap. The default value is 0.25.f.show_only_NES_positive_score: If set to TRUE, only NES > 0 will be displayed on the heatmap. Default is FALSE.g.format.digits: The number of significant digits to be used for numeric display on the heatmap. Default value is 2.h.clustering_method: The clustering method for clustering the rows and/or columns. Default is "complete".i.clustering_distance_rows: The distance metric to use when clustering the rows. Default is "euclidean".j.clustering_distance_cols: The distance metric to use when clustering the columns. Default is "euclidean".k.show_text_for_ns: If set to TRUE (default), non-significant (ns) NES will be displayed on the heatmap.The following parameters are required:58.Visualize selected canonical marker genes using UMAP. One or more individual genes can be plotted on UMAP using the ‘plot_umap_label_by_genes’ function )# Myeloid progenitor> plot_umap_label_by_genes)# Erythroid progenitor> plot_umap_label_by_genes)# Megakaryocytic progenitor> plot_umap_label_by_genes)# B lymphoid progenitor> plot_umap_label_by_genes)# Dendritic precursor> plot_umap_label_by_genes)# Eosinophil/Basophil/Mast progenitor> plot_umap_label_by_genes)# Endothelial cells> plot_umap_label_by_genes)function A.# HSC/Ma.gene_list: A vector of one or more gene names to plot.The following parameter is required:The aim of cell type annotation is to assign a cell type identity to each cluster. The expression of selected marker genes can be visualized and explored across the different clusters, either using UMAP, dotplot, heatmap, or violin plots . Neverthlication .53.Load 59.Visualize selected canonical marker genes using bubble plot > plot_bubble_for_genes_per_clusterble plot B. One ora.cluster.type: The clustering method name used to identify and assign the cell clusters.b.gene_list: A vector of one or more gene names to plot.c.show.percent: If set to TRUE, the percentage of expressing cells for respective genes in each cluster are displayed on the dotplot. Default is FALSE.The following parameters are required:60.Visualize identified marker genes for each cluster using heatmap. One or more individual genes can be plotted using a heatmap with the ‘plot_heatmap_for_marker_genes’ function. Each gene is represented on each row of the output.> plot_heatmap_for_marker_genesa.cluster.type: The name of the clustering method used to identify and assign the cell clusters.b.n.TopGenes: The number of top genes for each cluster to plot. Default value is 5.The following parameters are required:61.Export top marker genes for each cluster. The top marker genes with statistical analysis results can be exported to the text file format.> export_marker_genes_to_tablea.cluster.type: The clustering method name used to identify and assign the cell clusters.b.n.TopGenes: The number of top genes for each cluster. Default value is 5.c.min.log2FC: The log2FC value, above which, genes will be included. Default value is 0.5.d.min.expFraction: The fraction of expressing cells, above which, genes will be included. Default value is 0.3.e.write.to.file: The file path to be exported.The following parameters are required:Timing: 2–3 h62.Load SingCellaR and required R packages. Here, the user can load the integrated R object saved from step 52.> library(SingCellaR)> library(AUCell)> library(ggplot2)> library(DAseq)> source('./utilis.R')63.Load the integrated R object generated from step 52.> load(file = "./Human_HSPC_All.SingCellaR.rdata")64.Build AUCell gene rankings. The user will have to create the ranked gene list using the function ‘AUCell_buildRankings’ implemented in AUCell package.> set.seed(2021)> exprMatrix <- get_umi_count(Human_HSPC)> human_HSPCs_cells_rankings <- AUCell_buildRankingsa.exprMat: The raw expression count matrix. This can be retrieved from the SingCellaR object using the ‘get_umi_count’ function.b.nCores: The number of cores to use for parallel processing. The maximum number of cores is dependent on the user’s device. Default value is 1.c.plotStats: If set to TRUE (default), the expression statistics will be summarized and plotted in the histogram and boxplots.Note: This step may be time-consuming. The user is advised to save the output of this step using the following code:> saveThe following parameters are required:65.Calculate AUCell scores. AUCell scores for each cell will be computed using the ranked genes from the previous step for the provided hematopoietic gene sets.> set.seed(2021)> human_HSPCs.AUCells.score <- Run_AUCellOptional: The user is advised to save the AUCell scores for further analysis.> save66.Visualize AUCell scores. The user can visualize AUCell scores for a given gene signature on specific clusters on the UMAP embedding. Here, we will use HSC/MPP gene signature on cluster 1 as an example  example A. We obsa.AUCell_gene_set_name: The name of the gene signature to plot. The signature name specified here must be the same as the gene signature name in the GMT file provided in step 65.b.AUCell_score: The R object created from computing AUCell scores in step 65.c.selected.limited.clusters: Cells in selected cluster IDs will be displayed with the AUCell scores.d.IsLimitedAUCscoreByClusters: If set to TRUE, the AUCell scores will only be displayed for selected clusters as specified using the ‘selected.limited.clusters’ argument. Default is FALSE.e.AUCell_cutoff: The AUCell score threshold, above which, the scores will be displayed. The higher the score threshold, the more stringent the threshold. Default is 0.Note: AUCell cutoff score is arbitrary. To explore the AUCell cutoff score for each gene signature, the user can plot the score distribution using ggplot2 and manually explore the suitable threshold.The following parameters are required:67.Differential abundance testing. We use DAseq ,    labels.2 = c,    path = "./",    outputname = "eFL_vs_FL.pdf")se DAseq  to perfose DAseq B as an ea.groupA and groupB: The group names for integrated samples  or an individual sample name.b.labels.1 and labels.2: The sample IDs of groupA and groupB, respectively.c.path: The folder path to save the output file.d.outputname: The output file name.The following parameters are required:The user can calculate the enrichment of specific gene sets  assigned for an individual cell. We incorporated AUCell score analysis  into SinTiming: 1–1.5 hFrom the annotation of cell types assigned in the cell type annotation steps, the user can further investigate the direction of cellular differentiation trajectories. The user can trace immature to more differentiated cell populations and understand the functional relationship between different cell populations in terms of cellular maturity. It is noteworthy that current trajectory analysis requires the user to identify the starting point (immature cell state), in this case, HSC/MPP. Hence, the cell annotations inferred from previous steps will be helpful to infer the primitive cell clusters. SingCellaR supports two approaches of trajectory analysis, namely force-directed graph (FDG)  and diff68.Load SingCellaR package.> library(SingCellaR)69.Load the integrated R object generated from step 52.> load(file = "./Human_HSPC_All.SingCellaR.rdata")70.Run force-directed graph analysis. The user can use the ‘runFA2_ForceDirectedGraph’ function to build the force-directed graph layout (embeddings). The layout can be annotated using various features, including cell lineage signature genes. Here, we use the Supervised harmony embeddings to generate force-directed graph layout.> runFA2_ForceDirectedGrapha.useIntegrativeEmbeddings: If set to TRUE, the data integration or batch correction embeddings will be used in conjunction with ‘integrative_method’ argument. Default is FALSE.b.integrative_method: The data integration or batch correction method name.c.knn.metric: The distance metric.d.n.dims.use: The number of PCs from ‘integrative_method’. If ‘useIntegrativeEmbedding’ is set to FALSE, the PCA analysis result is used. Default value is 30.e.n.neighbors: The number of neighboring cells.f.n.seed: The random number generator. Default value is 1.g.fa2_n_iter: The number of iterations for analyzing the ‘networkx’ graph. Default value is 1,000.The following parameters are required:71.> plot_forceDirectedGraph_label_by_clustersVisualize trajectories by Louvain clustering A.> plot_a.show_method: The clustering method name.The following parameter is required:72.> plot_forceDirectedGraph_label_by_multiple_gene_sets,  custom_color = c,  isNormalizedByHouseKeeping = F, edge.size=0, edge.color = "#FFFFFF", vertex.size = 0.2, showEdge = F, showLegend = T)Visualize trajectories by using multiple lineages gene sets B.> plot_a.gmt.file: Path to the file containing the gene signatures in GMT format.b.show_gene_sets: The vector of gene signature names to show on the plot. The names must be the same names as found in the ‘gmt.file’.c.custom_color: The assigned colors for gene signatures in ‘show_gene_set’.d.isNormalizedByHouseKeeping: When set to TRUE (default), the gene expression values of each gene signature specified will be normalized by the housekeeping genes. The housekeeping genes are defined as the top 100 genes with the highest total gene expression values across all cells.e.edge.size: The size of the edges connecting the nodes. Default value is 0.2.f.edge.color: The color of the edges. Default color is gray.g.vertex.size: The size of the nodes. Default value is 1.5.h.showEdge: When set to TRUE (default), the edges will be displayed.i.showLegend: When set to TRUE (default), the legend will be displayed.The following parameters are required:73.Load SingCellaR and destiny R packages.> library(SingCellaR)> library(destiny)74.Load the integrated R object generated from step 52.> load(file = "./Human_HSPC_All.SingCellaR.rdata")75.Run diffusion map analysis. The user can use the ‘runDiffusionMap’ function to generate the diffusion map layout (embeddings). The layout can be annotated using various features, including cell lineage signature genes. We will use the Supervised harmony embeddings to generate the diffusion map layout.> runDiffusionMapa.useIntegrativeEmbeddings: If set to TRUE, the data integration or batch correction embeddings will be used in conjunction with ‘integrative_method’ argument. Default is FALSE.b.integrative_method: The data integration or batch correction method name.c.n.dims.use: The number of PCs from ‘integrative_method’. If ‘useIntegrativeEmbedding’ is set to FALSE, the PCA result will be used. Default value is 30.d.n.seed: The random number generator. Default value is 1.The following parameters are required:76.> plot_diffusionmap_label_by_clustersVisualize trajectories by Louvain clustering C.> plot_a.show_method: The clustering method name.The following parameter is required:77.> plot_diffusionmap_label_by_multiple_gene_sets,  custom_color = c,  isNormalizedByHouseKeeping = F)Visualize trajectories by multiple lineages genes D.> plot_a.gmt.file: Path to the file containing the gene signatures in GMT format.b.show_gene_sets: The vector names of gene signatures to show in the plot. The names must be the same names as found in the gmt.file.c.custom_color: The assigned colors for gene signatures in ‘show_gene_set’.d.isNormalizedByHouseKeeping: When set to TRUE (default), the gene expression values of the individual genes of each gene signature specified will be normalized by the housekeeping genes. The housekeeping genes are defined as the top 100 genes with the highest total gene expression values across all cells.The following parameters are required:78.Load SingCellaR and required R packages.> library(SingCellaR)> library(monocle3)> library(ggplot2)> library(ComplexHeatmap)> library(circlize)> library(RColorBrewer)> source('./utilis.R')79.Load the integrated R object generated from step 52.> load(file = "./Human_HSPC_All.SingCellaR.rdata")80.Prepare input files for Monocle3. The required objects include the expression matrix of raw counts, cell cluster metadata, and gene metadata.# Expression matrix> cells.used <- Human_HSPC@sc.clusters$Cell> umi <- get_umi_count(Human_HSPC)> used.umi <- umi> expression_matrix <- used.umi> dim(expression_matrix) # check the dimension of object# Cell cluster metadata> cell_metadata <- Human_HSPC@sc.clusters> rownames(cell_metadata) <- cell_metadata$Cell# Gene metadata> gene_annotation <- as.data.frame(rownames(used.umi))> colnames(gene_annotation) <- "gene_short_name"> rownames(gene_annotation) <- gene_annotation$gene_short_name81.Create Monocle3 object.> cds <- new_cell_data_set82.Integrate Monocle3 and SingCellaR results. Monocle3 normalizes the raw gene counts, and then performs PCA. The user can run the default workflow as suggested by Monocle3 tutorial. In this step, we will replace Monocle3’s UMAP embeddings and add cluster information derived from the SingCellaR object.# Pre-process Monocle3 object> cds <- preprocess_cds> cds <- align_cds(cds)# Substitute Monocle3's embeddings with SingCellaR's embeddings> embeddings <- >Human_HSPC@SupervisedHarmony.embeddings> cds@int_colData@listData$reducedDims$Aligned <- embeddings# Nonlinear dimension reduction> cds <- reduce_dimension# Identify and assign clusters> cds <- cluster_cells# Substitute Monocle3's UMAP embeddings with SingCellaR's embedding> newcds<- cds # change monocle3 objects name> SingCellaR.umap <-,c]> Human_HSPC@umap.result> rownames(umap) <- umap$Cell> umap$Cell <- NULL> newcds@int_colData$reducedDims$UMAP <- umap# Substitute Monocle3's cluster identity with SingCellaR's cluster identity> anno.clusters <- Human_HSPC@sc.clusters$louvain_cluster> names(anno.clusters) <- Human_HSPC@sc.clusters$Cell> newcds@clusters$UMAP$clusters <- anno.clusters83.Generate trajectory graph and order cells by pseudotime. To learn the cell differentiation trajectories, the user will use the ‘learn_graph’ function provided by Monocle3. By default, Monocle3 uses a 'self-defined' node to perform the pseudotime analysis. Thus, the user will need to define the root node, i.e., the most immature cluster. To identify the root node, the user can use the ‘get_earliest_principal_node’ function. Based on the previous analyses, the user can select ‘cl1’, the HSC/MPP cluster, as the starting point of the trajectory.> newcds <- learn_graph(newcds)# Apply function to retrieve root node> root.nodes <- get_earliest_principal_node# Order cells by pseudotime relative to root node> newcds <- order_cells# Save R object> save84.Visualize trajectory paths on UMAP 85.Visualize pseudotime on UMAP 86.Visualize pseudotime on SingCellaR FDG ,]> fa2 <- Human_HSPC@fa2_graph.layout> fa2.used <- fa2# Extract the pseudotime information> new_data <- data.frame)> new_data$Cell <- rownames(new_data)> new_data <- new_data# Integrate pseudotime with FDG embeddings> fa2.used <- fa2.used> colnames(fa2.used) <- c> fa2.dat <- cbind# Plot FDG> ggplot) + geom_point) + scale_color_viridis_c+ theme_classic + xlab("FDG1") + ylab("FDG2")87.Visualize the expression of selected genes along the paths. We plot erythroid lineage genes as the example.a.# Retrieve UMAP coordinates and annotate with cluster information> sc.clusters <-Human_HSPC@sc.clusters> umap.results <- Human_HSPC@umap.result> umap.results <- merge### Add developmental stage information> umap.results$stage[umap.results$sampleID %in% c]<- "eFL"> umap.results$stage[umap.results$sampleID %in% c("1_ABM_1")]<- "ABM"> umap.results$stage[umap.results$sampleID %in% c]<- "FL"> umap.results$stage[umap.results$sampleID %in% c]<- "FBM"> umap.results$stage[umap.results$sampleID %in% c]<- "PBM"Add developmental stages information to the metadata.b.> Ery.path <- cDefine the path for the erythroid lineage based on the FDG, diffusion map, and Monocle3. We selected the path ‘cl1-cl7-cl12-cl3’ for the erythroid lineage.c.> umap.results.Ery <- umap.results> cells.eFL <- umap.results.Ery$Cell[umap.results.Ery$stage == "eFL"]> cells.FL <- umap.results.Ery$Cell[umap.results.Ery$stage == "FL"]> cells.FBM <- umap.results.Ery$Cell[umap.results.Ery$stage == "FBM"]> cells.PBM <- umap.results.Ery$Cell[umap.results.Ery$stage == "PBM"]> cells.ABM <- umap.results.Ery$Cell[umap.results.Ery$stage == "ABM"]Extract cells from the erythroid trajectory for all stages.d.> genes.E <- c> matrix <- newcds@assays@data$counts> pt.matrix<- matrix),order(pseudotime(newcds))]Extract genes known to be involved in the erythroid trajectory based on the pseudotime.e.> pt.matrix.eFL <- ExtractMatrix> pt.matrix.FL <- ExtractMatrix> pt.matrix.FBM <- ExtractMatrix> pt.matrix.PBM <- ExtractMatrix> pt.matrix.ABM <- ExtractMatrixExtract gene expression matrix for each group of cells.f.> ht1 <- plot_development_heatmap> ht2 <- plot_development_heatmap> ht3 <- plot_development_heatmap> ht4 <- plot_development_heatmap> ht5 <- plot_development_heatmap> ht.full <- ht1+ht2+ht3+ht4+ht5> ht.fullPlot gene expression heatmap along the path of the different developmental stages H.> ht1 <g.> Ery.eFL <- ExtractCells(selected.cells = cells.eFL)> Ery.FL <- ExtractCells(selected.cells = cells.FL)> Ery.FBM <- ExtractCells(selected.cells = cells.FBM)> Ery.PBM <- ExtractCells(selected.cells = cells.PBM)> Ery.ABM <- ExtractCells(selected.cells = cells.ABM)> matrix <- newcds@assays@data$counts> matrix.total <-Matrix::colSums(matrix)> norm.matrix <-(t(t(matrix)/matrix.total))∗10000> expr.eFL <- norm.matrix> expr.eFL <- reshape2::melt(as.matrix(expr.eFL))> colnames(expr.eFL) <- c> expr.eFL$Stage <- "eFL"> expr.FL <- norm.matrix> expr.FL <- reshape2::melt(as.matrix(expr.FL))> colnames(expr.FL) <- c> expr.FL$Stage <- "FL"> expr.FBM <- norm.matrix> expr.FBM <- reshape2::melt(as.matrix(expr.FBM))> colnames(expr.FBM) <- c> expr.FBM$Stage <- "FBM"> expr.PaedBM <- norm.matrix> expr.PaedBM <- reshape2::melt(as.matrix(expr.PaedBM))> colnames(expr.PaedBM) <- c> expr.PaedBM$Stage <- "PBM"> expr.AdultBM <- norm.matrix> expr.AdultBM <- reshape2::melt(as.matrix(expr.AdultBM))> colnames(expr.AdultBM) <- c> expr.AdultBM$Stage <- "ABM"> expr.Ery <- rbindExtract gene expression from downsampled cells along the path from different developmental stages and pseudotime from ‘newcds’ object from step 83.h.> pseudotime <- as.data.frame(pseudotime(newcds))> colnames(pseudotime) <- "pseudotime"> pseudotime$Cell <- rownames(pseudotime)> pseudotime$pseudotime[pseudotime$pseudotime %in% "Inf"] <- 0> pseudotime <- pseudotimeExtract the pseudotime information from Monocle3 results.i.> expr.Ery <- mergeMerge gene expression data with pseudotime analysis results.j.> plot_genes> plot_genesVisualize selected erythroid gene expression along the path I.> plot_The step-by-step protocols describe an analysis pipeline used in a recent publication . Here, wSingCellaR requires signature gene sets to perform the cell type annotation analysis. Thus, the user would have to compile and curate customized gene sets for the relevant system of interest. In this protocol, we provide 75 gene sets curated from previous studies relevant to hematopoiesis. SingCellaR still lacks 'automatic object transformation' to interact with other existing packages, such as Seurat. However, SingCellaR uses the SingleCellExperiment object, the standard object for storing single-cell experimental data in R. Therefore, the gene expression matrix and cell metadata can be extracted simply from the SingleCellExperiment object. This issue will be improved when SingCellaR is updated to the next version to support more interactions with other packages and ensure compatibility with relevant R packages incorporated in SingCellaR.The user may encounter the following error when executing the function ‘runFA2_ForceDirectedGraph’:Error in runFA2_ForceDirectedGraphThere are two potentially problems: the fa2 package is not installed; and the R environmental path for FA2 module in python is not found by R.FA2 installation.The fa2 package can be installed as suggested in the Note: The fa2 package is not compatible with python 3.9 or higher versions.Conda environment is recommended by using ‘conda_create’ function after loading the reticulate package.python version configuration.### Set the python version into R environment.use_python("/miniconda3/envs/r-reticulate/bin/python")Note: The user must change the python path as shown here to Conda-specific path found in the user’s computer.### Open ‘∼/.Renviron’ in the terminal and add the following code:RETICULATE_PATH="/miniconda3/envs/r-reticulate/bin/python"### Restart R session and then use below code to check:Sys.which("python")"/miniconda3/envs/r-reticulate/bin/python" should be shown on the console.The user can use the following code to configure the python path:https://rstudio.github.io/reticulate/articles/versions.html.The user can refer to Python version configuration tutorial in the reticulate R package found in this URL: The user may find this error when performing the runScanorama(Human_HSPC) function:“Error in runScanorama(Human_HSPC) : The scanorama python module is not installed!. Please install using pip ”The scanorama package can be installed as suggested in the SingCellaR installation section. The Python environment configuration can be found in Problem 1.UMAP/FDG plots may show different rotations from this protocol. This is caused by different software versions for generating plots and the seed number setting.This can be solved by setting a seed number (n.seed parameter) found in runUMAP and runFA2_ForceDirectedGraph functions.The user may encounter running time and memory issues when performing the AUCell_buildRankings function for a large-scale dataset.The user can use the alternative function named ‘Build_AUCell_Rankings_Fast’ to speed up running time and use less memory for ranking gene expression for each cell.The kBET score is used to benchmark the integration results from different integrative methods. The user may encounter slightly different kBET scores from this protocol. This is due to the different seed number settings and the number of subsampling cells for kBET analysis. More running time and memory will be used if the user sets the high number of the downsample size in kBET analysis.This issue can be solved by setting the seed number prior to running kBET using the ‘set.seed’ function. The user can subsample and fix the number of cells for the kBET analysis using the n.sample parameter described in the ‘runKBET’ function.supat.thongjuea@imm.ox.ac.uk).Further information and requests for resources and reagents should be directed to and will be fulfilled by the lead contact, Supat Thongjuea (This study did not generate new unique reagents.


Scientific Reportshttps://doi.org/10.1038/s41598-021-95102-7, published online 04 August 2021Correction to: The Code availability section in the original version of this Article was incomplete.“Codes will be uploaded soon to [Insert URL].”now reads:https://github.com/kyuchoi/graph_neural_network_suicide_prediction”“The codes are available at The original Article has been corrected.


Scientific Reports 10.1038/s41598-021-02943-3, published online 08 December 2021Correction to: The original version of this Article contained an error in the link in the Code Availability section where,https://github.com/sblabbioinformatics/BG4_CUT_and_Tag_sc.”“Scripts and general codes for G4-CUT&Tag data analysis are available at now reads:https://github.com/sblab-bioinformatics/BG4_CUT_and_Tag_sc.”“Scripts and general codes for G4-CUT&Tag data analysis are available at The original Article has been corrected.


This article describes a method for creating applications for cluster computing systems using the parallel BSF-skeleton based on the original BSF (Bulk Synchronous Farm) model of parallel computations developed by the author earlier. This model uses the master/slave paradigm. The main advantage of the BSF model is that it allows to estimate the scalability of a parallel algorithm before its implementation. Another important feature of the BSF model is the representation of problem data in the form of lists that greatly simplifies the logic of building applications. The BSF-skeleton is designed for creating parallel programs in C++ using the MPI library. The scope of the BSF-skeleton is iterative numerical algorithms of high computational complexity. The BSF-skeleton has the following distinctive features.• The BSF-skeleton completely encapsulates all aspects that are associated with parallelizing a program.• The BSF-skeleton allows error-free compilation at all stages of application development.• The BSF-skeleton supports OpenMP programming model and workflows.  Specifications Tablefarm skeleton based on the master/slave paradigm. The farm skeleton and the master/slave paradigm are discussed in a large number of papers  model of parallel computations Map and Reducef to each element of list i denotes the iteration number; i-th approximation ; A is the list of elements of a certain set x is the current approximation) that maps the set B is a list of elements of the set A; A parallel skeleton is a programming construct, which abstracts a pattern of parallel computation and interaction i. Step 3 calculates the list B by applying the higher-order function Compute that calculates the next approximation s of the higher-order function Reduce. Step 6 increases the iteration counter i by one. Step 7 checks a termination criteria by invocating the Boolean user function StopCond, which takes two parameters: the new approximation StopCond returns true, the algorithm outputs Step 1 reads input data of the problem and an initial approximation. Step 2 assigns the zero value to the iteration counter A into K sublists of equal length . In the steps 3 and 4, the master process is idle. In Step 5, all worker processes send the partial foldings Reduce over the list of partial foldings Compute that calculates the next approximation; checks the termination criteria by using the Boolean user function StopCond and assigns its result to the Boolean variable exit. In the steps 6-9, the worker processes are idle. In Step 10, the master process sends the exit value to all worker processes. If the exit value is false, the master process and worker processes go to the next iteration, otherwise the master processes outputs the result and the computation stops. Note that, in the Steps 2 and 10, all processes perform the implicit global synchronization.The result is the parallel BSF” prefix contain problem-independent code and are not subject to changes by the user; files with the “Problem” prefix are intended for filling in problem-dependent parts of the program by the user. Descriptions of all source code files are given in The BSF-skeleton is a compilable but not executable set of files. This set is divided into two groups: files with the “include is shown in The dependency graph of the source code files by the directive #Problem-bsfParameters.h. They are used in the BSF-Code.cpp and should be set by the user. All these parameters are presented in The BSF-skeleton parameters are declared as macroses in the file Problem-bsfTypes.h. They are used in the BSF-Code.cpp and should be set by the user. All these types are presented in The predefined problem-depended BSF types are declared as data structures in the file reduceCounter. This extended reduce-list is presented by the pointer BD_extendedReduceList declared in the BSF-Data.h. When performing the Reduce function (see BC_ProcessExtendedReduceList in Section “Key problem-independent functions (prefix BC_)”), the elements that have this field equal to zero are ignored. For elements where reduceCounter is not zero, the values of the reduceCounter are added together. By default, the function BC_WorkerMap (see Section “Key problem-independent functions (prefix BC_)”) sets the reduceCounter to 1. The user can set the value of this field to 0 by setting the parameter *success of the function PC_bsf_MapF to 0.The BSF-skeleton appends to each element of the reduce-list the additional integer field called BSF-SkeletonVariables.h. The user can exploit these variables for the sake of debugging, tracing, and non-standard implementing . The user should not change the values of these variables. All skeleton variables are presented in The skeleton variables are declared in the file The skeleton functions are divided into two groups:BC_ that have implemented in the file BSF-Code.cpp; problem-dependent functions (predefined BSF functions) with the prefix PC_bsf_ that have declared in the file Problem-Code.cpp.1) problem-independent functions with the prefix BC_. The user also cannot change function headers with the prefix PC_bsf_ but must write an implementation of these functions. The body of a predefined BSF function cannot include calls of problem-independent functions with the prefix BC_. The hierarchy of the key function calls is presented in The user cannot change the headers and bodies of the functions with the prefix BSF-Code.cpp. Descriptions of some key problem-independent functions are presented in The implementations of all problem-independent functions can be found in the file PC_bsf_ declared in Problem-bsfCode.cpp. The user must implement all these functions. An instruction is presented in Section “Step-by-step instruction”. An example is presented in Section “Example of using the BSF-skeleton”.This section contains detailed descriptions of the predefined problem-dependent BSF functions with the prefix PC_bsf_CopyParameterPT_bsf_parameter_T (see Section “Error! Reference source not found.”).Copies all order parameters from the in-structure to the out-structure. The order parameters are declared in the predefined problem-depended BSF type Syntaxvoid PC_bsf_CopyParameter;In parameters parameterInThe structure from which parameters are copied.Out parameters parameterOutPThe pointer to the structure to which parameters are copied.PC_bsf_InitProblem-Data.h.Initializes the problem-depended variables and data structures defined in Syntaxvoid PC_bsf_Init(bool* success);Out parameters*successfalse if the initialization failed. The default value is true.Must be set to PC_bsf_IterOutputOutputs intermediate results of the current iteration.Syntaxvoid PC_bsf_IterOutput;void PC_bsf_IterOutput_1;PC_bsf_IterOutput_2;void PC_bsf_IterOutput_3;In parameters reduceResultReduce function. reduceCounterPointer to the structure that contains the result of executing the reduceCounter (see Section “Extended reduce-list”).The number of summed .The functions PC_bsf_JobDispatcherThis function is used to organize the workflow (see Section “Workflow support”) and is executed by the master process before starting each iteration. It implements a state machine that switches from one state to another. If you do not need the workflow support, then you should use the empty implementation of this function.Syntaxvoid PC_bsf_JobDispatcher;In|out parameters parameterPC_bsf_ProcessResults_1, PC_bsf_ProcessResults_2 and PC_bsf_ProcessResults_3.The pointer to the structure containing the parameters of the next iteration. This structure may be also modified by the functions Out parameters*jobThis variable must be assigned the number of the next action (job).*exittrue. The default value is false.If the stop condition holds, then this variable must be assigned RemarksBSF_sv_parameter is not allowed in the implementation of this function.Important: The use of the structure PC_bsf_JobDispatcher is invocated after the invocation of function PC_bsf_ProcessResults_1, PC_bsf_ProcessResults_2 or PC_bsf_ProcessResults_3.The function PC_bsf_MapFMap. To implement the PC_bsf_MapF function, we can use the problem-dependent variables and data structures defined in the file Problem-Data.h, and the structure BSF_sv_parameter of the type PT_bsf_parameter_T defined in Problem-bsfTypes.h.Implements the function that is applied to the map-list elements when performing the higher-order function Syntaxvoid PC_bsf_MapF;void PC_bsf_MapF_1;void PC_bsf_MapF_2;void PC_bsf_MapF_3;In parameters mapElemThe pointer to the structure that is the current element of the map-list.Out parameters reduceElemThe pointer to the structure that is the corresponding reduce-list element to be calculated.*successfalse if the corresponding reduce-list element must be ignored when the Reduce function will be executed. The default value is true.Must be set to RemarksPC_bsf_MapF_1, PC_bsf_MapF_2 and PC_bsf_MapF_3 are used to organize a workflow .The functions PC_bsf_ParametersOutputOutputs parameters of the problem before starting the iterative process.Syntaxvoid PC_bsf_ParametersOutput(PT_bsf_parameter_T parameter);In parameters parameterThe structure containing the parameters of the problem.PC_bsf_ProblemOutputOutputs the results of solving the problem.Syntaxvoid PC_bsf_ProblemOutput;void PC_bsf_ProblemOutput_1;void PC_bsf_ProblemOutput_2;void PC_bsf_ProblemOutput_3;In parameters reduceResultReduce. parameterThe pointer to the structure that is the result of executing the higher-order function The structure containing the parameters of the final iteration.RemarksThe functions PC_bsf_ProblemOutput_1, PC_bsf_ProblemOutput_2 and PC_bsf_ProblemOutput_3 are used to organize a workflow .PC_bsf_ProcessResultsProcesses the results of the current iteration: computes the order parameters for the next iteration and checks the stop condition.Syntaxvoid PC_bsf_ProcessResults;void PC_bsf_ProcessResults_1;void PC_bsf_ProcessResults_2;void PC_bsf_ProcessResults_3;In parameters reduceResultReduce. reduceCounterThe pointer to the structure that is the result of executing the higher-order function reduceCounter (see Section “Extended reduce-list”).The number of summed , then this variable must be assigned the number of the next action (job). Otherwise, this parameter is not used.*exittrue. The default value is false.If the stop condition holds, then this variable must be assigned RemarksBSF_sv_parameter is not allowed in the implementations of these functions.Important: The use of the structure PC_bsf_ProcessResults_1, PC_bsf_ProcessResults_2 and PC_bsf_ProcessResults_3 are used to organize a workflow .The functions PC_bsf_ReduceFImplements the operation Syntaxvoid PC_bsf_ReduceF;void PC_bsf_ReduceF_1;void PC_bsf_ReduceF_2;void PC_bsf_ReduceF_3;In parameters xThe pointer to the structure that presents the first term. yThe pointer to the structure that presents the second term.Out parameters zThe pointer to the structure that presents the result of the operation.RemarksPC_bsf_ReduceF_1, PC_bsf_ReduceF_2 and PC_bsf_ReduceF_3 are used to organize a workflow .The functions PC_bsf_SetInitParameterPT_bsf_parameter_T (see Section “Error! Reference source not found.”).Sets initial order parameters for the workers in the first iteration. These order parameters are declared in the predefined problem-depended BSF type Syntaxvoid PC_bsf_SetInitParameter(PT_bsf_parameter_T* parameter);Out parameters parameterThe pointer to the structure that the initial parameters should be assigned to.PC_bsf_SetListSizeSets the length of the list.Syntaxvoid PC_bsf_SetListSize(int* listSize);Out parameters*listSizeMust be assigned a positive integer that specifies the length of the list.RemarksThe list size should be greater than or equal to the number of workers.PC_bsf_SetMapListElemi.Initializes the map-list element with the number Syntaxvoid PC_bsf_SetMapListElem;In parameterselemThe pointer to the map-list element.iThe ordinal number of the specified element.RemarksImportant: The numbering of elements in the list begins from zero.PC_bsfAssignAddressOffsetBSF_sv_addressOffset (see Section “Skeleton variables”).Assigns the number of the first element of the map-sublist to the skeleton variables Syntax void PC_bsfAssignAddressOffset;In parameters valueNon-negative integer value.RemarksImportant: The user should not use this function.PC_bsfAssignIterCounterBSF_sv_iterCounter (see Section “Skeleton variables”).Assigns the number of the first element of the map-sublist to the skeleton variables Syntax void PC_bsfAssignIterCounter;In parameters valueNon-negative integer value.RemarksImportant: The user should not use this function.PC_bsfAssignJobCaseBSF_sv_jobCase (see Section “Skeleton variables”).Assigns the number of the current activity (job) in workflow to the skeleton variables Syntax void PC_bsfAssignJobCase;In parameters valueNon-negative integer value.RemarksImportant: The user should not use this function.PC_bsfAssignMpiMasterBSF_sv_mpiMaster (see Section “Skeleton variables”).Assigns the rank of the master MPI process to the skeleton variables Syntax void PC_bsfAssignMpiMaster;In parameters valueNon-negative integer value.RemarksImportant: The user should not use this function.PC_bsfAssignMpiRankBSF_sv_mpiRank (see Section “Skeleton variables”).Assigns the rank of current MPI process to the skeleton variables Syntax void PC_bsfAssignMpiRank;In parameters valueNon-negative integer value.RemarksImportant: The user should not use this function.PC_bsfAssignNumberInSublistBSF_sv_numberInSublist (see Section “Skeleton variables”).Assigns the number of the current element in the map-sublist to the skeleton variables Syntax void PC_bsfAssignNumberInSublist;In parameters valueNon-negative integer value.RemarksImportant: The user should not use this function.PC_bsfAssignNumOfWorkersBSF_sv_numOfWorkers (see Section “Skeleton variables”).Assigns the total number of the worker processes to the skeleton variables Syntax void PC_bsfAssignNumOfWorkers;In parameters valueNon-negative integer value.RemarksImportant: The user should not use this function.PC_bsfAssignParameterBSF_sv_parameter (see Section “Skeleton variables”).Assigns the order parameters to the structure Syntax void PC_bsfAssignParameter(PT_bsf_parameter_T parameter);In parameters parameterThe structure from which the order parameters are taken.RemarksImportant: The user should not use this function.PC_bsfAssignSublistLengthBSF_sv_sublistLength (see Section “Skeleton variables”).Assigns the length of the current map-sublist to the skeleton variables Syntax void PC_bsfAssignSublistLength;In parameters valueNon-negative integer value.RemarksImportant: The user should not use this function.Step-by-step instructionThis section contains step-by-step instructions on how to use the BSF-skeleton to quickly create a parallel program. Starting from Step 2, we strongly recommend compiling the program after adding each language construction.Step 1. First of all, we must represent our algorithm in the form of operations on lists using the higher-order functions Map and Reduce . For example: typedef PT_point_T[PP_N]; // Point in n-Dimensional SpaceStep 4. In the file Problem-bsfTypes.h, implement the predefined BSF types. If we do not use a workflow then we do not have to implement the types PT_bsf_reduceElem_T_1, PT_bsf_reduceElem_T_2, PT_bsf_reduceElem_T_3, but we can't delete these empty structures. For example:struct PT_bsf_parameter_T {PT_point_T approximation; // Current approximation};struct PT_bsf_mapElem_T {int columnNo; // Column number in matrix Alpha};struct PT_bsf_reduceElem_T {double column[PP_N]; // Column of intermediate matrix};struct PT_bsf_reduceElem_T_1 {};struct PT_bsf_reduceElem_T_2 {};struct PT_bsf_reduceElem_T_3 {};Step 5. In the file Problem-Data.h, define the problem-dependent variables and data structures. For example: static double PD_A[PP_N][PP_N]; // Coefficients of equationsStep 6. In the file Problem-bsfCode.cpp, implement the predefined problem-dependent BSF functions (see Section “Predefined problem-dependent BSF functions (prefix PC_bsf_)”) in the suggested order. To implement these functions, the user can write additional problem (user) functions in the Problem-bsfCode.cpp. The prototypes of these problem functions must be included in the Problem-Forwards.h.Step 7. In the file Problem-bsfCode.cpp, we can configure the BSF-skeleton parameters (see Section “BSF-skeleton parameters”).Build and run the solution in the MPI environment.Jacobi methodIn this section, we show how to use the BSF-skeleton to implement the iterative Jacobi method as an example. The It is assumed that Let us define the vector Step 1. Step 2. Step 3. If Step 4. Step 5. Stop.diagonal dominance of the matrix In the Jacobi method, an arbitrary vector j-th column of matrix Let us represent the Jacobi method in the form of algorithm on lists. Let n. For any vector j-th column of the matrix C by the j-th coordinate of the vector x. The BSF-implementation of the Jacobi method presented as C entered in line 1 is implicitly used to calculate the values of the function Let https://github.com/leonid-sokolinsky/BSF-Jacobi. Additional examples of using the BSF-skeleton can be found on GitHub at the following links:•https://github.com/leonid-sokolinsky/BSF-LPP-Generator;•https://github.com/leonid-sokolinsky/BSF-LPP-Validator;•https://github.com/leonid-sokolinsky/BSF-gravity;•https://github.com/leonid-sokolinsky/BSF-Cimmino;•https://github.com/leonid-sokolinsky/NSLP-Quest.The source code of the BSF-Jacobi algorithm, implemented by using the BSF-skeleton, is freely available on Github at Problem-bsfTypes.h. All jobs have the same type of map list elements. To organize the workflow, we need to follow these steps:The BSF-skeleton supports workflows. A workflow consists of orchestrated and repeatable activities (jobs). The BSF-skeleton supports up to four different jobs. The starting job is always numbered 0 (omitted in the source codes). The other jobs have sequential numbers 1, ..., 3. Each job has its own type of reduce-list elements defined in the file Problem-bsfParameters.h, redefine the macros PP_BSF_MAX_JOB_CASE specifying the largest number of a job. For example, if the total job quantity is 3, the number to be assigned to PP_BSF_MAX_JOB_CASE must be 2.In the file Problem-bsfTypes.h, define the types of reduce-list elements for all jobs whose sequential numbers are less than or equal to PP_BSF_MAX_JOB_CASE.In the file Problem-bsfCode.cpp, implement the functions PC_bsf_MapF[_*], PC_bsf_ReduceF[_*], PC_bsf_ProcessResults[_*], PC_bsf_ProblemOutput[_*] and PC_bsf_IterOutput[_*] for all jobs whose sequential numbers are less than or equal to PP_BSF_MAX_JOB_CASE. The functions PC_bsf_ProblemOutput[_*] should assign the parameter *nextJob a sequential number of the next job (possibly the same).In the file PC_bsd_JobDispatcher to manage these states. An example of a solution using the BSF-skeleton with the workflow support is freely available on Github at https://github.com/leonid-sokolinsky/Apex-methodIf the number of workflow states is greater than the number of jobs, you can use the function BC_WorkerMap) using the #pragma omp parallel for. This support is disabled by default. To enable this support, we must define the macros PP_SF_OMP in the file Problem-bsfParameters.h. Using the macros PP_BSF_NUM_THREADS, we can specify the number of threads to use in the parallel for. By default, all available threads are used.The BSF-skeleton supports a parallelization of the map-list processing cycle in the worker processes .Some numerical algorithms can be implemented naturally using the function https://github.com/leonid-sokolinsky/BSF-skeleton.Supplementary material: The source code of the BSF-skeleton is freely available on Github at The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.


Present-day and ancient population genomic studies from different study organisms have rapidly become accessible to diverse research groups worldwide. Unfortunately, as datasets and analyses become more complex, researchers with less computational experience often miss their chance to analyze their own data. We introduce FrAnTK, a user-friendly toolkit for computation and visualization of allele frequency-based statistics in ancient and present-day genome variation datasets. We provide fast, memory-efficient tools that allow the user to go from sequencing data to complex exploratory analyses and visual representations with minimal data manipulation. Its simple usage and low computational requirements make FrAnTK ideal for users that are less familiar with computer programming carrying out large-scale population studies. Our wrapper scripts make it possible to run this kind of analysis with a single command and support average pairwise distances, 3f, 4f, “basic” D and enhanced D-statistics. In addition, we include wrapper scripts for computing admixture/contamination-corrected 4f-statistics over a range of admixture/contamination proportions and minor allele count-stratified D-statistics over a specified range of minor allele counts.To supplement the scripts for computing single statistics, we provide multi-threaded wrappers for automated computation of multiple related statistics . A commoe.g., The wrapper scripts also provide automated plotting functionality, which allows users to create visual representations of classical exploratory analyses e.g., . For evepostmortem damage-related error , R and perl and depend only on standard tools and libraries that are commonly present in Unix-like setups in the field of population genomics: plink  R librarf- and other site-statistics are available, e.g., popstats , which we distributed over 20 threads (Intel Xeon Gold 2.10 GHz CPU). Using the qpDstat (v712) program from admixtools, the task was completed in 5.1 h, with a peak memory usage of ∼520 GB (∼26 GB per thread). Using the automated D-statistic wrapper in FrAnTK (autoDwfixed.R), the task was completed in 2.2 h, with a peak memory usage of ∼5.8 GB (∼287 MB per thread). We attribute these gains to two key features: (1) precomputing the allele frequencies to speed up subsequent computation and (2) processing one site at a time instead of loading the whole dataset onto memory. In this example, the admixtools-based approach would require the user to prepare a set of input files and distribute the parallel processes across different threads. Once all processes have run, the user would have to parse separate results and use a custom script for visualizing the results. By contrast, by using FrAnTK, the user can go from the initial data to a visual representation of the results by running two one-line commands.To assess the performance of our toolkit, we computed a number of statistics on a whole-genome reference dataset using FrAnTK and admixtools . We use the HGDP SNP array dataset  to compute the 51 possible 3f-statistics of the form 3f, where X represents all the populations in the HGDP SNP array dataset. This run was completed in ∼20 s.Using the merged data, we can explore the broad genetic affinities of the low-depth Mal'ta genome. We use the frantk autof3wfixed \ freqpref=HGDP_hg19_genotypes_f_WithBam h1 = MalTa \target=Yoruba catfile=HGDP_hg19_genotypes_cat \legfile=HGDP_hg19_genotypes_leg nthr = 40autof3wfixed.R will output the plot shown in HGDP_hg19_genotypes_cat and HGDP_hg19_genotypes_leg files, which we supply through the catfile and legfile options. These results replicate the finding in (autoDwfixed.R wrapper (with 40 threads) to compute all possible D-statistics of the form D, where X represents all the populations in the HGDP dataset, including the Mal'ta individual. This run was completed in ∼20 s.frantk autoDwfixed \ freqpref=HGDP_hg19_genotypes_f_WithBam \ h1=Karitiana \h2=Han h4=Yoruba \ catfile=HGDP_hg19_genotypes_cat \legfile=HGDP_hg19_genotypes_leg nthr=40autoDwfixed.R will output the plot shown in D deviated significantly from D = 0 (Z∼14.9). This pattern is most likely due to shared ancestry between the Mal'ta individual and present-day French . This procedure was completed in ∼30 s.We can use the t format . First, echo "SanMbutiPygmyYorubaMandenkaPapuanMelanesianHanDaiFrenchItalianSardinianOrcadianMalTaKaritianaSurui" > poi frantk Freqs2Treemix \ freqpref=HGDP_hg19_genotypes_f_WithBam \tmpref=hgdp_malta_tm popsofint=poiFinally, we run treemix following the parameters in #Compute the number of SNPs that should be included in each autosomal 5 Mb-block.a=`zcat hgdp_malta_tm_ALL_tm.gz | wc -l`nsnps=`echo "5000000/(2881033286/"$a")” | bc` #Run treemix with 0 and 1 migrationstreemix -i hgdp_malta_tm_ALL_tm.gz -o tm_ALL_res_0mig -k "$nsnps" -noss \-global -root San -m 0 -seed012345treemix -i hgdp_malta_tm_ALL_tm.gz -o tm_ALL_res_1mig -k "$nsnps" -noss \-global -root San -m 1 -seed112345Treemix admixture graphs in FrAnTK is a toolkit that streamlines a set of common analyses that rely on allele frequency-based statistics, and makes them accessible to users that are less familiar with computer programming. We reduce memory and computing times by precomputing allele frequencies, thus allowing researchers to explore their own datasets with reduced computational resource requirements. Notably, the automated wrappers and plotting functionality in FrAnTK allow the user to carry out complex exploratory analyses and produce publication-ready visual representations with single-line commands and minimal data manipulation. Thus, we consider an appropriate protocol would comprise an initial exploration using the tools in FrAnTK, followed by the application of model-based strategies such as those implemented in qpWave and qpGraph (FrAnTK and its documentation are freely available in github.com/morenomayar/FrAnTK.G3 online.jkab357_Supplementary_DataClick here for additional data file.


Emerging evidence suggested that circular RNAs (circRNAs) play critical roles in cervical cancer (CC) progression. However, the roles and molecular mechanisms of hsa_circ_0007364 in the tumorigenesis of CC remain unclear. In the present study, we used bioinformatics analysis and a series of experimental analysis to characterize a novel circRNA, hsa_circ_0007364 was up-regulated and associated with advanced clinical features in CC patients. Hsa_circ_0007364 inhibition notably suppressed the proliferation and invasion abilities of CC cells in vitro and reduced tumor growth in vivo. Moreover, hsa_circ_0007364 was uncovered to sponge miR-101-5p. Additionally, methionine adenosyltransferase II alpha (MAT2A) was verified as a target gene of miR-101-5p, and its downregulation reversed the inhibitory effects of hsa_circ_0007364 knockdown on CC progression. Therefore, we suggested that hsa_circ_0007364 might serve as an oncogenic circRNA in CC progression by regulating the miR-101-5p/MAT2A axis, which provides a potential therapeutic target to the treatment.Research highlightshsa_circ_0007364 was upregulated in CChsa_circ_0007364 promoted CC cell progressionhsa_circ_0007364/miR-101-5p/MAT2A axis in CC  In 2012 there were an estimated 530,000 CC cases and about 275,000 CC deaths . Thus, nin vitro. Hu et al. , h, hP < 0.circRNAs ), and hscircRNAs ).Figure Assessment of hsa_circ_0007364 expression in CC revealed that hsa_circ_0007364 is remarkably upregulated in GSE102686 and GSE113696 datasets ,b). And 3.2.in vitro . CCK-8 in vitro ,g). More(in vivo ). Togeth3.3.Previous studies have shown that circRNAs can ‘sponge’ miRNAs in CC cells . To esta3.4.To elucidate the mechanism of miR-101-5p activity in CC cells, we predicted its targets using TargetScan, Starbase, miRTarBase and mircode and identified MAT2A as a possible target for miR-101-5p –c). Dualin vitro . Similain vitro ,f). Take3.5.Next, we examined whether hsa_circ_0007364 functions as a molecular sponge against miR-101-5p to regulate MAT2A expression. RT-qPCR analysis revealed that hsa_circ_0007364 deficiency resulted in reduced MAT2A expression, while miR-101-5p suppression reversed this effect ,b). Resc4.Cervical cancer (CC) is one of the commonest malignancies globally . MountinMultiple studies show that circRNAs participate in tumorigenesis by sponging miRNAs ,29. PredMiRNAs modulate various cellular processes via their molecular targets . A searc5.In summary, we found that hsa_circ_0007364 is overexpressed in CC, and may enhance the proliferative and invasion capacity of CC cells by interacting with the miR-101-5p/MAT2A axis. Our findings highlight this axis as a potential therapeutic target against CC.