Skip to content

Commit

Permalink
first submitted as 5.2.3 to cran
Browse files Browse the repository at this point in the history
  • Loading branch information
chr1swallace committed Aug 22, 2023
1 parent cd49a97 commit a44c817
Show file tree
Hide file tree
Showing 6 changed files with 585 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/susie.R
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ runsusie=function(d,suffix=1,
if(!converged)
maxit=maxit * 100 # no point in half measures!
}
res=annotate_susie(res, snp)
res=annotate_susie(res, snp, LD)
## ## prune sets in high LD
## if(!is.null(r2.prune))
## res=.susie_prune(res,r2.prune)
Expand Down Expand Up @@ -446,10 +446,13 @@ runsusie=function(d,suffix=1,
##' this is only required if you use the susieR functions directly
##' @param res output of susie_rss()
##' @param snp vector of snp identifiers
##' @param LD matrix of LD (r) between snps in snp
##' identifiers. Columns, rows should be named by a string that
##' exists in the vector snp
##' @return res with column names added to some components
##' @export
##' @author Chris Wallace
annotate_susie=function(res,snp) {
annotate_susie=function(res,snp, LD) {
## if(ncol(res$lbf_variable) != length(snp)+1)
## stop("length of snp vector should be 1 less than ncol(res$lbf_variable)")
colnames(res$lbf_variable) = c(snp,"null")[1:ncol(res$lbf_variable)]
Expand All @@ -459,6 +462,7 @@ annotate_susie=function(res,snp) {
res$sets$cs = lapply(res$sets$cs, function(x) { names(x) = snp[x]; x })
res$sld=.susie_setld(res$sets$cs,LD)
res$pruned=FALSE
res
}

.susie_prune=function(res,r2.prune) {
Expand Down
142 changes: 142 additions & 0 deletions docs/reference/findends.html

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

146 changes: 146 additions & 0 deletions docs/reference/findpeaks.html

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

Loading

0 comments on commit a44c817

Please sign in to comment.