replacePrediction: Replace compartment predictions to neighborhood predictions

Description Usage Arguments Value Examples

View source: R/replacePrediction.R

Description

Compartment level classifications are replaced with neighborhood level assignment. It is a helper function.

Usage

1
replacePrediction(df, column = c("svm.pred.all", "Observation", "svm.pred"))

Arguments

df

data.frame; all predictions at the compartment level and probablity vectors for each protein

column

character; selected column in the data frame, df

Value

replaced.df

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{

#define mock data frame
df <- data.frame(svm.pred.all = c("S1","S2","S3","S4",
"N1","N2","N3","N4",
"C1","C2","C3","C4","C5",
"M1","M2"))

df$svm.pred.all <- as.character(df$svm.pred.all)
df$Prob <- "1"

df <- replacePrediction(df, column = "svm.pred.all")
}

TanerArslan/SubCellBarCode documentation built on June 7, 2021, 9 a.m.