Skip to content

Commit

Permalink
Fix missing second table in known motif enrichment analysis tabs (Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HDash committed Dec 19, 2024
1 parent 9ad3396 commit 45eb2ac
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 19 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: MotifPeeker
Title: Benchmarking Epigenomic Profiling Methods Using Motif Enrichment
Version: 0.99.12
Version: 0.99.13
Authors@R: c(
person(given = "Hiranyamaya",
family = "Dash",
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# MotifPeeker 0.99.13

## Bug Fixes
* Fix missing second table in known motif enrichment analysis tabs.

## Miscellaneous
* Add "in Bioc" badge to README.

# MotifPeeker 0.99.12

## Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions R/MotifPeeker.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
#' if (memes::meme_is_installed()) {
#' MotifPeeker(
#' peak_files = peaks,
#' reference_index = 1,
#' reference_index = 2,
#' alignment_files = alignments,
#' exp_labels = c("ChIP", "TIP"),
#' exp_type = c("chipseq", "tipseq"),
Expand All @@ -165,7 +165,7 @@
#' motif_labels = NULL,
#' cell_counts = NULL,
#' motif_discovery = TRUE,
#' motif_discovery_count = 1,
#' motif_discovery_count = 2,
#' motif_db = NULL,
#' download_buttons = TRUE,
#' out_dir = tempdir(),
Expand Down
15 changes: 9 additions & 6 deletions R/print_denovo_sections.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ print_denovo_sections <- function(motif_list,
jaspar_link = FALSE,
download_buttons = NULL) {
headers <- list(
paste0("\n**Reference Group - Common Peaks** \nTotal peaks in ",
paste0(" \n **Reference Group - Common Peaks** \nTotal peaks in ",
"group: ", length(segregated_peaks$common_seqs1), " \n"),
paste0("\n**Comparison Group - Common Peaks** \nTotal peaks in ",
paste0(" \n **Comparison Group - Common Peaks** \nTotal peaks in ",
"group: ", length(segregated_peaks$common_seqs2), " \n"),
paste0("\n**Reference Group - Unique Peaks** \nTotal peaks in ",
paste0(" \n **Reference Group - Unique Peaks** \nTotal peaks in ",
"group: ", length(segregated_peaks$unique_seqs1), " \n"),
paste0("\n**Comparison Group - Unique Peaks** \nTotal peaks in ",
paste0(" \n **Comparison Group - Unique Peaks** \nTotal peaks in ",
"group: ", length(segregated_peaks$unique_seqs2), " \n")
)
out <- list()
Expand Down Expand Up @@ -83,8 +83,10 @@ print_denovo_sections <- function(motif_list,
return(motif_DT)
}

out_all <- list()
for (i in indices) {
out$first <- paste(headers[[i]], "\n ")
out <- list()
out$first <- paste(headers[[i]], " \n ")

### DT ###
out$DT <- .print_dt(i)
Expand All @@ -99,7 +101,8 @@ print_denovo_sections <- function(motif_list,
if (!is.null(download_buttons$tomtom_output[[i]]))
out$sixth <- download_buttons$tomtom_output[[i]]
}
out_all[[which(indices == i)]] <- out
}

return(out)
return(out_all)
}
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ repo <- strsplit(URL,"/")[[1]][5]
# <code>MotifPeeker</code><br>Benchmarking Epigenomic Profiling Methods Using Motif Enrichment
![](https://github.com/neurogenomics/MotifPeeker/raw/master/inst/hex/hex.png){style='height: 300px !important;'}

[![Bioc history](https://bioconductor.org/shields/years-in-bioc/MotifPeeker.svg)](https://bioconductor.org/packages/devel/bioc/html/MotifPeeker.html#since)
`r rworkflows::use_badges(add_hex = FALSE, add_authors = FALSE)`

**Authors:** ***Hiranyamaya (Hiru) Dash, Thomas Roberts, Maria Weinert, Nathan Skene***
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
src="https://github.com/neurogenomics/MotifPeeker/raw/master/inst/hex/hex.png"
style="height: 300px !important;" />

[![Bioc
history](https://bioconductor.org/shields/years-in-bioc/MotifPeeker.svg)](https://bioconductor.org/packages/devel/bioc/html/MotifPeeker.html#since)
[![License: GPL (\>=
3)](https://img.shields.io/badge/license-GPL%20(%3E=%203)-blue.svg)](https://cran.r-project.org/web/licenses/GPL%20(%3E=%203))
[![](https://img.shields.io/badge/devel%20version-0.99.12-black.svg)](https://github.com/neurogenomics/MotifPeeker)
[![](https://img.shields.io/badge/devel%20version-0.99.13-black.svg)](https://github.com/neurogenomics/MotifPeeker)
[![](https://img.shields.io/github/languages/code-size/neurogenomics/MotifPeeker.svg)](https://github.com/neurogenomics/MotifPeeker)
[![](https://img.shields.io/github/last-commit/neurogenomics/MotifPeeker.svg)](https://github.com/neurogenomics/MotifPeeker/commits/master)
<br> [![R build
Expand All @@ -18,7 +20,7 @@ status](https://github.com/neurogenomics/MotifPeeker/workflows/rworkflows/badge.

**Authors:** ***Hiranyamaya (Hiru) Dash, Thomas Roberts, Maria Weinert,
Nathan Skene***
**Updated:** ***Dec-02-2024***
**Updated:** ***Dec-19-2024***

## Introduction

Expand Down Expand Up @@ -356,7 +358,7 @@ utils::sessionInfo()

## R version 4.4.2 (2024-10-31)
## Platform: aarch64-apple-darwin20
## Running under: macOS Sequoia 15.1.1
## Running under: macOS Sequoia 15.2
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib
Expand Down
12 changes: 7 additions & 5 deletions inst/markdown/MotifPeeker.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -898,11 +898,13 @@ for (i in seq_along(comparison_indices)) {
out <- print_denovo_sections(streme_motifs, similar_motifs, segregated_peaks[[i]],
c(x, y), jaspar_link = using_jaspar_db,
download_buttons = download_btns)
for (ele in out) {
if (typeof(ele) == "character") {
cat(ele)
} else {
print(ele)
for (out2 in out) {
for (ele in out2) {
if (typeof(ele) == "character") {
cat(ele)
} else {
print(ele)
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions man/MotifPeeker.Rd

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

0 comments on commit 45eb2ac

Please sign in to comment.