Produces a table summarising differential localisation results

plotTable(params, all = FALSE, fcol)

Arguments

params

An instance of class bandleParams or an instance of class MSnSetList of length 2.

all

A logical specifying whether to count all proteins or only show those that have changed in location between conditions. Default is FALSE.

fcol

If params is a list of MSnSets. Then fcol must be defined. This is a character vector of length 2 to set different labels for each dataset. If only one label is specified, and the character is of length 1 then this single label will be used to identify the annotation column in both datasets.

Value

Returns a summary table of translocations of proteins between conditions.

Examples

## Generate some example data
library("pRolocdata")
data("tan2009r1")
set.seed(1)
tansim <- sim_dynamic(object = tan2009r1, 
                      numRep = 4L,
                      numDyn = 100L)
data <- tansim$lopitrep
control <- data[1:2]
treatment <- data[3:4]

## fit GP params
gpParams <- lapply(tansim$lopitrep, function(x) 
fitGPmaternPC(x, hyppar = matrix(c(0.5, 1, 100), nrow = 1)))

## run bandle
res <- bandle(objectCond1 = control,
              objectCond2 = treatment, 
              gpParams = gpParams,
              fcol = "markers",  
              numIter = 5L, 
              burnin = 1L, 
              thin = 2L,
              numChains = 2, 
              BPPARAM = SerialParam(RNGseed = 1),
              seed = 1)
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |==========================================                            |  60%
               
## Process bandle results
bandleres <- bandleProcess(res)

## Tabulate results
plotTable(bandleres)  
#>        Condition1    Condition2 value
#> 3    Cytoskeleton      Lysosome     1
#> 6    Cytoskeleton    Peroxisome     1
#> 7    Cytoskeleton    Proteasome     3
#> 8    Cytoskeleton  Ribosome 40S     1
#> 11             ER  Cytoskeleton     3
#> 12             ER         Golgi    16
#> 13             ER      Lysosome     1
#> 16             ER    Peroxisome     4
#> 17             ER    Proteasome     2
#> 18             ER  Ribosome 40S     1
#> 19             ER  Ribosome 60S     2
#> 21          Golgi  Cytoskeleton     5
#> 22          Golgi            ER     2
#> 23          Golgi      Lysosome     6
#> 24          Golgi       Nucleus     1
#> 25          Golgi            PM    12
#> 26          Golgi    Peroxisome     2
#> 27          Golgi    Proteasome     8
#> 28          Golgi  Ribosome 40S     2
#> 29          Golgi  Ribosome 60S    13
#> 30          Golgi mitochondrion     2
#> 43        Nucleus         Golgi     2
#> 48        Nucleus  Ribosome 40S     2
#> 49        Nucleus  Ribosome 60S     1
#> 51             PM  Cytoskeleton     3
#> 52             PM            ER     2
#> 53             PM         Golgi     7
#> 54             PM      Lysosome     2
#> 55             PM       Nucleus     1
#> 56             PM    Peroxisome     3
#> 57             PM    Proteasome     1
#> 58             PM  Ribosome 40S     2
#> 59             PM  Ribosome 60S     2
#> 61     Peroxisome  Cytoskeleton     1
#> 71     Proteasome  Cytoskeleton     4
#> 73     Proteasome         Golgi     1
#> 77     Proteasome    Peroxisome     1
#> 81   Ribosome 40S  Cytoskeleton     3
#> 85   Ribosome 40S       Nucleus     1
#> 87   Ribosome 40S    Peroxisome     2
#> 88   Ribosome 40S    Proteasome     1
#> 89   Ribosome 40S  Ribosome 60S     5
#> 90   Ribosome 40S mitochondrion     3
#> 91   Ribosome 60S  Cytoskeleton     1
#> 92   Ribosome 60S            ER     1
#> 93   Ribosome 60S         Golgi     1
#> 94   Ribosome 60S      Lysosome     2
#> 97   Ribosome 60S    Peroxisome     1
#> 99   Ribosome 60S  Ribosome 40S     1
#> 101 mitochondrion  Cytoskeleton     1
#> 104 mitochondrion      Lysosome     2
#> 105 mitochondrion       Nucleus     1
#> 106 mitochondrion            PM     1
#> 107 mitochondrion    Peroxisome     2
#> 109 mitochondrion  Ribosome 40S     4
#> 110 mitochondrion  Ribosome 60S     2