Skip to content

Commit

Permalink
version 1.0-10
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles C. Berry authored and cran-robot committed Nov 8, 2002
1 parent 49132d4 commit e6e4952
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Expand Up @@ -80,5 +80,10 @@ cleanup of Rd files to conform to R-1.6.0
Version: 1.0-9
bugfix - not.r computation was off in make.marker.map

----------------------------------------

Version: 1.0-10
bugfix - new classes for unique() broke summary.swap

----------------------------------------

4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: bqtl
Version: 1.0-9
Date: 2002-11-04
Version: 1.0-10
Date: 2002-11-08
Title: Bayesian QTL mapping toolkit
Author: Charles C. Berry <cberry@ucsd.edu>
Maintainer: Charles C. Berry <cberry@ucsd.edu>
Expand Down
2 changes: 1 addition & 1 deletion R/make.state.matrix.s
Expand Up @@ -23,7 +23,7 @@
### marker. frame is assumed to be all numeric
###
sum.or.one <- function(x) {y <- sum(x);if (y>0) y else 1.0}
md.unique <- unique(marker.distances)
md.unique <- unique( c( marker.distances ) )
md.ind <- factor(marker.distances, md.unique)
n.ind <- length(md.unique)
###
Expand Down
7 changes: 4 additions & 3 deletions R/summary.swap.s
Expand Up @@ -3,6 +3,7 @@ function(object, method=NULL, ncoef=length(object$alt.coef),nloc=object$nloc,...
{
### summarize a swap.cycle object
this.call <- sys.call()
if (exists("unique.default")) unique <- unique.default
if (missing(method))
method <-
if(diff(dim(object$config))[1] < 0 )
Expand All @@ -29,10 +30,10 @@ function(object, method=NULL, ncoef=length(object$alt.coef),nloc=object$nloc,...
)))
cp <- object$coefs * rep.post
tap.coef <- tapply(cp, object$conf, sum)
coefs[sort(unique(object$config))] <- if (method=="F2") tap.coef[-1] else tap.coef
coefs[sort(unique(c( object$config )))] <- if (method=="F2") tap.coef[-1] else tap.coef
coefs <- coefs/sum(object$post)
if (method=="F2") {
locs <- apply((object$config - 1) %/% 2 + 1, 2:3, function(x) {unique(x[x > 0])})
locs <- apply((object$config - 1) %/% 2 + 1, 2:3, function(x) {unique(c( x[x > 0]) )})
}
else
locs <- object$config
Expand All @@ -41,7 +42,7 @@ function(object, method=NULL, ncoef=length(object$alt.coef),nloc=object$nloc,...
diml <- c(1, diml)
loc.post <- rep(0, nloc)
rep.marg <- rep(object$marg, rep(diml[1], diml[2] * diml[3]))
loc.post[sort(unique(locs))] <-
loc.post[sort(unique(c( locs )))] <-
tapply(rep.marg, locs, sum)/sum(rep.marg)*diml[2]
## note assumption that second subscript tells size of model
blk.ratio <- apply(object$cond/object$marg, 2, mean)
Expand Down
2 changes: 1 addition & 1 deletion R/swapbc1.c.s
Expand Up @@ -34,7 +34,7 @@
nlocs <- length(in.locs)
nstep <- nlocs

len.locs <- length(unique(locs))
len.locs <- length(unique(c( locs ) ))

nopt <- len.locs
optmax <- 1
Expand Down
4 changes: 2 additions & 2 deletions R/swapf2.c.s
Expand Up @@ -37,7 +37,7 @@
mode.offset <- mode.offset[ match( uniq.locs, in.locs ) ]
nlocs <- length(uniq.locs)
nstep <- nlocs
len.locs <- length(unique(locs))
len.locs <- length(unique(c( locs) ))

nopt <- len.locs*3
optmax <- 2
Expand All @@ -53,7 +53,7 @@
stop("length(locs.prior)!=length(unique(locs))")
if (length(nreps)>1) stop("nreps should be an integer")
optpri <- c(locs.prior)%o%c(combo.prior)
optvars <- matrix(c(rbind(unique(locs)*2-2,-1),rbind(unique(locs)*2-1,-1),
optvars <- matrix(c(rbind(unique(c(locs))*2-2,-1),rbind(unique(c(locs))*2-1,-1),
locs*2-rep(2:1,nopt/3)),nrow=2)

optcur <- uniq.locs + mode.offset*len.locs
Expand Down
2 changes: 1 addition & 1 deletion R/twohkf2.s
Expand Up @@ -26,7 +26,7 @@
if (missing(locs))
locs <- rep(seq(ncol(varcov$var.x)/2), rep(2, ncol(varcov$var.x)/2))

uniq.locs <- unique(locs)
uniq.locs <- unique(c( locs ))
nlocs <- length(uniq.locs)
nin <- 2
nopt <- nlocs*3
Expand Down
2 changes: 1 addition & 1 deletion R/version.bqtl.R
@@ -1 +1 @@
version.bqtl<-"Version:1.0-9"
version.bqtl<-"Version:1.0-10"

0 comments on commit e6e4952

Please sign in to comment.