From 5e5560175da8d20a7ba9e5687ffc0021e318a03e Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Sun, 22 Sep 2024 07:23:14 +0800 Subject: [PATCH 01/11] fixing the cran issue --- DESCRIPTION | 4 ++-- man/DEploid-package.Rd | 9 +++++++++ src/DEploid/random/fastfunc.hpp | 4 ++-- src/RcppExports.cpp | 5 +++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index abe7dfc..5e0ec4a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: DEploid Type: Package Title: Deconvolute Mixed Genomes with Unknown Proportions -Version: 0.5.3 +Version: 0.5.4 Authors@R: c( person("Joe", "Zhu", role=c("aut", "cre", "cph"), email="sha.joe.zhu@gmail.com"), person('Jacob', 'Almagro-Garcia', role=c('aut', 'cph')), @@ -40,5 +40,5 @@ Suggests: SystemRequirements: C++11 VignetteBuilder: knitr LinkingTo: Rcpp -RoxygenNote: 7.1.0 +RoxygenNote: 7.3.2 Date: 2020-04-21 diff --git a/man/DEploid-package.Rd b/man/DEploid-package.Rd index 02fa781..a66116c 100644 --- a/man/DEploid-package.Rd +++ b/man/DEploid-package.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/dEploid.R \docType{package} \name{DEploid-package} +\alias{DEploid} \alias{DEploid-package} \title{Deconvolute Mixed Genomes with Unknown Proportions} \description{ @@ -16,6 +17,14 @@ extracted from patient blood sample, which often contains more than one parasite strain, with unknown proportions. This package is used for deconvoluting mixed haplotypes, #' and reporting the mixture proportions from each sample. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/DEploid-dev/DEploid-r} + \item Report bugs at \url{https://github.com/DEploid-dev/DEploid-r/issues} +} + } \author{ Zhu Sha diff --git a/src/DEploid/random/fastfunc.hpp b/src/DEploid/random/fastfunc.hpp index faa3ace..f0775d9 100644 --- a/src/DEploid/random/fastfunc.hpp +++ b/src/DEploid/random/fastfunc.hpp @@ -85,8 +85,8 @@ inline double FastFunc::fastexp_lo(double y) { inline double FastFunc::fastlog(double x) { const float offset = 2047; // as int64_t: 0x409ffc00000.... - double y = x; - int64_t* yint = (int64_t*)(&y); + //double y = x; int64_t* yint = reinterpret_cast(&y); + int64_t* yint = reinterpret_cast(&x); int expon = ((*yint) >> 52) - 1023; // base-2 exponent of float int index = ((*yint) >> (52-10)) & 1023; // upper 10 bits of mantissa *yint |= 0x7ffffc0000000000; // convert float into remainder of mantissa; and diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index 120b92e..ecb3afa 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -5,6 +5,11 @@ using namespace Rcpp; +#ifdef RCPP_USE_GLOBAL_ROSTREAM +Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); +Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); +#endif + // dEploid List dEploid(std::string args); RcppExport SEXP _DEploid_dEploid(SEXP argsSEXP) { From e1ee5d2ae1117acfab0446720670d026b7b70e2f Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Sun, 22 Sep 2024 07:54:00 +0800 Subject: [PATCH 02/11] tmp changes --- DESCRIPTION | 1 + NAMESPACE | 50 ++++++++++++++++++++++++++---------------- R/dEploid.R | 11 +++++++++- man/DEploid-package.Rd | 11 +--------- 4 files changed, 43 insertions(+), 30 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5e0ec4a..0072683 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -41,4 +41,5 @@ SystemRequirements: C++11 VignetteBuilder: knitr LinkingTo: Rcpp RoxygenNote: 7.3.2 +Encoding: UTF-8 Date: 2020-04-21 diff --git a/NAMESPACE b/NAMESPACE index 6ed6075..8be0da9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,26 +1,38 @@ -importFrom("scales", "alpha") -importFrom("grDevices", "rainbow", "colorRampPalette") -importFrom("graphics", "abline", "barplot", "hist", "plot", "points", "axis", "legend") -importFrom("utils", "read.table") -importFrom(Rcpp,evalCpp) -importFrom("magrittr", "%>%") -importFrom("plotly", "plot_ly", "layout", "add_trace") -importFrom("rmarkdown", "pandoc_available") -importFrom("htmlwidgets", "saveWidget") -useDynLib(DEploid, .registration = TRUE) +# Generated by roxygen2: do not edit by hand + +export(computeObsWSAF) export(dEploid) -export(extractVcf) -export(plotProportions) -export(extractCoverageFromVcf) export(extractCoverageFromTxt) +export(extractCoverageFromVcf) +export(extractPLAF) +export(extractVcf) export(haplotypePainter) -export(plotAltVsRef) -export(computeObsWSAF) export(histWSAF) -export(extractPLAF) -export(plotWSAFvsPLAF) -export(plotObsExpWSAF) +export(plotAltVsRef) export(plotAltVsRefPlotly) export(plotHistWSAFPlotly) -export(plotWSAFVsPLAFPlotly) +export(plotObsExpWSAF) export(plotObsExpWSAFPlotly) +export(plotProportions) +export(plotWSAFVsPLAFPlotly) +export(plotWSAFvsPLAF) +importFrom(Rcpp,evalCpp) +importFrom(grDevices,colorRampPalette) +importFrom(grDevices,rainbow) +importFrom(graphics,abline) +importFrom(graphics,axis) +importFrom(graphics,barplot) +importFrom(graphics,hist) +importFrom(graphics,legend) +importFrom(graphics,plot) +importFrom(graphics,points) +importFrom(htmlwidgets,saveWidget) +importFrom(magrittr,"%>%") +importFrom(plotly,add_trace) +importFrom(plotly,layout) +importFrom(plotly,plot_ly) +importFrom(rmarkdown,pandoc_available) +importFrom(scales,alpha) +importFrom(utils,read.table) +useDynLib("_DEploid_dEploid") +useDynLib("_DEploid_extractVcf") diff --git a/R/dEploid.R b/R/dEploid.R index d287b78..9c567ba 100644 --- a/R/dEploid.R +++ b/R/dEploid.R @@ -18,9 +18,18 @@ #' Maintainer: Joe Zhu \email{sha.joe.zhu@gmail.com} #' #' @name DEploid-package -#' @docType package +#' @docType _PACKAGE #' #' @importFrom Rcpp evalCpp +#' @importFrom scales alpha +#' @importFrom grDevices rainbow colorRampPalette +#' @importFrom graphics abline barplot hist plot points axis legend +#' @importFrom utils read.table +#' @importFrom magrittr %>% +#' @importFrom plotly plot_ly layout add_trace +#' @importFrom rmarkdown pandoc_available +#' @importFrom htmlwidgets saveWidget #' @useDynLib _DEploid_dEploid #' @useDynLib _DEploid_extractVcf NULL + diff --git a/man/DEploid-package.Rd b/man/DEploid-package.Rd index a66116c..cc94f45 100644 --- a/man/DEploid-package.Rd +++ b/man/DEploid-package.Rd @@ -1,8 +1,7 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/dEploid.R -\docType{package} +\docType{_PACKAGE} \name{DEploid-package} -\alias{DEploid} \alias{DEploid-package} \title{Deconvolute Mixed Genomes with Unknown Proportions} \description{ @@ -17,14 +16,6 @@ extracted from patient blood sample, which often contains more than one parasite strain, with unknown proportions. This package is used for deconvoluting mixed haplotypes, #' and reporting the mixture proportions from each sample. -} -\seealso{ -Useful links: -\itemize{ - \item \url{https://github.com/DEploid-dev/DEploid-r} - \item Report bugs at \url{https://github.com/DEploid-dev/DEploid-r/issues} -} - } \author{ Zhu Sha From 6cc6f86f0bd26ac2c62dcadd2583d6c36eecd962 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Sun, 13 Oct 2024 00:59:26 +0800 Subject: [PATCH 03/11] save changes --- .Rbuildignore | 2 +- .gitattributes | 0 .gitignore | 0 .gitmodules | 0 .lintr | 0 .travis.yml | 0 DESCRIPTION | 6 ++-- DEploid-r.Rproj | 0 LICENSE | 0 NAMESPACE | 3 +- NEWS.md | 0 R/DEploidR.R | 0 R/dEploid.R | 9 ++--- R/dEploidPlotly.R | 0 README.md | 0 appveyor.yml | 0 inst/CITATION | 0 inst/extdata/PG0390-C.test.alt | 0 inst/extdata/PG0390-C.test.ref | 0 inst/extdata/PG0390-C.test.vcf.gz | Bin inst/extdata/deploid.png | Bin inst/extdata/labStrains.test.PLAF.txt | 0 inst/extdata/labStrains.test.exclude.txt | 0 inst/extdata/labStrains.test.panel.txt | 0 man/DEploid-package.Rd | 34 ++++++++++++++++-- man/computeObsWSAF.Rd | 0 man/dEploid.Rd | 0 man/extractCoverageFromTxt.Rd | 0 man/extractCoverageFromVcf.Rd | 0 man/extractPLAF.Rd | 0 man/extractVcf.Rd | 0 man/haplotypePainter.Rd | 0 man/histWSAF.Rd | 0 man/plotAltVsRef.Rd | 0 man/plotAltVsRefPlotly.Rd | 0 man/plotHistWSAFPlotly.Rd | 0 man/plotObsExpWSAF.Rd | 0 man/plotObsExpWSAFPlotly.Rd | 0 man/plotProportions.Rd | 0 man/plotWSAFVsPLAFPlotly.Rd | 0 man/plotWSAFvsPLAF.Rd | 0 src/DEploid/chooseK.cpp | 0 src/DEploid/chooseK.hpp | 0 src/DEploid/codeCogs/asympt_expn.h | 0 src/DEploid/codeCogs/errorfn.h | 0 src/DEploid/codeCogs/errorfnc.h | 0 src/DEploid/codeCogs/errorfnc_exp.h | 0 src/DEploid/codeCogs/expx2.h | 0 src/DEploid/codeCogs/gamma.h | 0 src/DEploid/codeCogs/ln_add1.h | 0 src/DEploid/codeCogs/log_gamma.h | 0 src/DEploid/codeCogs/logbeta.h | 0 src/DEploid/codeCogs/loggammafrac.h | 0 src/DEploid/codeCogs/loggammasum.h | 0 src/DEploid/codeCogs/machine_epsilon.h | 0 src/DEploid/codeCogs/mersenne.hpp | 0 src/DEploid/codeCogs/poly_eval.h | 0 src/DEploid/codeCogs/randomSample.hpp | 0 src/DEploid/codeCogs/stirling.h | 0 src/DEploid/codeCogs/xsub_ln_add1.h | 0 src/DEploid/dEploidIO.cpp | 0 src/DEploid/dEploidIO.hpp | 0 src/DEploid/debug/mcmcDebug.cpp | 0 src/DEploid/debug/vcfReaderDebug.cpp | 0 src/DEploid/exceptions.hpp | 0 src/DEploid/export/dEploidIOExport.cpp | 0 .../export/dEploidIOExportPosteriorProb.cpp | 0 src/DEploid/export/writeMcmcRelated.cpp | 0 src/DEploid/global.hpp | 0 src/DEploid/gzstream/COPYING.LIB | 0 src/DEploid/gzstream/README | 0 src/DEploid/gzstream/gzstream.cpp | 0 src/DEploid/gzstream/gzstream.h | 0 src/DEploid/gzstream/index.html | 0 src/DEploid/gzstream/logo.gif | Bin src/DEploid/gzstream/test_gunzip.C | 0 src/DEploid/gzstream/test_gzip.C | 0 src/DEploid/ibd.cpp | 0 src/DEploid/ibd.hpp | 0 src/DEploid/lasso/dEploidLasso.cpp | 0 src/DEploid/lasso/dEploidLasso.hpp | 0 src/DEploid/lasso/dbgmacro.hpp | 0 src/DEploid/lasso/lasso.cpp | 0 src/DEploid/lasso/lasso.hpp | 0 src/DEploid/lasso/lassoDBG.cpp | 0 src/DEploid/lasso/src/dEploidLasso.cpp | 0 src/DEploid/lasso/src/dEploidLasso.hpp | 0 src/DEploid/lasso/src/dbgmacro.hpp | 0 src/DEploid/lasso/src/lasso.cpp | 0 src/DEploid/lasso/src/lasso.hpp | 0 src/DEploid/lasso/src/lassoDBG.cpp | 0 src/DEploid/lasso/src/lassoOut.cpp | 0 src/DEploid/mcmc.cpp | 0 src/DEploid/mcmc.hpp | 0 src/DEploid/panel.cpp | 0 src/DEploid/panel.hpp | 0 src/DEploid/random/fastfunc.cpp | 0 src/DEploid/random/fastfunc.hpp | 0 src/DEploid/random/mersenne_twister.cpp | 0 src/DEploid/random/mersenne_twister.hpp | 0 src/DEploid/random/random_generator.cpp | 0 src/DEploid/random/random_generator.hpp | 0 src/DEploid/txtReader.cpp | 0 src/DEploid/txtReader.hpp | 0 src/DEploid/updateHap.cpp | 0 src/DEploid/updateHap.hpp | 0 src/DEploid/utility.cpp | 0 src/DEploid/utility.hpp | 0 src/DEploid/variantIndex.cpp | 0 src/DEploid/variantIndex.hpp | 0 src/DEploid/vcfReader.cpp | 0 src/DEploid/vcfReader.hpp | 0 src/Makevars.win | 0 src/RcppExports.cpp | 0 src/dEploidr.cpp | 0 src/init.c | 0 src/r_random_generator.h | 0 src/rvcf.cpp | 0 src/test_exports.cpp | 0 tests/testthat.R | 0 tests/testthat/test-DEploid_tools.R | 0 tests/testthat/test-dEploid.R | 0 tests/testthat/test-r_random-generator.R | 0 vignettes/dEploid-Arguments.Rmd | 0 vignettes/dEploid-Arguments.Rmd.src | 0 125 files changed, 42 insertions(+), 12 deletions(-) mode change 100644 => 100755 .Rbuildignore mode change 100644 => 100755 .gitattributes mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .gitmodules mode change 100644 => 100755 .lintr mode change 100644 => 100755 .travis.yml mode change 100644 => 100755 DESCRIPTION mode change 100644 => 100755 DEploid-r.Rproj mode change 100644 => 100755 LICENSE mode change 100644 => 100755 NAMESPACE mode change 100644 => 100755 NEWS.md mode change 100644 => 100755 R/DEploidR.R mode change 100644 => 100755 R/dEploid.R mode change 100644 => 100755 R/dEploidPlotly.R mode change 100644 => 100755 README.md mode change 100644 => 100755 appveyor.yml mode change 100644 => 100755 inst/CITATION mode change 100644 => 100755 inst/extdata/PG0390-C.test.alt mode change 100644 => 100755 inst/extdata/PG0390-C.test.ref mode change 100644 => 100755 inst/extdata/PG0390-C.test.vcf.gz mode change 100644 => 100755 inst/extdata/deploid.png mode change 100644 => 100755 inst/extdata/labStrains.test.PLAF.txt mode change 100644 => 100755 inst/extdata/labStrains.test.exclude.txt mode change 100644 => 100755 inst/extdata/labStrains.test.panel.txt mode change 100644 => 100755 man/DEploid-package.Rd mode change 100644 => 100755 man/computeObsWSAF.Rd mode change 100644 => 100755 man/dEploid.Rd mode change 100644 => 100755 man/extractCoverageFromTxt.Rd mode change 100644 => 100755 man/extractCoverageFromVcf.Rd mode change 100644 => 100755 man/extractPLAF.Rd mode change 100644 => 100755 man/extractVcf.Rd mode change 100644 => 100755 man/haplotypePainter.Rd mode change 100644 => 100755 man/histWSAF.Rd mode change 100644 => 100755 man/plotAltVsRef.Rd mode change 100644 => 100755 man/plotAltVsRefPlotly.Rd mode change 100644 => 100755 man/plotHistWSAFPlotly.Rd mode change 100644 => 100755 man/plotObsExpWSAF.Rd mode change 100644 => 100755 man/plotObsExpWSAFPlotly.Rd mode change 100644 => 100755 man/plotProportions.Rd mode change 100644 => 100755 man/plotWSAFVsPLAFPlotly.Rd mode change 100644 => 100755 man/plotWSAFvsPLAF.Rd mode change 100644 => 100755 src/DEploid/chooseK.cpp mode change 100644 => 100755 src/DEploid/chooseK.hpp mode change 100644 => 100755 src/DEploid/codeCogs/asympt_expn.h mode change 100644 => 100755 src/DEploid/codeCogs/errorfn.h mode change 100644 => 100755 src/DEploid/codeCogs/errorfnc.h mode change 100644 => 100755 src/DEploid/codeCogs/errorfnc_exp.h mode change 100644 => 100755 src/DEploid/codeCogs/expx2.h mode change 100644 => 100755 src/DEploid/codeCogs/gamma.h mode change 100644 => 100755 src/DEploid/codeCogs/ln_add1.h mode change 100644 => 100755 src/DEploid/codeCogs/log_gamma.h mode change 100644 => 100755 src/DEploid/codeCogs/logbeta.h mode change 100644 => 100755 src/DEploid/codeCogs/loggammafrac.h mode change 100644 => 100755 src/DEploid/codeCogs/loggammasum.h mode change 100644 => 100755 src/DEploid/codeCogs/machine_epsilon.h mode change 100644 => 100755 src/DEploid/codeCogs/mersenne.hpp mode change 100644 => 100755 src/DEploid/codeCogs/poly_eval.h mode change 100644 => 100755 src/DEploid/codeCogs/randomSample.hpp mode change 100644 => 100755 src/DEploid/codeCogs/stirling.h mode change 100644 => 100755 src/DEploid/codeCogs/xsub_ln_add1.h mode change 100644 => 100755 src/DEploid/dEploidIO.cpp mode change 100644 => 100755 src/DEploid/dEploidIO.hpp mode change 100644 => 100755 src/DEploid/debug/mcmcDebug.cpp mode change 100644 => 100755 src/DEploid/debug/vcfReaderDebug.cpp mode change 100644 => 100755 src/DEploid/exceptions.hpp mode change 100644 => 100755 src/DEploid/export/dEploidIOExport.cpp mode change 100644 => 100755 src/DEploid/export/dEploidIOExportPosteriorProb.cpp mode change 100644 => 100755 src/DEploid/export/writeMcmcRelated.cpp mode change 100644 => 100755 src/DEploid/global.hpp mode change 100644 => 100755 src/DEploid/gzstream/COPYING.LIB mode change 100644 => 100755 src/DEploid/gzstream/README mode change 100644 => 100755 src/DEploid/gzstream/gzstream.cpp mode change 100644 => 100755 src/DEploid/gzstream/gzstream.h mode change 100644 => 100755 src/DEploid/gzstream/index.html mode change 100644 => 100755 src/DEploid/gzstream/logo.gif mode change 100644 => 100755 src/DEploid/gzstream/test_gunzip.C mode change 100644 => 100755 src/DEploid/gzstream/test_gzip.C mode change 100644 => 100755 src/DEploid/ibd.cpp mode change 100644 => 100755 src/DEploid/ibd.hpp mode change 100644 => 100755 src/DEploid/lasso/dEploidLasso.cpp mode change 100644 => 100755 src/DEploid/lasso/dEploidLasso.hpp mode change 100644 => 100755 src/DEploid/lasso/dbgmacro.hpp mode change 100644 => 100755 src/DEploid/lasso/lasso.cpp mode change 100644 => 100755 src/DEploid/lasso/lasso.hpp mode change 100644 => 100755 src/DEploid/lasso/lassoDBG.cpp mode change 100644 => 100755 src/DEploid/lasso/src/dEploidLasso.cpp mode change 100644 => 100755 src/DEploid/lasso/src/dEploidLasso.hpp mode change 100644 => 100755 src/DEploid/lasso/src/dbgmacro.hpp mode change 100644 => 100755 src/DEploid/lasso/src/lasso.cpp mode change 100644 => 100755 src/DEploid/lasso/src/lasso.hpp mode change 100644 => 100755 src/DEploid/lasso/src/lassoDBG.cpp mode change 100644 => 100755 src/DEploid/lasso/src/lassoOut.cpp mode change 100644 => 100755 src/DEploid/mcmc.cpp mode change 100644 => 100755 src/DEploid/mcmc.hpp mode change 100644 => 100755 src/DEploid/panel.cpp mode change 100644 => 100755 src/DEploid/panel.hpp mode change 100644 => 100755 src/DEploid/random/fastfunc.cpp mode change 100644 => 100755 src/DEploid/random/fastfunc.hpp mode change 100644 => 100755 src/DEploid/random/mersenne_twister.cpp mode change 100644 => 100755 src/DEploid/random/mersenne_twister.hpp mode change 100644 => 100755 src/DEploid/random/random_generator.cpp mode change 100644 => 100755 src/DEploid/random/random_generator.hpp mode change 100644 => 100755 src/DEploid/txtReader.cpp mode change 100644 => 100755 src/DEploid/txtReader.hpp mode change 100644 => 100755 src/DEploid/updateHap.cpp mode change 100644 => 100755 src/DEploid/updateHap.hpp mode change 100644 => 100755 src/DEploid/utility.cpp mode change 100644 => 100755 src/DEploid/utility.hpp mode change 100644 => 100755 src/DEploid/variantIndex.cpp mode change 100644 => 100755 src/DEploid/variantIndex.hpp mode change 100644 => 100755 src/DEploid/vcfReader.cpp mode change 100644 => 100755 src/DEploid/vcfReader.hpp mode change 100644 => 100755 src/Makevars.win mode change 100644 => 100755 src/RcppExports.cpp mode change 100644 => 100755 src/dEploidr.cpp mode change 100644 => 100755 src/init.c mode change 100644 => 100755 src/r_random_generator.h mode change 100644 => 100755 src/rvcf.cpp mode change 100644 => 100755 src/test_exports.cpp mode change 100644 => 100755 tests/testthat.R mode change 100644 => 100755 tests/testthat/test-DEploid_tools.R mode change 100644 => 100755 tests/testthat/test-dEploid.R mode change 100644 => 100755 tests/testthat/test-r_random-generator.R mode change 100644 => 100755 vignettes/dEploid-Arguments.Rmd mode change 100644 => 100755 vignettes/dEploid-Arguments.Rmd.src diff --git a/.Rbuildignore b/.Rbuildignore old mode 100644 new mode 100755 index 86f6727..229479e --- a/.Rbuildignore +++ b/.Rbuildignore @@ -2,7 +2,7 @@ ^.*\.Rproj$ ^\.Rproj\.user$ ^\.Rhistory$ -^tmp$ +^tmp.* ^NEWS\.md$ # bash scripts diff --git a/.gitattributes b/.gitattributes old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 diff --git a/.lintr b/.lintr old mode 100644 new mode 100755 diff --git a/.travis.yml b/.travis.yml old mode 100644 new mode 100755 diff --git a/DESCRIPTION b/DESCRIPTION old mode 100644 new mode 100755 index 0072683..c2fc659 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -4,8 +4,8 @@ Title: Deconvolute Mixed Genomes with Unknown Proportions Version: 0.5.4 Authors@R: c( person("Joe", "Zhu", role=c("aut", "cre", "cph"), email="sha.joe.zhu@gmail.com"), - person('Jacob', 'Almagro-Garcia', role=c('aut', 'cph')), - person('Gil', 'McVean', role=c('aut', 'cph')), + person('Jacob', 'Almagro-Garcia', role=c('aut')), + person('Gil', 'McVean', role=c('aut')), person('University of Oxford', '', role=c('cph')), person('Yinghan', 'Liu', role=c('ctb')), person('CodeCogs', 'Zyba Ltd', role=c('com', "cph")), @@ -42,4 +42,4 @@ VignetteBuilder: knitr LinkingTo: Rcpp RoxygenNote: 7.3.2 Encoding: UTF-8 -Date: 2020-04-21 +Date: 2024-10-8 diff --git a/DEploid-r.Rproj b/DEploid-r.Rproj old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/NAMESPACE b/NAMESPACE old mode 100644 new mode 100755 index 8be0da9..39e8bb6 --- a/NAMESPACE +++ b/NAMESPACE @@ -34,5 +34,4 @@ importFrom(plotly,plot_ly) importFrom(rmarkdown,pandoc_available) importFrom(scales,alpha) importFrom(utils,read.table) -useDynLib("_DEploid_dEploid") -useDynLib("_DEploid_extractVcf") +useDynLib(DEploid, .registration = TRUE) diff --git a/NEWS.md b/NEWS.md old mode 100644 new mode 100755 diff --git a/R/DEploidR.R b/R/DEploidR.R old mode 100644 new mode 100755 diff --git a/R/dEploid.R b/R/dEploid.R old mode 100644 new mode 100755 index 9c567ba..7ea0cf5 --- a/R/dEploid.R +++ b/R/dEploid.R @@ -1,3 +1,6 @@ +#' @keywords internal +"_PACKAGE" + #' Deconvolute Mixed Genomes with Unknown Proportions #' #' Traditional phasing programs are limited to diploid organisms. @@ -18,18 +21,16 @@ #' Maintainer: Joe Zhu \email{sha.joe.zhu@gmail.com} #' #' @name DEploid-package -#' @docType _PACKAGE #' #' @importFrom Rcpp evalCpp #' @importFrom scales alpha #' @importFrom grDevices rainbow colorRampPalette #' @importFrom graphics abline barplot hist plot points axis legend #' @importFrom utils read.table -#' @importFrom magrittr %>% +#' @importFrom magrittr %>% #' @importFrom plotly plot_ly layout add_trace #' @importFrom rmarkdown pandoc_available #' @importFrom htmlwidgets saveWidget -#' @useDynLib _DEploid_dEploid -#' @useDynLib _DEploid_extractVcf +#' @useDynLib DEploid, .registration = TRUE NULL diff --git a/R/dEploidPlotly.R b/R/dEploidPlotly.R old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/appveyor.yml b/appveyor.yml old mode 100644 new mode 100755 diff --git a/inst/CITATION b/inst/CITATION old mode 100644 new mode 100755 diff --git a/inst/extdata/PG0390-C.test.alt b/inst/extdata/PG0390-C.test.alt old mode 100644 new mode 100755 diff --git a/inst/extdata/PG0390-C.test.ref b/inst/extdata/PG0390-C.test.ref old mode 100644 new mode 100755 diff --git a/inst/extdata/PG0390-C.test.vcf.gz b/inst/extdata/PG0390-C.test.vcf.gz old mode 100644 new mode 100755 diff --git a/inst/extdata/deploid.png b/inst/extdata/deploid.png old mode 100644 new mode 100755 diff --git a/inst/extdata/labStrains.test.PLAF.txt b/inst/extdata/labStrains.test.PLAF.txt old mode 100644 new mode 100755 diff --git a/inst/extdata/labStrains.test.exclude.txt b/inst/extdata/labStrains.test.exclude.txt old mode 100644 new mode 100755 diff --git a/inst/extdata/labStrains.test.panel.txt b/inst/extdata/labStrains.test.panel.txt old mode 100644 new mode 100755 diff --git a/man/DEploid-package.Rd b/man/DEploid-package.Rd old mode 100644 new mode 100755 index cc94f45..dc7c63f --- a/man/DEploid-package.Rd +++ b/man/DEploid-package.Rd @@ -1,10 +1,13 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/dEploid.R -\docType{_PACKAGE} +\docType{package} \name{DEploid-package} +\alias{DEploid} \alias{DEploid-package} -\title{Deconvolute Mixed Genomes with Unknown Proportions} +\title{DEploid: Deconvolute Mixed Genomes with Unknown Proportions} \description{ +Traditional phasing programs are limited to diploid organisms. Our method modifies Li and Stephens algorithm with Markov chain Monte Carlo (MCMC) approaches, and builds a generic framework that allows haplotype searches in a multiple infection setting. This package is primarily developed as part of the Pf3k project, which is a global collaboration using the latest sequencing technologies to provide a high-resolution view of natural variation in the malaria parasite Plasmodium falciparum. Parasite DNA are extracted from patient blood sample, which often contains more than one parasite strain, with unknown proportions. This package is used for deconvoluting mixed haplotypes, and reporting the mixture proportions from each sample. + Traditional phasing programs are limited to diploid organisms. Our method modifies Li and Stephens algorithm with Markov chain Monte Carlo (MCMC) approaches, and builds a generic framework that allows haplotype @@ -16,9 +19,36 @@ extracted from patient blood sample, which often contains more than one parasite strain, with unknown proportions. This package is used for deconvoluting mixed haplotypes, #' and reporting the mixture proportions from each sample. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/DEploid-dev/DEploid-r} + \item Report bugs at \url{https://github.com/DEploid-dev/DEploid-r/issues} +} + } \author{ +\strong{Maintainer}: Joe Zhu \email{sha.joe.zhu@gmail.com} [copyright holder] + +Authors: +\itemize{ + \item Jacob Almagro-Garcia + \item Gil McVean +} + +Other contributors: +\itemize{ + \item University of Oxford [copyright holder] + \item Yinghan Liu [contributor] + \item CodeCogs Zyba Ltd [compiler, copyright holder] + \item Deepak Bandyopadhyay [compiler, copyright holder] + \item Lutz Kettner [compiler, copyright holder] +} + + Zhu Sha Maintainer: Joe Zhu \email{sha.joe.zhu@gmail.com} } +\keyword{internal} diff --git a/man/computeObsWSAF.Rd b/man/computeObsWSAF.Rd old mode 100644 new mode 100755 diff --git a/man/dEploid.Rd b/man/dEploid.Rd old mode 100644 new mode 100755 diff --git a/man/extractCoverageFromTxt.Rd b/man/extractCoverageFromTxt.Rd old mode 100644 new mode 100755 diff --git a/man/extractCoverageFromVcf.Rd b/man/extractCoverageFromVcf.Rd old mode 100644 new mode 100755 diff --git a/man/extractPLAF.Rd b/man/extractPLAF.Rd old mode 100644 new mode 100755 diff --git a/man/extractVcf.Rd b/man/extractVcf.Rd old mode 100644 new mode 100755 diff --git a/man/haplotypePainter.Rd b/man/haplotypePainter.Rd old mode 100644 new mode 100755 diff --git a/man/histWSAF.Rd b/man/histWSAF.Rd old mode 100644 new mode 100755 diff --git a/man/plotAltVsRef.Rd b/man/plotAltVsRef.Rd old mode 100644 new mode 100755 diff --git a/man/plotAltVsRefPlotly.Rd b/man/plotAltVsRefPlotly.Rd old mode 100644 new mode 100755 diff --git a/man/plotHistWSAFPlotly.Rd b/man/plotHistWSAFPlotly.Rd old mode 100644 new mode 100755 diff --git a/man/plotObsExpWSAF.Rd b/man/plotObsExpWSAF.Rd old mode 100644 new mode 100755 diff --git a/man/plotObsExpWSAFPlotly.Rd b/man/plotObsExpWSAFPlotly.Rd old mode 100644 new mode 100755 diff --git a/man/plotProportions.Rd b/man/plotProportions.Rd old mode 100644 new mode 100755 diff --git a/man/plotWSAFVsPLAFPlotly.Rd b/man/plotWSAFVsPLAFPlotly.Rd old mode 100644 new mode 100755 diff --git a/man/plotWSAFvsPLAF.Rd b/man/plotWSAFvsPLAF.Rd old mode 100644 new mode 100755 diff --git a/src/DEploid/chooseK.cpp b/src/DEploid/chooseK.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/chooseK.hpp b/src/DEploid/chooseK.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/asympt_expn.h b/src/DEploid/codeCogs/asympt_expn.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/errorfn.h b/src/DEploid/codeCogs/errorfn.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/errorfnc.h b/src/DEploid/codeCogs/errorfnc.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/errorfnc_exp.h b/src/DEploid/codeCogs/errorfnc_exp.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/expx2.h b/src/DEploid/codeCogs/expx2.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/gamma.h b/src/DEploid/codeCogs/gamma.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/ln_add1.h b/src/DEploid/codeCogs/ln_add1.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/log_gamma.h b/src/DEploid/codeCogs/log_gamma.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/logbeta.h b/src/DEploid/codeCogs/logbeta.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/loggammafrac.h b/src/DEploid/codeCogs/loggammafrac.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/loggammasum.h b/src/DEploid/codeCogs/loggammasum.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/machine_epsilon.h b/src/DEploid/codeCogs/machine_epsilon.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/mersenne.hpp b/src/DEploid/codeCogs/mersenne.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/poly_eval.h b/src/DEploid/codeCogs/poly_eval.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/randomSample.hpp b/src/DEploid/codeCogs/randomSample.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/stirling.h b/src/DEploid/codeCogs/stirling.h old mode 100644 new mode 100755 diff --git a/src/DEploid/codeCogs/xsub_ln_add1.h b/src/DEploid/codeCogs/xsub_ln_add1.h old mode 100644 new mode 100755 diff --git a/src/DEploid/dEploidIO.cpp b/src/DEploid/dEploidIO.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/dEploidIO.hpp b/src/DEploid/dEploidIO.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/debug/mcmcDebug.cpp b/src/DEploid/debug/mcmcDebug.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/debug/vcfReaderDebug.cpp b/src/DEploid/debug/vcfReaderDebug.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/exceptions.hpp b/src/DEploid/exceptions.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/export/dEploidIOExport.cpp b/src/DEploid/export/dEploidIOExport.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/export/dEploidIOExportPosteriorProb.cpp b/src/DEploid/export/dEploidIOExportPosteriorProb.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/export/writeMcmcRelated.cpp b/src/DEploid/export/writeMcmcRelated.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/global.hpp b/src/DEploid/global.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/gzstream/COPYING.LIB b/src/DEploid/gzstream/COPYING.LIB old mode 100644 new mode 100755 diff --git a/src/DEploid/gzstream/README b/src/DEploid/gzstream/README old mode 100644 new mode 100755 diff --git a/src/DEploid/gzstream/gzstream.cpp b/src/DEploid/gzstream/gzstream.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/gzstream/gzstream.h b/src/DEploid/gzstream/gzstream.h old mode 100644 new mode 100755 diff --git a/src/DEploid/gzstream/index.html b/src/DEploid/gzstream/index.html old mode 100644 new mode 100755 diff --git a/src/DEploid/gzstream/logo.gif b/src/DEploid/gzstream/logo.gif old mode 100644 new mode 100755 diff --git a/src/DEploid/gzstream/test_gunzip.C b/src/DEploid/gzstream/test_gunzip.C old mode 100644 new mode 100755 diff --git a/src/DEploid/gzstream/test_gzip.C b/src/DEploid/gzstream/test_gzip.C old mode 100644 new mode 100755 diff --git a/src/DEploid/ibd.cpp b/src/DEploid/ibd.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/ibd.hpp b/src/DEploid/ibd.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/dEploidLasso.cpp b/src/DEploid/lasso/dEploidLasso.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/dEploidLasso.hpp b/src/DEploid/lasso/dEploidLasso.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/dbgmacro.hpp b/src/DEploid/lasso/dbgmacro.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/lasso.cpp b/src/DEploid/lasso/lasso.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/lasso.hpp b/src/DEploid/lasso/lasso.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/lassoDBG.cpp b/src/DEploid/lasso/lassoDBG.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/src/dEploidLasso.cpp b/src/DEploid/lasso/src/dEploidLasso.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/src/dEploidLasso.hpp b/src/DEploid/lasso/src/dEploidLasso.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/src/dbgmacro.hpp b/src/DEploid/lasso/src/dbgmacro.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/src/lasso.cpp b/src/DEploid/lasso/src/lasso.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/src/lasso.hpp b/src/DEploid/lasso/src/lasso.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/src/lassoDBG.cpp b/src/DEploid/lasso/src/lassoDBG.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/lasso/src/lassoOut.cpp b/src/DEploid/lasso/src/lassoOut.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/mcmc.cpp b/src/DEploid/mcmc.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/mcmc.hpp b/src/DEploid/mcmc.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/panel.cpp b/src/DEploid/panel.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/panel.hpp b/src/DEploid/panel.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/random/fastfunc.cpp b/src/DEploid/random/fastfunc.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/random/fastfunc.hpp b/src/DEploid/random/fastfunc.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/random/mersenne_twister.cpp b/src/DEploid/random/mersenne_twister.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/random/mersenne_twister.hpp b/src/DEploid/random/mersenne_twister.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/random/random_generator.cpp b/src/DEploid/random/random_generator.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/random/random_generator.hpp b/src/DEploid/random/random_generator.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/txtReader.cpp b/src/DEploid/txtReader.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/txtReader.hpp b/src/DEploid/txtReader.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/updateHap.cpp b/src/DEploid/updateHap.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/updateHap.hpp b/src/DEploid/updateHap.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/utility.cpp b/src/DEploid/utility.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/utility.hpp b/src/DEploid/utility.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/variantIndex.cpp b/src/DEploid/variantIndex.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/variantIndex.hpp b/src/DEploid/variantIndex.hpp old mode 100644 new mode 100755 diff --git a/src/DEploid/vcfReader.cpp b/src/DEploid/vcfReader.cpp old mode 100644 new mode 100755 diff --git a/src/DEploid/vcfReader.hpp b/src/DEploid/vcfReader.hpp old mode 100644 new mode 100755 diff --git a/src/Makevars.win b/src/Makevars.win old mode 100644 new mode 100755 diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp old mode 100644 new mode 100755 diff --git a/src/dEploidr.cpp b/src/dEploidr.cpp old mode 100644 new mode 100755 diff --git a/src/init.c b/src/init.c old mode 100644 new mode 100755 diff --git a/src/r_random_generator.h b/src/r_random_generator.h old mode 100644 new mode 100755 diff --git a/src/rvcf.cpp b/src/rvcf.cpp old mode 100644 new mode 100755 diff --git a/src/test_exports.cpp b/src/test_exports.cpp old mode 100644 new mode 100755 diff --git a/tests/testthat.R b/tests/testthat.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-DEploid_tools.R b/tests/testthat/test-DEploid_tools.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-dEploid.R b/tests/testthat/test-dEploid.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-r_random-generator.R b/tests/testthat/test-r_random-generator.R old mode 100644 new mode 100755 diff --git a/vignettes/dEploid-Arguments.Rmd b/vignettes/dEploid-Arguments.Rmd old mode 100644 new mode 100755 diff --git a/vignettes/dEploid-Arguments.Rmd.src b/vignettes/dEploid-Arguments.Rmd.src old mode 100644 new mode 100755 From 43e9cbe00d14c0c1739c1a101b45474a117692e3 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Sun, 13 Oct 2024 13:27:57 +0000 Subject: [PATCH 04/11] close #73 --- src/Makevars.win | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Makevars.win b/src/Makevars.win index 976b8e8..aee6616 100755 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -23,6 +23,5 @@ OBJECTS.dEploid = DEploid/dEploidIO.o \ OBJECTS = $(OBJECTS.dEploidr) $(OBJECTS.dEploid) -CXX_STD = CXX11 PKG_CXXFLAGS = -I/usr/share/R/include/ -IDEploid/ -IDEploid/codeCogs/ -IDEploid/random/ -IDEploid/gzstream/ -IDEploid/lasso/ -DVERSION="\"R\"" -DRBUILD -DSTRICT_R_HEADERS PKG_LIBS = -lz From 89bff64de9f6a567bf0eb610eab46afe702f6f61 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Sun, 13 Oct 2024 23:27:13 +0800 Subject: [PATCH 05/11] change mode --- .github/.gitignore | 0 .github/workflows/R-CMD-check.yaml | 0 .github/workflows/pr-commands.yaml | 0 .github/workflows/test-coverage.yaml | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/.gitignore mode change 100644 => 100755 .github/workflows/R-CMD-check.yaml mode change 100644 => 100755 .github/workflows/pr-commands.yaml mode change 100644 => 100755 .github/workflows/test-coverage.yaml diff --git a/.github/.gitignore b/.github/.gitignore old mode 100644 new mode 100755 diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml old mode 100644 new mode 100755 diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml old mode 100644 new mode 100755 diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml old mode 100644 new mode 100755 From a0856ac732280c21f2aff06048c44b8e54cb0974 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 14 Oct 2024 00:27:11 +0800 Subject: [PATCH 06/11] update include --- src/DEploid/random/fastfunc.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DEploid/random/fastfunc.hpp b/src/DEploid/random/fastfunc.hpp index f0775d9..899564f 100755 --- a/src/DEploid/random/fastfunc.hpp +++ b/src/DEploid/random/fastfunc.hpp @@ -29,6 +29,7 @@ #include #include #include +#include // Number of interpolation points. If this is changed, several constants in fastlog must also be changed. From 0b24ffa039cae91a41b24a5f6c3bc63211c80b43 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 14 Oct 2024 00:31:15 +0800 Subject: [PATCH 07/11] drop c++11 --- DESCRIPTION | 1 - 1 file changed, 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index c2fc659..2cdd3af 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -37,7 +37,6 @@ Imports: Suggests: knitr, testthat (>= 0.9.0) -SystemRequirements: C++11 VignetteBuilder: knitr LinkingTo: Rcpp RoxygenNote: 7.3.2 From ce50e4e52fecfd65a93ca13625b12a6917c6d251 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 14 Oct 2024 00:41:45 +0800 Subject: [PATCH 08/11] close #71 --- README.md | 4 ++-- inst/CITATION | 2 +- src/RcppExports.cpp | 0 vignettes/dEploid-Arguments.Rmd | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) mode change 100755 => 100644 src/RcppExports.cpp diff --git a/README.md b/README.md index 6e74d40..9453a14 100755 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ [![License (GPL version 3)](https://img.shields.io/badge/license-GPL%20version%203-brightgreen.svg)](http://opensource.org/licenses/GPL-3.0) -[![Build Status](https://travis-ci.org/DEploid-dev/DEploid-r.svg?branch=master)](https://travis-ci.org/DEploid-dev/DEploid-r) +[![Build Status](https://travis-ci.org/DEploid-dev/DEploid-r.svg?branch=master)](https://app.travis-ci.com/DEploid-dev/DEploid-r) [![Build Status](https://ci.appveyor.com/api/projects/status/hi1nq97d5l68qs4r?svg=true)](https://ci.appveyor.com/project/shajoezhu/deploid-r) [![Coverage Status](https://coveralls.io/repos/github/DEploid-dev/DEploid-r/badge.svg?branch=master)](https://coveralls.io/github/DEploid-dev/DEploid-r?branch=master) -[![codecov](https://codecov.io/gh/DEploid-dev/DEploid-r/branch/master/graph/badge.svg)](https://codecov.io/gh/DEploid-dev/DEploid-r) +[![codecov](https://codecov.io/gh/DEploid-dev/DEploid-r/branch/master/graph/badge.svg)](https://app.codecov.io/gh/DEploid-dev/DEploid-r) [![CRAN RStudio Mirror Downloads](http://cranlogs.r-pkg.org/badges/DEploid)](https://cran.r-project.org/package=DEploid) DEploid R package -- Deconvolute Mixed Genomes with Unknown Proportions diff --git a/inst/CITATION b/inst/CITATION index 2acba60..1eb0f48 100755 --- a/inst/CITATION +++ b/inst/CITATION @@ -8,5 +8,5 @@ bibentry( journal = 'bioRxiv', doi = '10.1101/099499', publisher = 'Cold Spring Harbor Labs Journals', - url = 'http://www.biorxiv.org/content/early/2017/01/10/099499' + url = 'https://www.biorxiv.org/content/10.1101/099499v1' ) diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp old mode 100755 new mode 100644 diff --git a/vignettes/dEploid-Arguments.Rmd b/vignettes/dEploid-Arguments.Rmd index 8a9e17e..0b5f149 100755 --- a/vignettes/dEploid-Arguments.Rmd +++ b/vignettes/dEploid-Arguments.Rmd @@ -198,8 +198,8 @@ Bibtex record:: year = {2018}, doi = {10.1101/387266}, publisher = {Cold Spring Harbor Laboratory}, - URL = {https://www.biorxiv.org/content/early/2018/08/09/387266}, - eprint = {https://www.biorxiv.org/content/early/2018/08/09/387266.full.pdf}, + URL = {https://www.biorxiv.org/content/10.1101/387266v1}, + eprint = {https://www.biorxiv.org/content/biorxiv/early/2018/08/09/387266.full.pdf}, journal = {bioRxiv} } From 8a6f8b9699a1029b863878ebf9b736bdca493453 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 14 Oct 2024 00:47:49 +0800 Subject: [PATCH 09/11] update flag --- src/Makevars.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makevars.win b/src/Makevars.win index aee6616..cb5a270 100755 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -23,5 +23,5 @@ OBJECTS.dEploid = DEploid/dEploidIO.o \ OBJECTS = $(OBJECTS.dEploidr) $(OBJECTS.dEploid) -PKG_CXXFLAGS = -I/usr/share/R/include/ -IDEploid/ -IDEploid/codeCogs/ -IDEploid/random/ -IDEploid/gzstream/ -IDEploid/lasso/ -DVERSION="\"R\"" -DRBUILD -DSTRICT_R_HEADERS +PKG_CXXFLAGS = -I/usr/share/R/include/ -IDEploid/ -IDEploid/codeCogs/ -IDEploid/random/ -IDEploid/gzstream/ -IDEploid/lasso/ -DVERSION="\"R\"" -DRBUILD -DSTRICT_R_HEADERS -Wno-return-stack-address -Wno-strict-prototypes -Wno-bitwise-instead-of-logical PKG_LIBS = -lz From d2649ef84ef7a445cecf590d6820b7e0636225d4 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 14 Oct 2024 08:49:03 +0800 Subject: [PATCH 10/11] remove flaggs --- src/Makevars.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makevars.win b/src/Makevars.win index cb5a270..aee6616 100755 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -23,5 +23,5 @@ OBJECTS.dEploid = DEploid/dEploidIO.o \ OBJECTS = $(OBJECTS.dEploidr) $(OBJECTS.dEploid) -PKG_CXXFLAGS = -I/usr/share/R/include/ -IDEploid/ -IDEploid/codeCogs/ -IDEploid/random/ -IDEploid/gzstream/ -IDEploid/lasso/ -DVERSION="\"R\"" -DRBUILD -DSTRICT_R_HEADERS -Wno-return-stack-address -Wno-strict-prototypes -Wno-bitwise-instead-of-logical +PKG_CXXFLAGS = -I/usr/share/R/include/ -IDEploid/ -IDEploid/codeCogs/ -IDEploid/random/ -IDEploid/gzstream/ -IDEploid/lasso/ -DVERSION="\"R\"" -DRBUILD -DSTRICT_R_HEADERS PKG_LIBS = -lz From d5b24254d550ed9d9e48a2e941d0a035fbbeb989 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 14 Oct 2024 08:58:46 +0800 Subject: [PATCH 11/11] update fix #72 --- src/DEploid/dEploidIO.cpp | 6 +++--- src/DEploid/exceptions.hpp | 6 ++++-- src/DEploid/mcmc.cpp | 2 +- src/init.c | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/DEploid/dEploidIO.cpp b/src/DEploid/dEploidIO.cpp index e1a8270..8729c0c 100755 --- a/src/DEploid/dEploidIO.cpp +++ b/src/DEploid/dEploidIO.cpp @@ -190,7 +190,7 @@ void DEploidIO::reInit() { void DEploidIO::finalize() { - if ( this->doIbdPainting() | this->doComputeLLK() | this->doIbdViterbiPainting() ) { + if ( this->doIbdPainting() || this->doComputeLLK() || this->doIbdViterbiPainting() ) { if (!initialPropWasGiven()) { throw InitialPropUngiven(""); } @@ -541,7 +541,7 @@ void DEploidIO::checkInput() { // set k strain by proportion length } } - if (this->useBestPractice() & (!this->usePanel())){ + if (this->useBestPractice() && (!this->usePanel())){ throw FlagsConflict("-best" , string("-noPanel. Reference panel is") + string("required for using best-practices.")); } @@ -764,7 +764,7 @@ void DEploidIO::readPanel() { if ( this->usePanel() == false ) { return; } - if ( this->doIbdPainting() | this->doComputeLLK() ) { + if ( this->doIbdPainting() || this->doComputeLLK() ) { return; } diff --git a/src/DEploid/exceptions.hpp b/src/DEploid/exceptions.hpp index 0b4e1d6..51033dc 100755 --- a/src/DEploid/exceptions.hpp +++ b/src/DEploid/exceptions.hpp @@ -39,7 +39,8 @@ struct ShouldNotBeCalled : std::exception{ ShouldNotBeCalled() { } virtual ~ShouldNotBeCalled() throw() {} virtual const char* what() const noexcept { - return string("Should not reach here").c_str(); + static const std::string msg = "Should not reach here"; + return msg.c_str(); } }; @@ -75,7 +76,8 @@ struct OutOfVectorSize : std::exception{ OutOfVectorSize() { } virtual ~OutOfVectorSize() throw() {} virtual const char* what() const noexcept { - return string("Out of vector size!").c_str(); + static const std::string msg = "Out of vector size!"; + return msg.c_str(); } }; diff --git a/src/DEploid/mcmc.cpp b/src/DEploid/mcmc.cpp index 1ca2771..b9776b8 100755 --- a/src/DEploid/mcmc.cpp +++ b/src/DEploid/mcmc.cpp @@ -314,7 +314,7 @@ void McmcMachinery::runMcmcChain( bool showProgress, bool useIBD, bool notInR ) this->mcmcSample_->siteOfOneMissCopyOne[atSiteI] /= (double)this->maxIteration_; } - if ( notInR & ((jobbrief == "lassoK") | (jobbrief == "ibd") | (jobbrief == "classic")) ) { // notInPython + if ( notInR & ((jobbrief == "lassoK") || (jobbrief == "ibd") || (jobbrief == "classic")) ) { // notInPython this->dEploidIO_->writeMcmcRelated(this->mcmcSample_, jobbrief, useIBD); } diff --git a/src/init.c b/src/init.c index 3872b4b..ff1df69 100755 --- a/src/init.c +++ b/src/init.c @@ -10,9 +10,9 @@ /* .Call calls */ extern SEXP _DEploid_dEploid(SEXP); extern SEXP _DEploid_extractVcf(SEXP); -extern SEXP _DEploid_test_RRG_sample(); +extern SEXP _DEploid_test_RRG_sample(void); extern SEXP _DEploid_test_RRG_sampleExpoExpoLimit(SEXP, SEXP, SEXP); -extern SEXP _DEploid_test_RRG_sampleUnitExpo(); +extern SEXP _DEploid_test_RRG_sampleUnitExpo(void); static const R_CallMethodDef CallEntries[] = { {"_DEploid_dEploid", (DL_FUNC) &_DEploid_dEploid, 1},