Skip to content

Commit

Permalink
Merge pull request #51 from AnqiWang2021/master
Browse files Browse the repository at this point in the history
fix create_mixture_prior
  • Loading branch information
gaow authored Apr 22, 2024
2 parents fc6d441 + ca286c6 commit a61261d
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 51 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ Remotes:
stephenslab/susieR
LazyData: true
NeedsCompilation: no
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
Roxygen: list(r6 = FALSE)
6 changes: 6 additions & 0 deletions R/mash.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ create_mixture_prior <- function(mixture_prior, R, null_weight = NULL,
}
if (!missing(R)) {
Ulist <- create_cov_canonical(R, ...)
Ulist <- lapply(Ulist, function(mat) {
rownames(mat) <- include_indices
colnames(mat) <- include_indices
return(mat)
})
weights <- rep(1 / length(Ulist), length(Ulist))
weights <- setNames(weights, names(Ulist))
if (max_mixture_len < length(Ulist) && max_mixture_len > 0) {
stop(paste0(
"Automatically generated uniform mixture prior is of ",
Expand Down
4 changes: 2 additions & 2 deletions man/create_cov_canonical.Rd

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

98 changes: 50 additions & 48 deletions man/mvsusie.Rd

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

0 comments on commit a61261d

Please sign in to comment.