Commit 7abd33d1 authored by Edi Prifti's avatar Edi Prifti

- fixing name of plotAbundanceByClass

- version 1.0
parent 175743c3
Pipeline #31 canceled with stages
......@@ -2,3 +2,4 @@
* 18/05/2016: git project creation and merging of Lucas and Edi's version
* 1/06/2016: New population (denseVect) for terGA and different rewritten operators.
* 3/06/2016: Digesting and comparative plot capability added.
* 19/04/2019: First release version 1.0 after extensive recoding of backend and frontend functions.
Package: predomics
Type: Package
Title: Ternary Prediction in large Omics Dataests
Version: 0.9.9
Version: 0.1.0
Date: 2018-08-13
Author: Edi Prifti, Lucas Robin, Shasha Cui, Blaise Hanczar, Yann Chevaleyre, Jean-Daniel Zucker
Maintainer: Edi Prifti <edi.prifti@gmail.com>
......
......@@ -883,13 +883,13 @@ plotPrevalence <- function(features, X, y, topdown = TRUE, main = "", plot = TRU
#' @param col.bg: colors for the point fill (-1:deepskyblue1, 1:firebrick1)
#' @return a ggplot object
#' @export
plotAbundanceByCalss <- function(features, X, y, topdown = TRUE, main = "", plot = TRUE, col.pt = c("deepskyblue4", "firebrick4"), col.bg = c("deepskyblue1", "firebrick1"))
plotAbundanceByClass <- function(features, X, y, topdown = TRUE, main = "", plot = TRUE, col.pt = c("deepskyblue4", "firebrick4"), col.bg = c("deepskyblue1", "firebrick1"))
{
check.X_y_w(X,y)
if(any(is.na(match(features, rownames(X)))))
{
stop(paste("plotAbundanceByCalss: These features are not found in the dataset",
stop(paste("plotAbundanceByClass: These features are not found in the dataset",
features[is.na(match(features, rownames(X)))]))
}
......@@ -2668,7 +2668,7 @@ analyzePopulationFeatures <- function(pop, X, y, res_clf, makeplot = TRUE, name
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
#plot abundance
g8 <- plotAbundanceByCalss(features = features, X, y)
g8 <- plotAbundanceByClass(features = features, X, y)
g8 <- g8 + theme(axis.title.y=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
......@@ -2712,7 +2712,7 @@ analyzePopulationFeatures <- function(pop, X, y, res_clf, makeplot = TRUE, name
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
#plot abundance
g8 <- plotAbundanceByCalss(features = features, X, y)
g8 <- plotAbundanceByClass(features = features, X, y)
g8 <- g8 + theme(axis.title.y=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
......@@ -2921,7 +2921,7 @@ analyzeImportanceFeatures <- function(clf_res, X, y, makeplot = TRUE, name = "",
# get the abundance graphic
g8 <- plotAbundanceByCalss(features = features.import, X, y)
g8 <- plotAbundanceByClass(features = features.import, X, y)
g8 <- g8 + theme(axis.title.y=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
......@@ -2981,7 +2981,7 @@ analyzeImportanceFeatures <- function(clf_res, X, y, makeplot = TRUE, name = "",
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
# get the abundance graphic
g8 <- plotAbundanceByCalss(features = features.import, X, y)
g8 <- plotAbundanceByClass(features = features.import, X, y)
g8 <- g8 + theme(axis.title.y=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
......@@ -3056,7 +3056,7 @@ makeFeatureAnnot <- function(pop, X, y, clf)
pop.noz.na[pop.noz == 0] <- NA
coeff.mean <- rowMeans(pop.noz.na, na.rm = TRUE)
# f) differential abundance analyses
suppressWarnings(feat.abund.wilcox <- plotAbundanceByCalss(features = rownames(pop.noz), X, y, plot=FALSE)[,c("p","q","status")])
suppressWarnings(feat.abund.wilcox <- plotAbundanceByClass(features = rownames(pop.noz), X, y, plot=FALSE)[,c("p","q","status")])
colnames(feat.abund.wilcox) <- c("wilcox.p", "wilcox.q", "wilcox.class")
if(sum(dim(feat.preval.chisq)) == 0)
{
......
......@@ -293,7 +293,7 @@ fa <- makeFeatureAnnot(pop = fbm,
clf = clf)
dim(fa$pop.noz)
(g1 <- plotFeatureModelCoeffs(feat.model.coeffs = fa$pop.noz))
(g2 <- plotAbundanceByCalss(features = rownames(fa$pop.noz), X = X, y = y))
(g2 <- plotAbundanceByClass(features = rownames(fa$pop.noz), X = X, y = y))
(g3 <- plotPrevalence(features = rownames(fa$pop.noz), X = X, y = y))
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment