Skip to content

Commit 76096b5

Browse files
committed
update
1 parent d83ca71 commit 76096b5

File tree

6 files changed

+134
-144
lines changed

6 files changed

+134
-144
lines changed

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export(subset_data)
6161
export(theme_ribo)
6262
export(to_position_matrix)
6363
export(trans_plot)
64+
export(trans_plot2)
6465
export(vocalno_plot)
6566
export(whole_metagene_plot)
6667
exportClasses(ribotrans)
@@ -96,6 +97,7 @@ exportMethods(relative_motif_occupancy)
9697
exportMethods(relative_offset_plot)
9798
exportMethods(subset_data)
9899
exportMethods(trans_plot)
100+
exportMethods(trans_plot2)
99101
exportMethods(whole_metagene_plot)
100102
import(Rcpp)
101103
import(RcppArmadillo)

R/serp-visualization.R

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -763,22 +763,6 @@ setMethod("enrichment_plot2",
763763
# ==============================================================================
764764

765765

766-
#' Plot translation profiles
767-
#'
768-
#' @description
769-
#' This is a generic function for plotting translation-related profiles (such as
770-
#' ribosome occupancy or enrichment signals) for different types of transcriptome data.
771-
#'
772-
#' @param object An object of class \code{serp} or \code{ribotrans}, containing necessary data for plotting.
773-
#' @param ... Additional arguments passed to the specific method.
774-
#'
775-
#' @return A plot, typically a ggplot2 object.
776-
#'
777-
#' @export
778-
setGeneric("trans_plot",function(object,...) standardGeneric("trans_plot"))
779-
780-
781-
782766

783767
#' Plot Ribosome density Across Transcripts
784768
#'
@@ -805,6 +789,7 @@ setGeneric("trans_plot",function(object,...) standardGeneric("trans_plot"))
805789
#' @param nrow Number of rows in the final layout when multiple transcripts are plotted. Passed to \code{cowplot::plot_grid()}.
806790
#' @param ncol Number of columns in the final layout when multiple transcripts are plotted. Passed to \code{cowplot::plot_grid()}.
807791
#' @param return_data Logical. If \code{TRUE}, return the underlying processed data instead of plot. Default: \code{FALSE}.
792+
#' @param ... Additional arguments (currently unused).
808793
#'
809794
#'
810795
#' @details
@@ -832,16 +817,22 @@ setGeneric("trans_plot",function(object,...) standardGeneric("trans_plot"))
832817
#' @examples
833818
#' \dontrun{
834819
#' # Plot ribosome and total signal at codon resolution
835-
#' trans_plot(serp_obj, mode = "codon")
820+
#' trans_plot2(serp_obj, mode = "codon")
836821
#'
837822
#' # Merge replicates and plot with standard deviation shading
838-
#' trans_plot(serp_obj, merge_rep = TRUE)
823+
#' trans_plot2(serp_obj, merge_rep = TRUE)
839824
#'
840825
#' # Return processed data without plotting
841-
#' data <- trans_plot(serp_obj, return_data = TRUE)
826+
#' data <- trans_plot2(serp_obj, return_data = TRUE)
842827
#' }
843828
#' @export
844-
setMethod("trans_plot",
829+
setGeneric("trans_plot2",function(object,...) standardGeneric("trans_plot2"))
830+
831+
832+
833+
#' @rdname trans_plot2
834+
#' @export
835+
setMethod("trans_plot2",
845836
signature(object = "serp"),
846837
function(object,
847838
merge_rep = FALSE,

R/visualization-methods.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# visualization
33
# ==============================================================================
44

5-
65
#' Plot RNA-seq and Ribosome Occupancy along Transcripts
76
#'
87
#' @description
@@ -30,6 +29,8 @@
3029
#' @param cds_col Colors used to annotate CDS in \code{ggside} alignment strip. Default: \code{"grey30"}.
3130
#' @param nrow Number of rows in the final layout when multiple transcripts are plotted. Passed to \code{cowplot::plot_grid()}.
3231
#' @param ncol Number of columns in the final layout when multiple transcripts are plotted. Passed to \code{cowplot::plot_grid()}.
32+
#' @param ... Additional arguments (currently unused).
33+
#'
3334
#'
3435
#' @details
3536
#' This method supports four types of data display:
@@ -67,6 +68,12 @@
6768
#' }
6869
#'
6970
#' @export
71+
setGeneric("trans_plot",function(object,...) standardGeneric("trans_plot"))
72+
73+
74+
75+
#' @rdname trans_plot
76+
#' @export
7077
setMethod("trans_plot",
7178
signature(object = "ribotrans"),
7279
function(object,

man/trans_plot-ribotrans-method.Rd

Lines changed: 0 additions & 110 deletions
This file was deleted.

man/trans_plot.Rd

Lines changed: 102 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)