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

Overview

This workflow briefly outlines the main steps in using Celmod to create and apply a model for estimating cell type proportions from bulk data

1) Examine format of pre-loaded bulk data and proportion files

bdat_initial[1:5,1:5]
classprops_initial[,1:5]

2) Train Celmod with initial files

model1=train_model(bdat_initial,classprops_initial,numgenevec=3:10,crossval_times=5,seedval=1,method_type ="pearson",quantileval=0.9)

3) Run Celmod-trained model on an expression matrix - here, re-input the original training matrix as an example.

Note that for an actual run, the training, test, and holdout sets would be non-overlapping as far as possible

out1=predict_estimates(model1,bdat_initial)

4) Examine output of predicted proportion files, with sixth parameter value:

out1$proportions[[6]][,1:5]

5) As an example, plot predicted and actual proportions of cell type 1 with sixth parameter value:

plot(classprops_initial[1,],out1$proportions[[6]][1,],pch=19,xlab="Actual proportion",ylab="Predicted proportion")


MenonLab/Celmod documentation built on April 24, 2022, 4:56 p.m.