Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression vignette #49

Merged
merged 5 commits into from Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,7 +1,7 @@
Package: monaLisa
Type: Package
Title: Binned Motif Enrichment Analysis and Visualization
Version: 0.99.1
Version: 0.99.2
Authors@R: c(
person("Dania", "Machlab", email = "dania.machlab@fmi.ch", role = c("aut"),
comment = c(ORCID = "0000-0002-2578-6930")),
Expand Down
2 changes: 1 addition & 1 deletion R/motif_enrichment_kmers.R
Expand Up @@ -478,6 +478,7 @@ calcBinnedKmerEnr <- function(seqs,
verbose = FALSE) {
## pre-flight checks
.assertVector(x = seqs, type = "DNAStringSet")
background <- match.arg(background)
if (is.null(bins) && (background %in% c("genome", "model"))) {
bins <- factor(rep(1, length(seqs)))
}
Expand All @@ -486,7 +487,6 @@ calcBinnedKmerEnr <- function(seqs,
stop("'seqs' and 'bins' must be of equal length and in the same order")
}
.assertScalar(x = kmerLen, type = "numeric", rngIncl = c(1, Inf))
background <- match.arg(background)
test <- match.arg(test)
.assertScalar(x = includeRevComp, type = "logical")
.assertScalar(x = pseudocount.kmers, type = "numeric", rngIncl = c(0, Inf))
Expand Down
2 changes: 1 addition & 1 deletion R/motif_enrichment_monaLisa.R
Expand Up @@ -276,6 +276,7 @@ calcBinnedMotifEnrR <- function(seqs,

# checks
.assertVector(x = seqs, type = "DNAStringSet")
background <- match.arg(background)
if (is.null(bins) && identical(background, "genome")) {
bins <- factor(rep(1, length(seqs)))
}
Expand All @@ -284,7 +285,6 @@ calcBinnedMotifEnrR <- function(seqs,
stop("'seqs' and 'bins' must be of equal length and in the same order")
}
.assertVector(x = pwmL, type = "PWMatrixList")
background <- match.arg(background)
.assertScalar(x = pseudocount.log2enr, type = "numeric",
rngIncl = c(0, Inf))
.assertScalar(x = p.adjust.method, type = "character",
Expand Down
6 changes: 3 additions & 3 deletions vignettes/selecting_motifs_with_randLassoStabSel.Rmd
Expand Up @@ -30,8 +30,8 @@ margin-right: auto; width: 50%; border: 0" />

# Introduction

Identifying important transcription factor (TF) motifs, as shown in vignette
(reference monaLisa.Rmd), could also be done using a regression based approach,
Identifying important transcription factor (TF) motifs, as shown in
`r Biocpkg("monaLisa", vignette="monaLisa.html", label="the main vignette")`, could also be done using a regression based approach,
where motifs are selected and have to compete against each other for selection.
In this framework, the response vector can be the observed experimental measure
of interest, e.g. log-fold changes of accessibility for a set of regions, and
Expand Down Expand Up @@ -114,7 +114,7 @@ fraction of G+C and CpG observed/expected ratio as predictors, to ensure that
selected TF motifs are not just detecting a simple trend in GC or CpG
composition.

```{r predictorMatrix}
```{r predictorMatrix, warning=FALSE}
# get PFMs (vertebrate TFs from Jaspar)
pfms <- getMatrixSet(JASPAR2020, list(matrixtype = "PFM",
tax_group = "vertebrates"))
Expand Down