Skip to content

Commit

Permalink
update the print function in each class
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiLiubio committed Dec 18, 2024
1 parent 31b9591 commit db16f5f
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 52 deletions.
2 changes: 1 addition & 1 deletion R/trans_abund.R
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ trans_abund <- R6Class(classname = "trans_abund",
}
invisible(self)
}
),
),
private = list(
adjust_axis_facet = function(plot_data, x_axis_name, order_x){
# order x axis samples and facet
Expand Down
10 changes: 1 addition & 9 deletions R/trans_diff.R
Original file line number Diff line number Diff line change
Expand Up @@ -1580,16 +1580,8 @@ trans_diff <- R6Class(classname = "trans_diff",
}
tree <- tree + theme(legend.position = "right", legend.title = element_blank())
tree
},
#' @description
#' Print the trans_alpha object.
print = function() {
cat("trans_diff object:\n")
cat(paste("res_diff have", ncol(self$res_diff), "columns: ", paste0(colnames(self$res_diff), collapse = ", "), "\n"))
if(!is.null(self$res_abund)) cat(paste("res_abund have", ncol(self$res_abund), "columns: ", paste0(colnames(self$res_abund), collapse = ", "), "\n"))
invisible(self)
}
),
),
private = list(
check_taxa_level_all = function(taxa_level){
if(taxa_level == "all"){
Expand Down
1 change: 1 addition & 0 deletions R/trans_env.R
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,7 @@ trans_env <- R6Class(classname = "trans_env",
}else{
cat("No environmental variable table stored in the object.\n")
}
invisible(self)
}
),
private = list(
Expand Down
18 changes: 0 additions & 18 deletions R/trans_func.R
Original file line number Diff line number Diff line change
Expand Up @@ -835,24 +835,6 @@ trans_func <- R6Class(classname = "trans_func",
self$res_tax4fun2_rFRI <- rel_functional_redundancy_final
message('Relative functional redundancy is stored in object$res_tax4fun2_rFRI')
invisible(self)
},
#' @description
#' Print the trans_func object.
print = function(){
cat("trans_func object:\n")
cat(paste("Functional analysis for", self$for_what, ".\n"))
if(!is.null(self$sample_table)){
cat("sample_table is available.\n")
}
if(!is.null(self$otu_table)){
cat("otu_table is available.\n")
}
if(!is.null(self$tax_table)){
cat("tax_table is available.\n")
}
if(!is.null(self$rep_fasta)){
cat("rep_fasta is available.\n")
}
}
),
active = list(
Expand Down
2 changes: 1 addition & 1 deletion R/trans_network.R
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ trans_network <- R6Class(classname = "trans_network",
}
invisible(self)
}
),
),
private = list(
check_filter_number = function(input, param = "filter_thres"){
if(nrow(input) == 0){
Expand Down
3 changes: 2 additions & 1 deletion R/trans_venn.R
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,9 @@ trans_venn <- R6Class(classname = "trans_venn",
#' Print the trans_venn object.
print = function() {
print(self$data_summary)
invisible(self)
}
),
),
private = list(
# modified from vennSets function in systemPipeR package
vennSets = function(setmatrix, allcombl, index, setunion){
Expand Down
11 changes: 0 additions & 11 deletions man/trans_diff.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions man/trans_func.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit db16f5f

Please sign in to comment.