Skip to content

Commit

Permalink
Merge pull request #305 from noranekonobokkusu/master
Browse files Browse the repository at this point in the history
Several fixes
  • Loading branch information
ncborcherding authored Jan 12, 2024
2 parents 654be88 + 08e7292 commit db49913
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions R/clonalAbundance.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ clonalAbundance <- function(input.data,
Con.df<- rbind.data.frame(Con.df, data1)
}
Con.df <- data.frame(Con.df)
Con.df$values <- factor(Con.df$values, levels=names(input.data))
col <- length(unique(Con.df$values))
fill <- "Samples"
if (scale == TRUE) {
Expand Down
3 changes: 2 additions & 1 deletion R/clonalQuant.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ clonalQuant <- function(input.data,
if(!is.null(group.by)) {
col <- length(unique(mat[,group.by]))
}
mat[,x] = factor(mat[,x], levels = names(input.data))

#Plotting
plot <- ggplot(data = mat,
aes(x=mat[,x], y=mat[,y], fill=as.factor(mat[,x]))) +
aes(x=mat[,x], y=mat[,y], fill=mat[,x])) +
stat_summary(geom = "errorbar",
fun.data = mean_se,
position = "dodge",
Expand Down
2 changes: 1 addition & 1 deletion R/clonalRarefaction.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ clonalRarefaction <- function(input.data,
mat <- iNEXT(mat.list, q=hill.numbers, datatype="abundance",nboot = n.boots)
plot <- suppressMessages(ggiNEXT(mat, type=plot.type) +
scale_shape_manual(values = rep(16,col)) +
scale_fill_manual(values = rep("white", col)) +
scale_fill_manual(values = c(.colorizer(palette,col))) +
scale_color_manual(values = c(.colorizer(palette,col))) +
theme_classic())
if (exportTable == TRUE) {
Expand Down

0 comments on commit db49913

Please sign in to comment.