staggerdCountsPlot: Staggered Chart for Ploting Counts to Multiple Leveles of the...

Description Usage Arguments Details Value See Also Examples

View source: R/staggerdCountsPlot.R

Description

The basic idea of this plot is to show how counts data change while shifting a threshold-criterium. At each given threshold the counts are plotted like a staggered bar-chart (or staggered histogram) but without vertical lines to illustrated the almost continuous change from preceedig or following threshold-value. Initially this plot was designed for showing the absolute count-data used when constructing roc-curves (eg using the function summarizeForROC of package wrProteo ). The main input should furnish the panel of threshold as one column and the coresponding counts data as min 2 columns. The threshold coumns gets specified using the argument threColumn, the counts-data may either be specified using argument countsCol or be searched using grep using column-names containing the text given in argument varCountNa with may be combined with a fixed preceeding part given as argument fixedCountPat.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
staggerdCountsPlot(
  roc,
  threColumn = 1,
  countsCol = NULL,
  fixedCountPat = "n.pos.",
  varCountNa = NULL,
  sortAscending = TRUE,
  vertLine = NULL,
  col = NULL,
  tit = NULL,
  logScale = FALSE,
  las.alph = 2,
  displMaxSpec = TRUE,
  silent = FALSE,
  callFrom = NULL
)

Arguments

roc

(numeric matrix or data.frame) main input: one column with thresholds and multiple columns of assoicated count data

threColumn

(integer or character) to specify the column with threshold-data, in typica proteomics benchmark studies this would be 'alph' (for the statistical test threshold)

countsCol

(character of integer, min length=2) choice of column(s) with count-data in 'roc' to be used for display, if not NULL will override alternative search of columns using 'varCountNa' and 'fixedCountPat'

fixedCountPat

(character) optional pattern to help identifying counts-data: if not NULL it will be used as fixed part in column names to get pasted to varCountNa. In proteomics benchmark studies this would typically be 'n.pos.'

varCountNa

(character) alternative way to select the columns from 'roc': searched using grep using column-names containing the text given in argument varCountNa with may be combined with a fixed preceeding part given as argument fixedCountPat In proteomics benchmark studies this would typically be the species-abbreciations (eg 'H','S','E')

sortAscending

(logical) decide if data should be sorted ascending or descending

vertLine

(numeric) for optional vertical line, typically used to highlight alpha 0.05

col

(character) custom colors, see also par

tit

(character) cutom title

logScale

(logical) display threshld values (x-axis) on log-scale

las.alph

(numeric) orientation of label of alpha-cutoff, see also par

displMaxSpec

(logical) display on right side of figure max count value of contributing group species

silent

(logical) suppress messages

callFrom

(character) allow easier tracking of message(s) produced

Details

Investigate count data prepared for plotting ROC curves : cumulative counts plot by species (along different statistical test thresholds). Note : Package wrProteo may be used to prepare input (matrix of ROC data).

Value

plot only

See Also

ecdf, for preparing input to ROC: function summarizeForROC in package wrProteo

Examples

1
2
3
4
5
6
set.seed(2019); test1 <- cbind(a=sample.int(n=7,size=50,repl=TRUE),
  b=sample.int(n=11,size=50,repl=TRUE),c=sample.int(n=18,size=50,repl=TRUE))
test1 <- cbind(alph=seq(0,1,length.out=50),a=cumsum(test1[,1]),b=cumsum(test1[,2]),
  c=cumsum(test1[,3]))
staggerdCountsPlot(test1,countsCol=c("a","b","c"))
## example below requires the package wrProteo

wrGraph documentation built on April 12, 2021, 1:07 a.m.