Description Usage Arguments Value See Also Examples
This function will generate a horizontal barplot of the OnOff scores of test cell types, as defined by the eset$sub_cell_type1 column of the input dataset. Note that if the cell types as provided in the second argument (score data frame as produced by the function OnOff, are not matching the phenotype of the input dataset, the function will return an error.
1 | BarplotOnOff(eset, group.score)
|
eset |
an ExpressionSet containing data matrices of normalized expression data, present/absent calls, a gene annotation data.frame and a phenotype data.frame. |
group.score |
a data frame with cell type specific on/off scores as generated by the OnOff function. |
This function returns a list of two objects, as follows:
GroupComparisonsForPlot |
an ordered data.frame of on/off scores, |
OnOffBarplotData |
a data frame of marker gain/loss and aditional features, used for making the plot. |
OnOff
for details on on/off score
calculations, and hgu133plus2CellScore
for details
on the specific expressionSet object that should be provided as an input.
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 | ## Load the expression set for the standard cell types
library(Biobase)
library(hgu133plus2CellScore) # eset.std
## Locate the external data files in the CellScore package
rdata.path <- system.file("extdata", "eset48.RData", package = "CellScore")
tsvdata.path <- system.file("extdata", "cell_change_test.tsv",
package = "CellScore")
if (file.exists(rdata.path) && file.exists(tsvdata.path)) {
## Load the expression set with normalized expressions of 48 test samples
load(rdata.path)
## Import the cell change info for the loaded test samples
cell.change <- read.delim(file= tsvdata.path, sep="\t",
header=TRUE, stringsAsFactors=FALSE)
## Combine the standards and the test data
eset <- combine(eset.std, eset48)
## Generate a marker list
group.OnOff <- OnOff(eset, cell.change, out.put="marker.list")
## Calculate on/off score for individual samples
individ.OnOff <- OnOff(eset, cell.change, out.put="individual")
## Plot pyramid bar plot of on/off scores
BarplotOnOff(eset, group.OnOff$scores)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.