Last active
March 25, 2024 10:51
-
-
Save vjcitn/1a037ddf740aef2c6a7f02d104aa53e0 to your computer and use it in GitHub Desktop.
use 'instrumented' do_SingleR(i)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("inst.R", echo=TRUE) | |
library(Rcollectl) | |
library(AnVILBestPractices) | |
library(SingleR) | |
library(BiocParallel) | |
clid = cl_start() | |
Rcollectl::cl_timestamp(clid, "pre-data") | |
p3k = TENxPBMCData::TENxPBMCData("pbmc3k") | |
Rcollectl::cl_timestamp(clid, "3k loaded") | |
rownames(p3k) = make.names(rowData(p3k)$Symbol, unique=TRUE) | |
pred3k = do_SingleRi(p3k, clprocid=clid, BPPARAM=MulticoreParam(12)) | |
table(pred3k$preds$pruned.labels) | |
head(pred3k$preds) | |
cl_stop(clid) | |
Sys.sleep(2) | |
path = Rcollectl::cl_result_path(clid) | |
Rcollectl::plot_usage(Rcollectl::cl_parse(path)) + | |
Rcollectl::cl_timestamp_layer(path) + | |
Rcollectl::cl_timestamp_label(path) + | |
ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust=1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment