Skip to content

Commit

Permalink
Merge pull request #49 from fmicompbio/fix_regression_vignette
Browse files Browse the repository at this point in the history
Fix regression vignette
  • Loading branch information
mbstadler committed Oct 18, 2021
2 parents 9bc1696 + 6e84bd2 commit 85ea948
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
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

0 comments on commit 85ea948

Please sign in to comment.