plotBarcode: Visualize the SubCellBarCode

Description Usage Arguments Value Examples

View source: R/plotBarcode.R

Description

Stacked bar plot are plotted for compartment and neighborhood level with respect to classification probabilities.

Usage

1
plotBarcode(sampleClassification, protein, s1PSM)

Arguments

sampleClassification

data.frame; merged classification, combination of compartment and neighborhood classification.

protein

character; protein gene symbol name

s1PSM

data.frame; minimum PSM count table. Row names should be gene centric protein id.

Value

proteinPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{

df <- loadData(SubCellBarCode::hcc827Ctrl)

c.prots <- calculateCoveredProtein(rownames(df), markerProteins[,1])

r.markers <- markerQualityControl(c.prots, df)

cls <- svmClassification(r.markers, df, markerProteins)

test.A <- cls[[1]]$svm.test.prob.out
test.B <- cls[[2]]$svm.test.prob.out

t.c.df <- computeThresholdCompartment(test.A, test.B)

t.n.df <- computeThresholdNeighborhood(test.A, test.B)

all.A <- cls[[1]]$all.prot.pred
all.B <- cls[[2]]$all.prot.pred

c.cls.df <- applyThresholdCompartment(all.A, all.B, t.c.df)

n.cls.df <- applyThresholdNeighborhood(all.A, all.B, t.n.df)

cls.df <- mergeCls(c.cls.df, n.cls.df)

proteinPlot <- plotBarcode(cls.df, "TP53", hcc827CtrlPSMCount)
}

TanerArslan/SubCellBarCode-R-Package documentation built on May 14, 2019, 9:38 a.m.