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
29
30
31
32
33
34
35
{

#create mock data
plot.df <- data.frame(Protein = "TP53",
NeighborhoodCls = "Nuclear",
CompartmentCls = "N1",
Secretory = as.numeric(0.01),
Nuclear = as.numeric(0.95),
Cytosol = as.numeric(0.02),
Mitochondria = as.numeric(0.02),
S1 = as.numeric(0.02),
S2 = as.numeric(0.02),
S3 = as.numeric(0.02),
S4 = as.numeric(0.02),
N1 = as.numeric(0.72),
N2 = as.numeric(0.02),
N3 = as.numeric(0.02),
N4 = as.numeric(0.02),
C1 = as.numeric(0.02),
C2 = as.numeric(0.02),
C3 = as.numeric(0.02),
C4 = as.numeric(0.02),
C5 = as.numeric(0.02),
M1 = as.numeric(0.02),
M2 = as.numeric(0.02))

rownames(plot.df) <- "TP53"

psm.df <- data.frame(Protein = "TP53",
PSMs.for.quant = as.numeric(31))

rownames(psm.df) <- "TP53"

proteinPlot <- plotBarcode(plot.df, "TP53", psm.df)
}

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