Skip to content

Commit

Permalink
version 0.6-4
Browse files Browse the repository at this point in the history
  • Loading branch information
petebaker authored and cran-robot committed Mar 23, 2018
1 parent 73fae40 commit 51d0a13
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 82 deletions.
23 changes: 12 additions & 11 deletions DESCRIPTION
@@ -1,18 +1,19 @@
Package: polySegratioMM
Type: Package
Title: Bayesian mixture models for marker dosage in autopolyploids
Version: 0.6-3
Date: 2014-02-06
Author: Peter Baker
Title: Bayesian Mixture Models for Marker Dosage in Autopolyploids
Version: 0.6-4
Date: 2018-03-22
Authors@R: c(person("Peter", "Baker", role = c("aut", "cre"),
email = "p.baker1@uq.edu.au"))
Author: Peter Baker [aut, cre]
Maintainer: Peter Baker <p.baker1@uq.edu.au>
Depends: R (>= 2.12.0), polySegratio
Imports: gtools, coda, lattice
Description: Fits Bayesian mixture models to estimate marker dosage for dominant markers on autopolyploids using JAGS (1.0 or greater) as outlined in Baker et al (2010). May be used in conjunction with polySegratio for simulation studies and comparison with standard methods.
Description: Fits Bayesian mixture models to estimate marker dosage for dominant markers in autopolyploids using JAGS (1.0 or greater) as outlined in Baker et al "Bayesian estimation of marker dosage in sugarcane and other autopolyploids" (2010, <doi:10.1007/s00122-010-1283-z>). May be used in conjunction with polySegratio for simulation studies and comparison with standard methods.
URL: https://github.com/petebaker/polysegratiomm
BugReports: https://github.com/petebaker/polysegratiomm/issues
License: GPL-3
Repository: CRAN
Repository/R-Forge/Project: polysegratio
Repository/R-Forge/Revision: 13
Repository/R-Forge/DateTimeStamp: 2014-03-06 07:37:23
Date/Publication: 2014-03-06 22:09:58
Packaged: 2014-03-06 11:36:44 UTC; rforge
NeedsCompilation: no
Packaged: 2018-03-23 05:04:53 UTC; pete
Repository: CRAN
Date/Publication: 2018-03-23 08:49:42 UTC
29 changes: 15 additions & 14 deletions MD5
@@ -1,6 +1,6 @@
da2e46f447c23d885026c21b6b0afa2d *CHANGELOG
9ced09bc268d7f05566127d345ad1015 *DESCRIPTION
23a714bc9dd3124183c408ced9caa2f1 *NAMESPACE
bfd913a98c58f4b09755d6900ee72f7f *DESCRIPTION
313c26ba2bf3470b49001c2278cd32ff *NAMESPACE
ff86e117bf0b39f4c0f38dcb8cd80e8f *R/DistributionPlotBinomial.R
de57e9f029ac5944d7934a752394ddee *R/DistributionPlotGamma.R
799cab60974371b6eebc988a25b1c209 *R/DistributionPlotNorm.R
Expand All @@ -12,7 +12,7 @@ e09ad91c311f78cf2a0f1690d2771e2c *R/dumpInits.R
b8ed6689c899a189802caba27c6be793 *R/plot.runJagsWrapper.R
2de6f66f125e251ca251aa39aeeaba40 *R/plot.segratioMCMC.R
5316489dea5451945be054e1970a85eb *R/plotFitted.R
96ff69426087132bc47151a2c41bb692 *R/plotTheoretical.R
c0866e90195b2809d8ce727a87cc2eb0 *R/plotTheoretical.R
9ce55679aff0f54f5e6a5e378c7660f0 *R/print.dosagesMCMC.R
f362e9abd45438023fae8ba8d7c51000 *R/print.runJags.R
bbf017771e438b4bbe7c42374c51d9f1 *R/print.runJagsWrapper.R
Expand All @@ -27,15 +27,16 @@ f27c93c3b0802f76fa05dd6dd7394d26 *R/runJags.R
969e777bbbc8c7e79164d0ffb605c003 *R/summary.segratioMCMC.R
8ddc61f60708990ecf02bebe9f3edab9 *R/writeControlFile.R
04ab554ec6e44db7bddcec221160cfee *R/writeJagsFile.R
906430effa3faa9d85375ba0a6a7115d *README.md
3d312f9e07e20e3d27cab8b95092855b *TODO
d7f817d68b921aea959a0cd7a814e99f *build/vignette.rds
5c9b8cc08d2c2eec6826841dade9d593 *build/vignette.rds
e3851875d8153cc6b9e49f6cca299109 *data/hexmarkers.RData
534c6829022b3be2f7005072355fadf8 *data/hexmarkers.overdisp.RData
1fb84bbf8ea4c37fc03f8d4b0e14bda0 *data/mcmcHexRun.RData
08b5df5bc5effb0d9cd5141adf02530d *inst/CITATION
10187c811a16f2892f9e2ecf4f5cd387 *inst/doc/polySegratioMM-overview.R
6c985ad192ef784993e17c4f9b3b35b8 *inst/doc/polySegratioMM-overview.Rnw
b7fd91824bcea52b26baee5f8a1a8bce *inst/doc/polySegratioMM-overview.pdf
46e67cf94e56daee8089d170925ac2eb *inst/CITATION
db78ca43b17a7ec81105587539ab4879 *inst/doc/polySegratioMM-overview.R
248bfbb6e2ab3c82938a58d2d808e809 *inst/doc/polySegratioMM-overview.Rnw
66576a4862d27ac0f10a5a36e8c3a891 *inst/doc/polySegratioMM-overview.pdf
bea987e891ae6782fe6f1bbead8d0208 *man/DistributionPlotBinomial.Rd
af9345b52da76bc8db49803e5918a0da *man/calculateDIC.Rd
e4b8cec052b56995aa4303d5210c2803 *man/diagnosticsJagsMix.Rd
Expand All @@ -46,7 +47,7 @@ f93a468ef51f47372fff7fe2d4e6beb5 *man/hexmarkers.Rd
cfdfc1d615f577ca76aa12433ed9672d *man/mcmcHexRun.Rd
bb493f0db0e1532c7dedd10372688b5b *man/plot.segratioMCMC.Rd
2a9c44f0c28f954b7f2f20fa0be675ff *man/plotFitted.Rd
5ce36bb9fb9dff523bc1fb4a9a6492e3 *man/polySegratioMM-package.Rd
2ed15f1e9475327e495933a281119c02 *man/polySegratioMM-package.Rd
571f26e6e8e696e47205d9b0a436387b *man/print.dosagesMCMC.Rd
2a614f7ddaf297b9cdfe3abbca07587d *man/print.runJags.Rd
af2fb3e7b9d599cc267cbd921e3d4271 *man/readJags.Rd
Expand All @@ -61,13 +62,13 @@ f63d46efa23500dbdcb44435c5792c50 *man/writeControlFile.Rd
4442c599f34d83f1a0322c26299b0620 *man/writeJagsFile.Rd
d27a0aa951adedafed99336840ea583a *vignettes/auto/_region_.el
83fb7c5590475616025be208ee5058ca *vignettes/auto/polySegratioMM-overview.el
6c985ad192ef784993e17c4f9b3b35b8 *vignettes/polySegratioMM-overview.Rnw
248bfbb6e2ab3c82938a58d2d808e809 *vignettes/polySegratioMM-overview.Rnw
839b039e113d02032270bd353e84d955 *vignettes/polySegratioMM-overview.bib
87d0641c637e5aa1a5f8b3882c49ef02 *vignettes/tmp/tmp-006.eps
452a2642d967de8446c01698123e69e5 *vignettes/tmp/tmp-006.pdf
840269e07b335287e6de01c076608e97 *vignettes/tmp/tmp-006.pdf
169490fb4220165964bd2f1e9421f0fd *vignettes/tmp/tmp-009.eps
1c71717ebc0b16314c366afcff29cfd0 *vignettes/tmp/tmp-009.pdf
84ea75418b9869a0ec2f4fb2bab26cf3 *vignettes/tmp/tmp-009.pdf
482143171f1c518e870b408bb57e2429 *vignettes/tmp/tmp-016.eps
85b9cab4ee8e66bbf6207247b4b25859 *vignettes/tmp/tmp-016.pdf
e11219ef0657bb3fc4f76ce8c88907b2 *vignettes/tmp/tmp-016.pdf
59ff81c4931b659a699ccc0b09aa6522 *vignettes/tmp/tmp-017.eps
46466ffd0395c73d9eda155d622f3ff4 *vignettes/tmp/tmp-017.pdf
802ae3438490cf67ce731b93edb4acce *vignettes/tmp/tmp-017.pdf
5 changes: 5 additions & 0 deletions NAMESPACE
Expand Up @@ -2,6 +2,7 @@ export(diagnosticsJagsMix,DistributionPlotBinomial,DistributionPlotGamma,Distrib
S3method(print, dosagesMCMC)
S3method(print, runJags)
S3method(print, runJagsWrapper)
S3method(plot, runJagsWrapper)
S3method(print, segratioMCMC)
S3method(plot, segratioMCMC)
S3method(summary, segratioMCMC)
Expand All @@ -10,3 +11,7 @@ importFrom(gtools, logit)
##importFrom(coda, HPDinterval, acfplot, raftery.diag, geweke.diag, heidel.diag, levelplot, cumuplot, traceplot, densityplot.mcmc, densityplot.mcmc.list, autocorr, varnames, xyplot.mcmc, xyplot.mcmc.list, qqmath.mcmc, qqmath.mcmc.list)
importFrom(coda, HPDinterval, acfplot, raftery.diag, geweke.diag, heidel.diag, cumuplot, traceplot, autocorr, varnames, read.openbugs)
importFrom(lattice, histogram, panel.histogram, panel.densityplot, panel.lines, xyplot, panel.xyplot, panel.curve, qqmath, levelplot, densityplot)
importFrom("grDevices", "nclass.Sturges")
importFrom("graphics", "abline", "plot", "points")
importFrom("stats", "dbinom", "dgamma", "dnorm", "pnorm", "qbinom", "qgamma",
"qnorm")
2 changes: 1 addition & 1 deletion R/plotTheoretical.R
Expand Up @@ -135,7 +135,7 @@ plotTheoretical <-
comp.lines[[iii+1]]
comp.lines[[1]] <- comp.lines[[1]] + comp.lines[[iii+1]]
}
warning("Binomial mixture density is only approximate on logit scale")
cat("PlotTheoretical Warning: Binomial mixture density is only approximate on logit scale\n")

if (plot.sr) {
## first attempt - too global??
Expand Down
10 changes: 10 additions & 0 deletions README.md
@@ -0,0 +1,10 @@
# R package: polySegratioMM


**polySegratioMM:** Bayesian mixture models for marker dosage in autopolyploids

Fits Bayesian mixture models to estimate marker dosage for dominant markers on autopolyploids using JAGS (1.0 or greater) as outlined in Baker et al (2010). May be used in conjunction with polySegratio for simulation studies and comparison with standard methods.

Maintenance release: I am no longer working in polyploids.

**NB:** Migrated from [r-forge](http://r-forge.r-project.org/projects/polysegratio/) to better manage project
Binary file modified build/vignette.rds
Binary file not shown.
47 changes: 23 additions & 24 deletions inst/CITATION
Expand Up @@ -3,31 +3,30 @@ citHeader("To cite package 'polySegratioMM' in publications use:")
year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date)
vers <- paste("R package version", meta$Version)

citEntry(entry="Article",
title = "Bayesian estimation of marker dosage in sugarcane and other autopolyploids",
author = personList(as.person("Peter Baker"),
as.person("Phillip Jackson"),
as.person("Karen Aitken")),
journal = "TAG Theoretical and Applied Genetics",
year = "2010",
volume = "120",
pages = "1653-1672",

textVersion =
paste("Peter Baker, Phillip Jackson and Karen Aitken (2010)",
" Bayesian estimation of marker dosage in sugarcane and other autopolyploids.",
" Theoretical and Applied Genetics 120 1653-1672", sep="")
citEntry(
entry="Article",
title = "Bayesian estimation of marker dosage in sugarcane and other autopolyploids",
author = personList(as.person("Baker, P."),
as.person("Jackson, P."),
as.person("Aitken, K.")),
journal = "TAG Theoretical and Applied Genetics",
year = "2010",
volume = "120",
pages = "1653--1672",
url = "https://doi.org/10.1007/s00122-010-1283-z",
doi = "10.1007/s00122-010-1283-z",
textVersion="Baker, P., Jackson, P. & Aitken, K. Theor Appl Genet (2010) 120: 1653-1672. https://doi.org/10.1007/s00122-010-1283-z"
)

citEntry(entry="Manual",
title = "polySegratioMM Bayesian mixture models for marker dosage in autopolyploids",
citEntry(
entry="Manual",
title = "polySegratioMM Bayesian mixture models for marker dosage in autopolyploids",
author = personList(as.person("Peter J Baker")),

year = year,
note = vers,
year = year,
note = vers,
textVersion =
paste("Peter J Baker (",
year,
"). polySegratioMM: Bayesian mixture models for marker dosage in autopolyploids. ",
vers, ".", sep="" ))

textVersion =
paste("Peter J Baker (",
year,
"). polySegratioMM: Bayesian mixture models for marker dosage in autopolyploids. ",
vers, ".", sep="" ))
38 changes: 19 additions & 19 deletions inst/doc/polySegratioMM-overview.R
@@ -1,13 +1,13 @@
### R code from vignette source 'polySegratioMM-overview.Rnw'

###################################################
### code chunk number 1: polySegratioMM-overview.Rnw:63-64
### code chunk number 1: polySegratioMM-overview.Rnw:64-65
###################################################
library(polySegratioMM)


###################################################
### code chunk number 2: polySegratioMM-overview.Rnw:67-72
### code chunk number 2: polySegratioMM-overview.Rnw:68-73
###################################################
##library(cacheSweave) # comment this out after development phase
## to use: Sweave("polySegratioMM-overview.Rnw", driver=cacheSweaveDriver)
Expand All @@ -17,13 +17,13 @@ options(width=70, digits=4)


###################################################
### code chunk number 3: polySegratioMM-overview.Rnw:90-91
### code chunk number 3: polySegratioMM-overview.Rnw:91-92
###################################################
data(hexmarkers)


###################################################
### code chunk number 4: polySegratioMM-overview.Rnw:93-100
### code chunk number 4: polySegratioMM-overview.Rnw:94-101
###################################################
##<<simData, cache=true>>=
## simulate small autohexaploid data set of 500 markers for 200 individuals
Expand All @@ -35,21 +35,21 @@ print(hexmarkers)


###################################################
### code chunk number 5: polySegratioMM-overview.Rnw:108-109
### code chunk number 5: polySegratioMM-overview.Rnw:109-110
###################################################
sr <- segregationRatios(hexmarkers$markers)


###################################################
### code chunk number 6: polySegratioMM-overview.Rnw:115-118
### code chunk number 6: polySegratioMM-overview.Rnw:116-119
###################################################
print(plotTheoretical(ploidy.level=6, seg.ratios=sr, main="",
expected.segratio=NULL, proportions=c(0.7,0.2,0.1),
n.individuals=200))


###################################################
### code chunk number 7: polySegratioMM-overview.Rnw:141-148
### code chunk number 7: polySegratioMM-overview.Rnw:142-149
###################################################
##<<simDataOver, cache=true>>=
## simulate small autohexaploid data set of 500 markers for 200 individuals
Expand All @@ -61,27 +61,27 @@ data(hexmarkers.overdisp)


###################################################
### code chunk number 8: polySegratioMM-overview.Rnw:154-155
### code chunk number 8: polySegratioMM-overview.Rnw:155-156
###################################################
sr.overdisp <- segregationRatios(hexmarkers.overdisp$markers)


###################################################
### code chunk number 9: polySegratioMM-overview.Rnw:160-163
### code chunk number 9: polySegratioMM-overview.Rnw:161-164
###################################################
print(plotTheoretical(ploidy.level=6, seg.ratios=sr.overdisp, main="",
expected.segratio=NULL, proportions=c(0.7,0.2,0.1),
n.individuals=200))


###################################################
### code chunk number 10: polySegratioMM-overview.Rnw:267-268
### code chunk number 10: polySegratioMM-overview.Rnw:268-269
###################################################
x.mod1 <- setModel(3,6) # autohexaploid model with 3 components


###################################################
### code chunk number 11: polySegratioMM-overview.Rnw:292-297
### code chunk number 11: polySegratioMM-overview.Rnw:293-298
###################################################
## produced using the following but loaded as data to avoid the run time on slow machines
##mcmcHexRun <- runSegratioMM(sr.overdisp, x.mod1, burn.in=200, sample=500, plots=FALSE)
Expand All @@ -91,43 +91,43 @@ data(mcmcHexRun)


###################################################
### code chunk number 12: polySegratioMM-overview.Rnw:308-309
### code chunk number 12: polySegratioMM-overview.Rnw:309-310
###################################################
print(mcmcHexRun$run.jags)


###################################################
### code chunk number 13: polySegratioMM-overview.Rnw:313-314
### code chunk number 13: polySegratioMM-overview.Rnw:314-315
###################################################
print(mcmcHexRun$summary)


###################################################
### code chunk number 14: polySegratioMM-overview.Rnw:321-322
### code chunk number 14: polySegratioMM-overview.Rnw:322-323
###################################################
print(mcmcHexRun$diagnostics)


###################################################
### code chunk number 15: polySegratioMM-overview.Rnw:326-327
### code chunk number 15: polySegratioMM-overview.Rnw:327-328
###################################################
print(mcmcHexRun$doses)


###################################################
### code chunk number 16: polySegratioMM-overview.Rnw:338-339
### code chunk number 16: polySegratioMM-overview.Rnw:339-340
###################################################
print(plot(mcmcHexRun$mcmc.mixture$mcmc.list[[1]][,c("P[1]","mu[1]","sigma","T[140]")]))


###################################################
### code chunk number 17: polySegratioMM-overview.Rnw:364-365
### code chunk number 17: polySegratioMM-overview.Rnw:365-366
###################################################
print(plot(mcmcHexRun, theoretical=TRUE, main=""))


###################################################
### code chunk number 18: polySegratioMM-overview.Rnw:396-400
### code chunk number 18: polySegratioMM-overview.Rnw:397-401
###################################################
cat("Employing maximum posterior probability\n")
table(Dose=mcmcHexRun$doses$max.post.dosage, exclude=NULL)
Expand All @@ -136,7 +136,7 @@ table(Dose=mcmcHexRun$doses$dosage[,"0.8"], exclude=NULL)


###################################################
### code chunk number 19: polySegratioMM-overview.Rnw:409-418
### code chunk number 19: polySegratioMM-overview.Rnw:410-419
###################################################
cat("Employing theChi squared test\n")
dose.chi <- test.segRatio(sr.overdisp, ploidy.level = 6)
Expand Down
9 changes: 5 additions & 4 deletions inst/doc/polySegratioMM-overview.Rnw
Expand Up @@ -54,10 +54,11 @@ distribution.

This library calls the \texttt{JAGS} software for Bayesian
calculation. \texttt{JAGS 1.0} or higher must be installed following
instructions from \url{http://www-fis.iarc.fr/~martyn/software/jags/}.
The \texttt{JAGS} executable must be in your path. Currently, no
checking is carried out to ascertain whether or not \texttt{JAGS} is
set up appropriately.
instructions from \url{http://mcmc-jags.sourceforge.net/}. Note that
only the most recent version is used for testing with \texttt{R}. The
\texttt{JAGS} executable must be in your path. Currently, no checking
is carried out to ascertain whether or not \texttt{JAGS} is set up
appropriately.

To use the library, you need to attach it with
<<>>=
Expand Down
Binary file modified inst/doc/polySegratioMM-overview.pdf
Binary file not shown.
9 changes: 4 additions & 5 deletions man/polySegratioMM-package.Rd
Expand Up @@ -3,7 +3,7 @@
\alias{polySegratioMM}
\docType{package}
\title{
Marker dosage for autoployploids by Bayesian mixture models
Bayesian Mixture Models for Marker Dosage in Autopolyploids
}
\description{
These functions provide tools for estimating marker dosage for
Expand All @@ -20,8 +20,8 @@ Marker dosage for autoployploids by Bayesian mixture models
\tabular{ll}{
Package: \tab polySegratioMM\cr
Type: \tab Package\cr
Version: \tab 0.6-2\cr
Date: \tab 2012-04-10\cr
Version: \tab 0.6-4\cr
Date: \tab 2018-03-22\cr
License: \tab GPL-3
}

Expand Down Expand Up @@ -74,8 +74,7 @@ segregation ratios and fitted mixture model on the logit scale.
autopolyploids. \emph{Journal of genetics} \bold{22} 359--372}
\item{Ripol, M I et al } { (1999) Statistical aspects of genetic mapping in
autopolyploids. \emph{Gene} \bold{235} 31--41 }
\item{JAGS} { \url{http://www-fis.iarc.fr/~martyn/software/jags/} and
\url{http://streaming.stat.iastate.edu/wiki/index.php/JAGS\_Guide}}
\item{JAGS} { \url{http://mcmc-jags.sourceforge.net/}}
}
}
\examples{
Expand Down

0 comments on commit 51d0a13

Please sign in to comment.