diff --git a/NAMESPACE b/NAMESPACE index 8973362..6753f68 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -10,6 +10,7 @@ export(TCGA_expression) export(TCGA_methylation_expression_correlation) export(all_genes) export(embryo_expression) +export(embryos_mean_methylation) export(fetal_germcell_mean_methylation) export(fetal_germcells_expression) export(hESC_expression) @@ -58,6 +59,7 @@ importFrom(ggplot2,ylim) importFrom(ggrepel,geom_text_repel) importFrom(grDevices,colorRampPalette) importFrom(grid,gpar) +importFrom(grid,unit) importFrom(rlang,.data) importFrom(stats,cor.test) importFrom(stats,na.omit) diff --git a/R/embryo_expression.R b/R/embryo_expression.R index 844e701..e581a2d 100644 --- a/R/embryo_expression.R +++ b/R/embryo_expression.R @@ -8,6 +8,9 @@ #' Petropoulos et al., Cell 2016) or from "Zhu" scRNAseq dataset ("Single-cell #' DNA methylome sequencing of human preimplantation embryos". Zhu et al. #' Nat genetics 2018) +#' +#' @param dataset `character`. Indicates which scRNAseq dataset to use. +#' Either Petropoulos or Zhu, no default. #' #' @param genes `character` nameing the selected genes. The default #' value, `NULL`, takes all CT (specific) genes. diff --git a/R/embryos_mean_methylation.R b/R/embryos_mean_methylation.R index a0d7be0..b4f7e92 100644 --- a/R/embryos_mean_methylation.R +++ b/R/embryos_mean_methylation.R @@ -10,7 +10,7 @@ #' @param genes `character` naming the selected genes. The default #' value, `NULL`, takes all CT (specific) genes. #' -#' @param cells `character` defining the cell types to be plotted. +#' @param stage `character` defining the cell types to be plotted. #' Can be "GV Oocyte", "MII Oocyte", "Sperm", "Zygote", "2-cell", #' "4-cell", "8-cell", "Morula", "Blastocyst", "Post-implantation". #' @@ -28,7 +28,7 @@ #' @export #' #' @importFrom ComplexHeatmap Heatmap -#' @importFrom grid gpar +#' @importFrom grid gpar unit #' @importFrom circlize colorRamp2 #' @importFrom grDevices colorRampPalette #' @importFrom SummarizedExperiment rowData<- assay @@ -36,7 +36,7 @@ #' #' @examples #' embryos_mean_methylation() -#' embryos_mean_methylation(c("MAGEA1", "MAGEA3", "MAGEA4", "MAGEC2", "MAGEB16), +#' embryos_mean_methylation(c("MAGEA1", "MAGEA3", "MAGEA4", "MAGEC2", "MAGEB16"), #' stage = c( "MII Oocyte", "Sperm", "Zygote", "2-cell", "4-cell", "8-cell", #' "Morula")) embryos_mean_methylation <- function(genes = NULL, diff --git a/R/fetal_germcells_mean_methylation.R b/R/fetal_germcells_mean_methylation.R index a9c796c..7e13109 100644 --- a/R/fetal_germcells_mean_methylation.R +++ b/R/fetal_germcells_mean_methylation.R @@ -24,7 +24,7 @@ #' @export #' #' @importFrom ComplexHeatmap Heatmap -#' @importFrom grid gpar +#' @importFrom grid gpar unit #' @importFrom circlize colorRamp2 #' @importFrom grDevices colorRampPalette #' @importFrom stats na.omit diff --git a/R/hESC_mean_methylation.R b/R/hESC_mean_methylation.R index cd319ae..0498c3c 100644 --- a/R/hESC_mean_methylation.R +++ b/R/hESC_mean_methylation.R @@ -53,7 +53,6 @@ hESC_mean_methylation <- function(genes = NULL, col = colorRamp2(seq_len(100), colorRampPalette(c("moccasin", "dodgerblue4"))(100)), na_col = "gray80", - cluster_rows = clustering_option, cluster_columns = FALSE, show_row_names = TRUE, show_heatmap_legend = TRUE, diff --git a/man/embryo_expression.Rd b/man/embryo_expression.Rd index f574150..7c4bec1 100644 --- a/man/embryo_expression.Rd +++ b/man/embryo_expression.Rd @@ -13,6 +13,9 @@ embryo_expression( ) } \arguments{ +\item{dataset}{\code{character}. Indicates which scRNAseq dataset to use. +Either Petropoulos or Zhu, no default.} + \item{genes}{\code{character} nameing the selected genes. The default value, \code{NULL}, takes all CT (specific) genes.} diff --git a/man/embryos_mean_methylation.Rd b/man/embryos_mean_methylation.Rd new file mode 100644 index 0000000..1ea3d3d --- /dev/null +++ b/man/embryos_mean_methylation.Rd @@ -0,0 +1,48 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/embryos_mean_methylation.R +\name{embryos_mean_methylation} +\alias{embryos_mean_methylation} +\title{Promoter methylation of any gene in early embryos} +\usage{ +embryos_mean_methylation( + genes = NULL, + stage = c("GV Oocyte", "MII Oocyte", "Sperm", "Zygote", "2-cell", "4-cell", "8-cell", + "Morula", "Blastocyst", "Post-implantation"), + include_CTP = FALSE, + values_only = FALSE +) +} +\arguments{ +\item{genes}{\code{character} naming the selected genes. The default +value, \code{NULL}, takes all CT (specific) genes.} + +\item{stage}{\code{character} defining the cell types to be plotted. +Can be "GV Oocyte", "MII Oocyte", "Sperm", "Zygote", "2-cell", +"4-cell", "8-cell", "Morula", "Blastocyst", "Post-implantation".} + +\item{include_CTP}{\code{logical(1)} If \code{TRUE}, CTP genes are included. +(\code{FALSE} by default).} + +\item{values_only}{\code{logical(1)}, \code{FALSE} by default. If \code{TRUE}, the +function will return the methylation values in all samples +instead of the heatmap.} +} +\value{ +Heatmap of mean promoter methylation of any gene in embryos. +If \code{values_only = TRUE}, a RangedSummarizedExperiment with methylation values +is returned instead. +} +\description{ +Plots a heatmap of mean promoter methylation levels of +any genes in early embryos, using WGSB data from ("Single-cell +DNA methylome sequencing of human preimplantation embryos". Zhu et al. +Nat genetics 2018). Methylation levels in tissues correspond +to the mean methylation of CpGs located in range of 1000 pb upstream and +500 pb downstream from gene TSS. +} +\examples{ +embryos_mean_methylation() +embryos_mean_methylation(c("MAGEA1", "MAGEA3", "MAGEA4", "MAGEC2", "MAGEB16"), +stage = c( "MII Oocyte", "Sperm", "Zygote", "2-cell", "4-cell", "8-cell", +"Morula")) +}