knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Install the package first:

library(RASC)

Loading Dataset

This is a short tutorial that show how RASC work.First,we need to download the dataset that I got from Dick's Lab which contain the scRNA data for a mylofibrosis patient:

laod(file = "data/Patient_data.Rdata")

We can also display the patient data by: Patient_data

Next we need to convert the dataframe into an SingleCellExperiment Object by calling load_expression

expr <-load_expression(Patient_data)

After we have loaded the SingleCellExperiment Cell,we then need to load the file that contain pathway information in gmt format.

eg:if you use hall_mark.gmt

load_AUCell_genesets(hall_mark.gmt)

Calculate the rank of Pathway Enrichment in the SingleCellExperiment

Then we have all data set up, the next step is to rank the single cell experiment object with the pathway gene set by calling AUCell_Batch:

pathway_scores = AUCell_batch(counts(expr), genesets = c(hallmarks), num_batches=20)

Then we could visualize the result for given cells and pathways by calling PlotPathwayScores:

PlotPathwayScores(pathway_scores,1,10,pathway_names)


MengyiShu/RASC documentation built on Dec. 17, 2021, 3:23 a.m.