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

loading bulk cancer cell line encyclopedia data

ccle_raw_counts.dgeObj <- readRDS(system.file("extdata", "ccle_raw_counts.Rds", package = "RGlycopacity", mustWork = T))
ccle_log_counts.mat <- edgeR::cpm.DGEList(ccle_raw_counts.dgeObj)+1

computing relative difference for each clusters pseudobulks

rel_diff.mat <- normaliseOnSEGs(ccle_log_counts.mat)

computing ranges on relative difference

rel_diff_ranges.mat <- getNormalisedRanges(rel_diff.mat)

computing clrs on relative difference

clrs.mat <- transformToCLR(rel_diff.mat)

computing intersect of bulk on bulk

bulk_on_bulk_intersect.mat <- calculateNormalisedIntersects(rel_diff.mat, dynamic_ranges.char = 'bulk_ranges')

computing intersect of bulk on single cell

bulk_on_sc_intersect.mat <- calculateNormalisedIntersects(rel_diff.mat, dynamic_ranges.char = 'tabula_sapiens_ranges')

loading 2700 pbmc cells from chromium 10x V2

pbmck3k.seurat <- readRDS(system.file("extdata", "pbmc3k.Rds", package = "RGlycopacity", mustWork = T))

computing cluster specific values from raw single cell counts

trimmed mean pseudobulks

cluster sizes

pseudopresences

result.list <- calculatePseudobulks(pbmck3k.seurat)

computing minimal expression cutoff for each clusters pseudobulks

expression.mat <- predictMinimalExpression(result.list)

computing stability cutoff for each clusters pseudopresence

pseudopresence.list <- predictPseudopresenceStability(result.list)

computing relative difference for each clusters pseudobulks

rel_diff.mat <- normaliseOnSEGs(result.list$pseudobulks.sm)

computing ranges on relative difference

rel_diff_ranges.mat <- getNormalisedRanges(rel_diff.mat)

computing clrs on relative difference

clrs.mat <- transformToCLR(rel_diff.mat)

computing intersect of single cell on bulk

sc_on_bulk_intersect.mat <- calculateNormalisedIntersects(rel_diff.mat, dynamic_ranges.char = 'bulk_ranges')

computing intersect of single cell on single cell

sc_on_sc_intersect.mat <- calculateNormalisedIntersects(rel_diff.mat, dynamic_ranges.char = 'tabula_sapiens_ranges')


CopenhagenCenterForGlycomics/RGlycopacity documentation built on Oct. 31, 2024, 3:53 a.m.