diff --git a/.gitignore b/.gitignore index 32806e50a..20500edfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ *.sqlite *.sqlite-shm *.sqlite-wal +Error_log/* +export/* +Error_log/error.log +/Error_log +.Rproj.user \ No newline at end of file diff --git a/NOT-SCI-004 v004 CP-Seeker Documentation.pdf b/NOT-SCI-004 v004 CP-Seeker Documentation.pdf new file mode 100644 index 000000000..a3cabae72 Binary files /dev/null and b/NOT-SCI-004 v004 CP-Seeker Documentation.pdf differ diff --git a/R-Portable/library/Rcpp/CITATION b/R-Portable/library/Rcpp/CITATION index 6790cfd6b..3e5330e9e 100644 --- a/R-Portable/library/Rcpp/CITATION +++ b/R-Portable/library/Rcpp/CITATION @@ -9,13 +9,13 @@ citEntry(entry = "Article", volume = "40", number = "8", pages = "1--18", - url = "https://www.jstatsoft.org/v40/i08/", + url = "http://www.jstatsoft.org/v40/i08/", doi = "10.18637/jss.v040.i08", textVersion = paste("Dirk Eddelbuettel and Romain Francois (2011).", "Rcpp: Seamless R and C++ Integration.", "Journal of Statistical Software, 40(8), 1-18.", - "URL https://www.jstatsoft.org/v40/i08/.") + "URL http://www.jstatsoft.org/v40/i08/.") ) citEntry(entry = "Book", @@ -36,16 +36,17 @@ citEntry(entry = "Article", title = "{Extending \textit{R} with \textit{C++}: A Brief Introduction to \textit{Rcpp}}", author = personList(as.person("Dirk Eddelbuettel"), as.person("James Joseph Balamuta")), - journal = "The American Statistician", - year = "2018", - volume = "72", - number = "1", - pages = "28-36", - url = "https://doi.org/10.1080/00031305.2017.1375990", - doi = "10.1080/00031305.2017.1375990", + journal = "PeerJ Preprints", + year = "2017", + month = "aug", + volume = "5", + pages = "e3188v1", + issn = "2167-9843", + url = "https://doi.org/10.7287/peerj.preprints.3188v1", + doi = "10.7287/peerj.preprints.3188v1", - textVersion = paste("Dirk Eddelbuettel and James Joseph Balamuta (2018).", + textVersion = paste("Dirk Eddelbuettel and James Joseph Balamuta (2017).", "Extending R with C++: A Brief Introduction to Rcpp.", - "The American Statistician. 72(1).", - "URL https://doi.org/10.1080/00031305.2017.1375990.") + "PeerJ Preprints 5:e3188v1.", + "URL https://doi.org/10.7287/peerj.preprints.3188v1.") ) diff --git a/R-Portable/library/Rcpp/DESCRIPTION b/R-Portable/library/Rcpp/DESCRIPTION index 557c4e743..3ec4f4a46 100644 --- a/R-Portable/library/Rcpp/DESCRIPTION +++ b/R-Portable/library/Rcpp/DESCRIPTION @@ -1,7 +1,7 @@ Package: Rcpp Title: Seamless R and C++ Integration -Version: 1.0.6 -Date: 2021-01-14 +Version: 1.0.5 +Date: 2020-07-01 Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou, Nathan Russell, Douglas Bates and John Chambers Maintainer: Dirk Eddelbuettel @@ -10,7 +10,7 @@ Description: The 'Rcpp' package provides R functions as well as C++ classes whic mapped back and forth to C++ equivalents which facilitates both writing of new code as well as easier integration of third-party libraries. Documentation about 'Rcpp' is provided by several vignettes included in this package, via the - 'Rcpp Gallery' site at , the paper by Eddelbuettel and + 'Rcpp Gallery' site at , the paper by Eddelbuettel and Francois (2011, ), the book by Eddelbuettel (2013, ) and the paper by Eddelbuettel and Balamuta (2018, ); see 'citation("Rcpp")' for details. @@ -23,8 +23,8 @@ BugReports: https://github.com/RcppCore/Rcpp/issues MailingList: rcpp-devel@lists.r-forge.r-project.org RoxygenNote: 6.1.1 NeedsCompilation: yes -Packaged: 2021-01-14 13:44:02 UTC; edd +Packaged: 2020-07-01 16:50:09.72105 UTC; edd Repository: CRAN -Date/Publication: 2021-01-15 13:10:13 UTC -Built: R 3.6.3; x86_64-w64-mingw32; 2021-03-29 18:25:44 UTC; windows +Date/Publication: 2020-07-06 13:40:08 UTC +Built: R 3.6.3; x86_64-w64-mingw32; 2020-09-29 02:05:41 UTC; windows Archs: i386, x64 diff --git a/R-Portable/library/Rcpp/MD5 b/R-Portable/library/Rcpp/MD5 index 327c732dc..9d11419ac 100644 --- a/R-Portable/library/Rcpp/MD5 +++ b/R-Portable/library/Rcpp/MD5 @@ -1,46 +1,46 @@ -909ce7b3dde6a0e1f5dab6480f2d7530 *CITATION -8d09a2327be16a209d74a001f6cf9f9e *DESCRIPTION +25a5891b4f43e3a5075e0ba42ef9038f *CITATION +0e2db5ed59e21c22c8f3a241ca6bd2ea *DESCRIPTION 52f315c96cb329173cc129688e517054 *INDEX 7b23a06106f6d5236d0a24c79a062c8a *Meta/Rd.rds 145bf2c78f999791e0c372db36ed6d7a *Meta/features.rds 64aa3a1775d281cefae34b3f14062093 *Meta/hsearch.rds f2818e4a55f6d8d516f9944eb99d9ead *Meta/links.rds 87b1be2e5e02abd85e3931debf7103c2 *Meta/nsInfo.rds -469f59e53ac15d3b9dae639a8ac22550 *Meta/package.rds -195bdbc1709eb1cff9b906b21e17f48c *Meta/vignette.rds +199e63ddd041294f2ccdb45984fce1d7 *Meta/package.rds +0e02641cafc7dae8b51c3c9a6032db3e *Meta/vignette.rds f53ecd48407d7485920c4f3caaf187e0 *NAMESPACE -f07c709d0cc51b5eee1c4eea68da2b20 *NEWS.Rd +e164c945b123ab47c983885dda5b78fd *NEWS.Rd ebf0fc819595d631b8bf280c4b049940 *R/Rcpp -127de8a3df76461023f2acf7219d389f *R/Rcpp.rdb -97065d962feac025117a48c577e95aa6 *R/Rcpp.rdx +cd317eafeb1003c6b1244c97abe7aed7 *R/Rcpp.rdb +0d95b5c49d103528a5af140daf4c1ece *R/Rcpp.rdx 7a9967333ad85931cc6d2051f4dff76e *announce/ANNOUNCE-0.10.0.txt 734d037a2ac31af4659fb3b2e1a778ad *announce/ANNOUNCE-0.11.0.txt 7d85af8d096e473821a3f001d3128b01 *announce/ANNOUNCE-0.6.0.txt f61c7e9e1460eac25702b24c1af30442 *announce/ANNOUNCE-0.7.0.txt a198e05a9b004dfc1f8ea67629f2f6c7 *announce/ANNOUNCE-0.8.0.txt 3e8a171f22548f5da208b58e66b48e6c *announce/ANNOUNCE-0.9.0.txt -0edae2bc455d59ae99aba6e740823be3 *bib/Rcpp.bib +06ef1a21ba3e734033e01856442c19dc *bib/Rcpp.bib 6f1e3b1f4f75e04af65bb9daf94e9630 *discovery/cxx0x.R 2baf167ce452976b0fcb43e44f566af7 *doc/Rcpp-FAQ.Rnw -850d57c4f7bccb2996fb603fa5e4c243 *doc/Rcpp-FAQ.pdf +6454095df84935512cc3dc9ff9488be7 *doc/Rcpp-FAQ.pdf 887250b7e0675b4a70d6eb1a4689080c *doc/Rcpp-attributes.Rnw -a25f7dca422420666fe7ee32f8189aba *doc/Rcpp-attributes.pdf +b8d2bb037dc71efcce2ca388347b9698 *doc/Rcpp-attributes.pdf 37f50a136d1350e8e864c9265cc88ad8 *doc/Rcpp-extending.Rnw -52664d7e05479b51f33e59beb6cabf18 *doc/Rcpp-extending.pdf +88144d68099f176a9d831d184cdd2083 *doc/Rcpp-extending.pdf 90eade7bfffa82f250510759bc9a7f36 *doc/Rcpp-introduction.Rnw -315004ca4193dc40c7ee8ea75896f566 *doc/Rcpp-introduction.pdf +74e27370d204b72d4be878c15cfc4780 *doc/Rcpp-introduction.pdf e6cf1d12ce4e3a2fed6eddf6290d393f *doc/Rcpp-jss-2011.Rnw -d3c3db62ec2c2e722da18b224e3310fc *doc/Rcpp-jss-2011.pdf +e08797ec306d8ba3b88f673d2f6382a1 *doc/Rcpp-jss-2011.pdf 4524c2761e07e170f681181c2e62eb05 *doc/Rcpp-libraries.Rnw -624a8a2803996eacb7f34d2de64fecc9 *doc/Rcpp-libraries.pdf +ba968ba6279aad7499a2efd05b752576 *doc/Rcpp-libraries.pdf a96bcf4153b795bff19ddc36a17ca435 *doc/Rcpp-modules.Rnw -0ba84b54210761c60ff9504f0975c1d3 *doc/Rcpp-modules.pdf +4768e08c40a554d6a742053dc2de5416 *doc/Rcpp-modules.pdf 835d0e2dd365e4621663bd03ae219758 *doc/Rcpp-package.Rnw -02b9f36451343af84a495968232922ef *doc/Rcpp-package.pdf +6ec819890fc9385429fd78a03de9ac3e *doc/Rcpp-package.pdf d76adfdc4e68c69c5ff632e234db6a85 *doc/Rcpp-quickref.Rnw -6e4f4292306df94c460fc3307d695a2c *doc/Rcpp-quickref.pdf +8bee9ac1b620a69ea7ce7b8bb90fbef2 *doc/Rcpp-quickref.pdf 929a1aad762b7354b6875a35093ec477 *doc/Rcpp-sugar.Rnw -b1698db6d039ec991796a068962573ce *doc/Rcpp-sugar.pdf +647cf904c0c6b5a305b3755d5757e338 *doc/Rcpp-sugar.pdf 79a2c43b0ffea347abb61cf92f131e7e *doc/index.html 35fa971232b8c9fb0bbb9dfc2ad3de7a *examples/Attributes/Depends.cpp a9aa3aceea0b49525155a2c43296318b *examples/Attributes/Export.cpp @@ -99,15 +99,15 @@ f55a0d78225fef3970fc5f54fddb5801 *examples/functionCallback/newApiExample.r 2b3ff26140686d910b4fe51505b817a3 *examples/performance/extractors.R 33c7adefe3137cae65b189490c958c6a *examples/performance/performance.R bfb1013511641e19525df52e61532b31 *help/AnIndex -853255de1d603df2999de41f43883cd2 *help/Rcpp.rdb -eddce11d076a8898627b8593cbfd2478 *help/Rcpp.rdx +aea92b3221e905fc3b59fa9d9a751f5c *help/Rcpp.rdb +73fa2293c0f2ba5c4812f8379c5425c7 *help/Rcpp.rdx f0b7510ac9458c45baf1c1e586cdf34a *help/aliases.rds -0337cd0cbf990d7bfa354fa646f337b6 *help/paths.rds -00c451b62c25e96303c52167ee2fd32f *html/00Index.html +97c0bdc2d2047dbbdcd21580826b1e3d *help/paths.rds +3389b2b03294e456eafa058d96ac0701 *html/00Index.html b6763e6916890c631fdc3f2643803b1a *html/R.css 46bdb787a2fde9b6cd8ff24039e84aa0 *include/Rcpp.h 7acf90ededacb240b082c50653a1fe05 *include/Rcpp/Benchmark/Timer.h -ae223bb901fbed207125953034e3e00d *include/Rcpp/DataFrame.h +3c18e8397bad2ec1f7d8ac72e9744ccc *include/Rcpp/DataFrame.h e4195b2fee650b67d709d7bd529f3de6 *include/Rcpp/Dimension.h bed24a03d2f346377d351327e6ead507 *include/Rcpp/DottedPair.h 8ae8df6f92f7d17625b543348c9c035c *include/Rcpp/DottedPairImpl.h @@ -138,7 +138,7 @@ da9fbe7d88027204751989a252a8c545 *include/Rcpp/StringTransformer.h 016374544bddc85df03012bf1e70377c *include/Rcpp/Symbol.h 6370b5966cc98d3e684862425576275b *include/Rcpp/Vector.h eed9bf9af10a68be9cd55e5a5cdaa36a *include/Rcpp/WeakReference.h -d2eb203e5694514d6c2d33963548194a *include/Rcpp/XPtr.h +c83a55a7b4e022d4c13d25f34f8ed319 *include/Rcpp/XPtr.h 2eff8a753ede96fbcf538eab9eb22889 *include/Rcpp/algo.h 8945b9daf79dc522161d4738be104e8e *include/Rcpp/algorithm.h 3fa2caaea31d12b63d0a049c1da3c878 *include/Rcpp/api/bones/Date.h @@ -167,7 +167,7 @@ c9af45da88ea151bb2f8cd27900257e8 *include/Rcpp/api/meat/proxy.h 90c153091bc3fb1e123fef9dc40394e6 *include/Rcpp/barrier.h fa7b26bbe19f908b9c00ead2fe2717ac *include/Rcpp/clone.h 1b3b2bee1fc9bd3f231c2a33ca572281 *include/Rcpp/complex.h -af2ec1f1573e212b9005041b6bd2dc7d *include/Rcpp/config.h +83f938eef436dd8d4c807486c7ec8c21 *include/Rcpp/config.h b90e19134c5d4a4c0652f956c022d1e4 *include/Rcpp/date_datetime/Date.h e75130fc77dac6243e5c88639c940dea *include/Rcpp/date_datetime/Datetime.h 0d754f1a9266c3e1bbc6946ba1304ab5 *include/Rcpp/date_datetime/date_datetime.h @@ -183,7 +183,7 @@ fabe6bb18d2e4714327930f192754072 *include/Rcpp/exceptions/cpp11/exceptions.h b0b0b9732bb0201a5dbecefd41ed1a6f *include/Rcpp/generated/DottedPair__ctors.h 1a89560f0b3c22732c724c82f77bc711 *include/Rcpp/generated/Function__operator.h 89c6d03ae9bce1e1e7c694408cd71f4d *include/Rcpp/generated/InternalFunctionWithStdFunction_call.h -b8c60809df30845e119f0b477716bb65 *include/Rcpp/generated/InternalFunction__ctors.h +0d22b3726148557c2c9e2d400bf64d59 *include/Rcpp/generated/InternalFunction__ctors.h 89cb37088328001298a4ba18a4acd1d5 *include/Rcpp/generated/Language__ctors.h af099521f7cbf6024d6a6ce428861634 *include/Rcpp/generated/Pairlist__ctors.h 42e058cc4ef74a4b09e9d3b102cd417a *include/Rcpp/generated/Vector__create.h @@ -209,7 +209,7 @@ be267828e3e200668df1d37c3b90edd0 *include/Rcpp/internal/wrap.h 14b302e7f5cca681f122cccde5418cbd *include/Rcpp/internal/wrap_end.h 908081085f6e3f8414705dae4f2409df *include/Rcpp/iostream/Rstreambuf.h c852659f0876b4dd0a3d3d99e972d1cb *include/Rcpp/is.h -24e8a8c1f4a580954091edb9dae2cfd9 *include/Rcpp/lang.h +38702538aff2c6031c094ecdd79797c8 *include/Rcpp/lang.h d93f0f5c828018c1ae632ce1fb929293 *include/Rcpp/longlong.h 4e9effca3c5f2dabaa4e6aa478b67528 *include/Rcpp/macros/cat.hpp 623f4ca3111e4a28afe10133897a8f89 *include/Rcpp/macros/config.hpp @@ -239,7 +239,7 @@ f98a219d68a1c072d515e3dfd445b741 *include/Rcpp/module/Module_generated_class_sig 54bcedd25514753ee10ed273511f8bbd *include/Rcpp/module/Module_generated_function.h f34764fa42d6f6fc0904264099253778 *include/Rcpp/module/Module_generated_get_signature.h 2af8acdcd6b282fcad59eb353de02ca0 *include/Rcpp/module/Module_generated_method.h -d9cb32851ba55296536d06c3d61ae711 *include/Rcpp/module/class.h +ad5b1eeb562577cd67c7bf64b2d06fca *include/Rcpp/module/class.h b021df8570d99c4821e25c137aa45a01 *include/Rcpp/module/class_Base.h 99322cf8421a1cc8964659b05d79a906 *include/Rcpp/module/get_return_type.h 52cb1005938ee160ac29547e92d18584 *include/Rcpp/platform/compiler.h @@ -484,10 +484,10 @@ fe60090372703d0fd887c32e45f944a3 *include/Rcpp/vector/generic_proxy.h b53a80ae2aa1de12e8bd0fbff69c904b *include/Rcpp/vector/vector_from_string.h ebd0b9c6fb5eb68d51b288b0c9d1e2e4 *include/RcppCommon.h 83051c918c676565c50377280f3d80a9 *include/doxygen/Examples.h -9e14eed702abbb7743067a66b452f7d8 *libs/i386/Rcpp.dll -b627dbe575173e2f6bf2649c738ef45c *libs/i386/symbols.rds -97d8ef21711451cb6ec1e8b59059833b *libs/x64/Rcpp.dll -db8c9beef70366491da105aa3418f9ce *libs/x64/symbols.rds +7b9943de2b08f0e0276cd66dd10f5724 *libs/i386/Rcpp.dll +7fbf2dd1a214eb3a70eeddba827518db *libs/i386/symbols.rds +a0ba7fee6071f4a1f8b12928e631643a *libs/x64/Rcpp.dll +a8794b97b939e9a074b8651db63dfa04 *libs/x64/symbols.rds fc570e7927219c2ed9bdb13ca05134d9 *prompt/module.Rd e78047bdda3db5af33456370e65a98d0 *skeleton/Num.cpp ceccb01282e3e574aa78fec0102df6da *skeleton/Rcpp_modules_examples.Rd @@ -502,7 +502,7 @@ ceccb01282e3e574aa78fec0102df6da *skeleton/Rcpp_modules_examples.Rd 32a99eb2d472350734277940a2e2a1bb *skeleton/zzz.R 7fb9967c5d48052f8dc6167b1ee619d3 *tinytest/bin/amd64/r-cran-testrcpppackage_0.1.0-1_amd64.deb 56b8f712e86e0113715ead494065346e *tinytest/bin/i386/r-cran-testrcpppackage_0.1.0-1_i386.deb -97f2ea7f0dc305bbdc6c774e2c59a0e4 *tinytest/cpp/DataFrame.cpp +aab5200f97261529c39e8ed858b3013e *tinytest/cpp/DataFrame.cpp caded512e0425b790380edddc00967f4 *tinytest/cpp/Environment.cpp 378c5ca02f76666d28abc7f0f0bbb82a *tinytest/cpp/Exceptions_nocall.cpp b81bf018da788eadaf8f101144e1841b *tinytest/cpp/Function.cpp @@ -603,7 +603,7 @@ d43f4463ec22a001f10f70e5968b741e *tinytest/test_as.R 6fafd86f9d6036ddeec256f6520940fb *tinytest/test_attributes.R 645c61b59b44cf4a7d0a8935c94f30b8 *tinytest/test_binary_package.R 5c61d77db502333de43ef63ab5542947 *tinytest/test_client_package.R -d0d09861719ccd1cfe82a51584fe5422 *tinytest/test_dataframe.R +62d48e1a429755cf0da32248f45c7658 *tinytest/test_dataframe.R f45441d68b2e1de3f59da4f83e222e6e *tinytest/test_date.R f7020772ec2f52bca37aa52f328e8a4a *tinytest/test_dispatch.R 37c878dba3a8c6ee4a512d8ae49d0510 *tinytest/test_embedded_r.R diff --git a/R-Portable/library/Rcpp/Meta/package.rds b/R-Portable/library/Rcpp/Meta/package.rds index e3fc36320..a559bc6df 100644 Binary files a/R-Portable/library/Rcpp/Meta/package.rds and b/R-Portable/library/Rcpp/Meta/package.rds differ diff --git a/R-Portable/library/Rcpp/Meta/vignette.rds b/R-Portable/library/Rcpp/Meta/vignette.rds index 6223db000..c99cc80a9 100644 Binary files a/R-Portable/library/Rcpp/Meta/vignette.rds and b/R-Portable/library/Rcpp/Meta/vignette.rds differ diff --git a/R-Portable/library/Rcpp/NEWS.Rd b/R-Portable/library/Rcpp/NEWS.Rd index f2b9e0ea1..c28a88565 100644 --- a/R-Portable/library/Rcpp/NEWS.Rd +++ b/R-Portable/library/Rcpp/NEWS.Rd @@ -3,40 +3,6 @@ \newcommand{\ghpr}{\href{https://github.com/RcppCore/Rcpp/pull/#1}{##1}} \newcommand{\ghit}{\href{https://github.com/RcppCore/Rcpp/issues/#1}{##1}} -\section{Changes in Rcpp patch release version 1.0.6 (2021-01-14)}{ - \itemize{ - \item Changes in Rcpp API: - \itemize{ - \item Replace remaining few uses of \code{EXTPTR_PTR} with - \code{R_ExternalPtrAddr} (Kevin in \ghpr{1098} fixing - \ghit{1097}). - \item Add \code{push_back} and \code{push_front} for - \code{DataFrame} (Walter Somerville in \ghpr{1099} fixing - \ghit{1094}). - \item Remove a misleading-to-wrong comment (Mattias Ellert in - \ghpr{1109} cleaning up after \ghpr{1049}). - \item Address a sanitizer report by initializing two private - \code{bool} variables (Benjamin Christoffersen in \ghpr{1113}). - \item External pointer finalizer toggle default values were - corrected to true (Dirk in \ghpr{1115}). - } - \item Changes in Rcpp Documentation: - \itemize{ - \item Several URLs were updated to https and/or new addresses (Dirk). - } - \item Changes in Rcpp Deployment: - \itemize{ - \item Added GitHub Actions CI using the same container-based setup - used previously, and also carried code coverage over (Dirk in - \ghpr{1128}). - } - \item Changes in Rcpp support functions: - \itemize{ - \item \code{Rcpp.package.skeleton()} avoids warning from R. (Dirk) - } - } -} - \section{Changes in Rcpp patch release version 1.0.5 (2020-07-01)}{ \itemize{ \item Changes in Rcpp API: diff --git a/R-Portable/library/Rcpp/R/Rcpp.rdb b/R-Portable/library/Rcpp/R/Rcpp.rdb index 1e9cd044f..0fcf69a6a 100644 Binary files a/R-Portable/library/Rcpp/R/Rcpp.rdb and b/R-Portable/library/Rcpp/R/Rcpp.rdb differ diff --git a/R-Portable/library/Rcpp/R/Rcpp.rdx b/R-Portable/library/Rcpp/R/Rcpp.rdx index 24376bc5c..8c75bf8e0 100644 Binary files a/R-Portable/library/Rcpp/R/Rcpp.rdx and b/R-Portable/library/Rcpp/R/Rcpp.rdx differ diff --git a/R-Portable/library/Rcpp/bib/Rcpp.bib b/R-Portable/library/Rcpp/bib/Rcpp.bib index d6c17616e..96202cd99 100644 --- a/R-Portable/library/Rcpp/bib/Rcpp.bib +++ b/R-Portable/library/Rcpp/bib/Rcpp.bib @@ -76,16 +76,16 @@ @Manual{CRAN:BH title = {BH: Boost C++ Header Files}, author = {Dirk Eddelbuettel and John W. Emerson and Michael J. Kane}, - year = {2021}, - note = {R package version 1.75.0-0}, - url = CRAN # "package=BH" + year = {2019}, + note = {R package version 1.69.0-1}, + url = {https://CRAN.R-project.org/package=BH}, } @Manual{CRAN:Matrix, title = {\pkg{Matrix}: Sparse and Dense Matrix Classes and Methods}, author = {Douglas Bates and Martin Maechler}, - year = 2021, - note = {R package version 1.3-2}, + year = 2019, + note = {R package version 1.2-18}, url = CRAN # "package=Matrix" } @@ -101,7 +101,7 @@ @Manual{CRAN:RProtoBuf title = {RProtoBuf: R Interface to the Protocol Buffers API}, author = {Romain Fran\c{c}ois and Dirk Eddelbuettel and Murray Stokely and Jeroen Ooms}, year = 2020, - note = {R package version 0.4.17}, + note = {R package version 0.4.15}, url = CRAN # "package=RProtoBuf" } @@ -109,7 +109,7 @@ @Manual{CRAN:RQuantLib title = {RQuantLib: {R} interface to the {QuantLib} library}, author = {Dirk Eddelbuettel and Khanh Nguyen and Terry Leitch}, year = 2020, - note = {R package version 0.4.12}, + note = {R package version 0.4.11}, url = CRAN # "package=RQuantLib" } @@ -117,9 +117,9 @@ @Manual{CRAN:RUnit title = {RUnit: R Unit Test Framework}, author = {Matthias Burger and Klaus Juenemann and Thomas Koenig}, - year = 2018, - note = {R package version 0.4.32}, - url = CRAN # "package=RUnit" + year = 2015, + note = {R package version 0.4.31}, + url = {https://CRAN.R-project.org/package=RUnit}, } @Manual{CRAN:Rcpp, @@ -127,8 +127,8 @@ @Manual{CRAN:Rcpp author = {Dirk Eddelbuettel and Romain Fran\c{c}ois and JJ Allaire and Kevin Ushey and Qiang Kou and Nathan Russel and John Chambers and Douglas Bates}, - year = 2021, - note = {R package version 1.0.6}, + year = 2020, + note = {R package version 1.0.5}, url = CRAN # "package=Rcpp" } @@ -137,7 +137,7 @@ @Manual{CRAN:Rcpp:Attributes author = {J. J. Allaire and Dirk Eddelbuettel and Romain Fran\c{c}ois}, title = {{Rcpp} Attributes}, - year = 2021, + year = 2020, note = {Vignette included in R package Rcpp}, url = CRAN # "package=Rcpp" } @@ -146,7 +146,7 @@ @Manual{CRAN:Rcpp:FAQ crossref = {CRAN:Rcpp}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, title = {Frequently Asked Questions About {Rcpp}}, - year = 2021, + year = 2020, note = {Vignette included in R package {Rcpp}}, url = CRAN # "package=Rcpp" } @@ -155,7 +155,7 @@ @Manual{CRAN:Rcpp:Modules crossref = {CRAN:Rcpp}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, title = {Exposing {C++} functions and classes with {Rcpp} modules}, - year = 2021, + year = 2020, note = {Vignette included in R package Rcpp}, url = CRAN # "package=Rcpp" } @@ -164,7 +164,7 @@ @Manual{CRAN:Rcpp:Package crossref = {CRAN:Rcpp}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, title = {Writing a package that uses {Rcpp}}, - year = 2021, + year = 2020, note = {Vignette included in R package {Rcpp}}, url = CRAN # "package=Rcpp" } @@ -173,7 +173,7 @@ @Manual{CRAN:Rcpp:Sugar crossref = {CRAN:Rcpp}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, title = {Rcpp syntactic sugar}, - year = 2021, + year = 2020, note = {Vignette included in R package {Rcpp}}, url = CRAN # "package=Rcpp" } @@ -183,8 +183,8 @@ @Manual{CRAN:RcppArmadillo templated linear algebra library}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois and Douglas Bates and Binxiang Ni}, - year = 2021, - note = {R package version 0.10.1.2.2}, + year = 2020, + note = {R package version 0.9.850.1.0}, url = CRAN # "package=RcppArmadillo" } @@ -208,8 +208,8 @@ @Manual{CRAN:RcppEigen title = {RcppEigen: Rcpp integration for the Eigen templated linear algebra library}, author = {Douglas Bates and Dirk Eddelbuettel and Romain Fran\c{c}ois and Yixuan Qiu}, - year = 2020, - note = {{R} package version 0.3.3.9.1}, + year = 2019, + note = {{R} package version 0.3.3.7.0}, url = CRAN # "package=RcppEigen" } @@ -225,16 +225,16 @@ @Manual{CRAN:RcppExamples @Manual{CRAN:RcppGSL, title = {RcppGSL: Rcpp integration for GNU GSL vectors and matrices}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, - year = 2020, - note = {R package version 0.3.8}, + year = 2019, + note = {R package version 0.3.7}, url = CRAN # "package=RcppGSL" } @Manual{CRAN:RcppZiggurat, title = {RcppZiggurat: Rcpp Integration of Different Ziggurat Normal RNG Implementations}, author = {Dirk Eddelbuettel}, - year = 2020, - note = {R package version 0.1.6}, + year = 2018, + note = {R package version 0.1.5}, url = CRAN # "package=RcppZiggurat" } @@ -258,10 +258,10 @@ @Manual{CRAN:cxxPack @Manual{CRAN:devtools, title = {devtools: Tools to Make Developing R Packages Easier}, - author = {Hadley Wickham and Jim Hester and Winston Chang}, - year = 2020, - note = {R package version 2.3.2}, - url = CRAN # "package=devtools" + author = {Hadley Wickham and Winston Chang}, + year = 2016, + note = {R package version 1.12.0}, + url = {https://CRAN.R-project.org/package=devtools}, } @Manual{CRAN:highlight, @@ -273,30 +273,29 @@ @Manual{CRAN:highlight } @Manual{CRAN:inline, - title = {inline: Inline C, C++, Fortran function calls from + title = {inline: Inline C, C++, Fortran function calls from R}, - author = {Oleg Sklyar and Duncan Murdoch and Mike Smith and - Dirk Eddelbuettel and Romain Fran\c{c}ois and - Karline Soetaert and Johannes Ranke}, - year = 2020, - note = {R package version 0.3.17}, - url = CRAN # "package=inline" + author = {Oleg Sklyar and Duncan Murdoch and Mike Smith and + Dirk Eddelbuettel and Romain Fran\c{c}ois}, + year = 2018, + note = {R package version 0.3.15}, + url = CRAN # "package=inline" } @Manual{CRAN:littler, title = {littler: {R} at the {Command-Line} via r}, author = {Dirk Eddelbuettel and Jeffrey Horner}, - year = 2020, - note = {R package version 0.3.12}, + year = 2017, + note = {R package version 0.3.2}, url = CRAN # "package=littler" } @Manual{CRAN:microbenchmark, title = {microbenchmark: Accurate Timing Functions}, author = {Olaf Mersmann}, - year = 2019, - note = {R package version 1.4-7}, - url = CRAN # "package=microbenchmark" + year = 2015, + note = {R package version 1.4-2.1}, + url = {https://CRAN.R-project.org/package=microbenchmark} } @Manual{CRAN:minqa, @@ -313,17 +312,17 @@ @Manual{CRAN:pkgKitten title = {pkgKitten: Create Simple Packages Which Do not Upset R Package Checks}, author = {Dirk Eddelbuettel}, - year = {2020}, - note = {R package version 0.2.0}, + year = {2019}, + note = {R package version 0.1.5}, url = CRAN # "package=pkgKitten" } @Manual{CRAN:profvis, title = {profvis: Interactive Visualizations for Profiling R Code}, - author = {Winston Chang and Javier Luraschi and and Timothy Mastny}, - year = 2020, - note = {R package version 0.3.7}, - url = CRAN # "package=profvis" + author = {Winston Chang and Javier Luraschi}, + year = 2017, + note = {R package version 0.3.3}, + url = {https://CRAN.R-project.org/package=profvis}, } @Manual{CRAN:rbenchmark, @@ -336,9 +335,9 @@ @Manual{CRAN:rbenchmark @Manual{CRAN:roxygen2, title = {roxygen2: In-source documentation for R}, - author = {Hadley Wickham and Peter Danenberg and G\a'bor Cs\a'rdi and Manuel Eugster}, + author = {Hadley Wickham and Peter Danenberg and Manuel Eugster}, year = 2018, - note = {R package version 7.1.1}, + note = {R package version 6.1.1}, url = CRAN # "package=roxygen2" } diff --git a/R-Portable/library/Rcpp/doc/Rcpp-FAQ.pdf b/R-Portable/library/Rcpp/doc/Rcpp-FAQ.pdf index 75be2840f..04cff38c0 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-FAQ.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-FAQ.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-attributes.pdf b/R-Portable/library/Rcpp/doc/Rcpp-attributes.pdf index 493968320..4ec027029 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-attributes.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-attributes.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-extending.pdf b/R-Portable/library/Rcpp/doc/Rcpp-extending.pdf index 08b6344d7..118913ec5 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-extending.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-extending.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-introduction.pdf b/R-Portable/library/Rcpp/doc/Rcpp-introduction.pdf index 0042ddebf..ebfeaec10 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-introduction.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-introduction.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-jss-2011.pdf b/R-Portable/library/Rcpp/doc/Rcpp-jss-2011.pdf index e03045030..a8c7cd6b9 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-jss-2011.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-jss-2011.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-libraries.pdf b/R-Portable/library/Rcpp/doc/Rcpp-libraries.pdf index 1bf91d0ab..fbf756da1 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-libraries.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-libraries.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-modules.pdf b/R-Portable/library/Rcpp/doc/Rcpp-modules.pdf index 7a1e1f0be..85351e22c 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-modules.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-modules.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-package.pdf b/R-Portable/library/Rcpp/doc/Rcpp-package.pdf index 76f493865..5a3553495 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-package.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-package.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-quickref.pdf b/R-Portable/library/Rcpp/doc/Rcpp-quickref.pdf index af9dfb25a..924d2e121 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-quickref.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-quickref.pdf differ diff --git a/R-Portable/library/Rcpp/doc/Rcpp-sugar.pdf b/R-Portable/library/Rcpp/doc/Rcpp-sugar.pdf index a7a103eb5..fbd539517 100644 Binary files a/R-Portable/library/Rcpp/doc/Rcpp-sugar.pdf and b/R-Portable/library/Rcpp/doc/Rcpp-sugar.pdf differ diff --git a/R-Portable/library/Rcpp/help/Rcpp.rdb b/R-Portable/library/Rcpp/help/Rcpp.rdb index e3e6cd4e5..67c5df6a7 100644 Binary files a/R-Portable/library/Rcpp/help/Rcpp.rdb and b/R-Portable/library/Rcpp/help/Rcpp.rdb differ diff --git a/R-Portable/library/Rcpp/help/Rcpp.rdx b/R-Portable/library/Rcpp/help/Rcpp.rdx index 972ffe6dd..d47c59a44 100644 Binary files a/R-Portable/library/Rcpp/help/Rcpp.rdx and b/R-Portable/library/Rcpp/help/Rcpp.rdx differ diff --git a/R-Portable/library/Rcpp/help/paths.rds b/R-Portable/library/Rcpp/help/paths.rds index 1eae9309a..75cb1c861 100644 Binary files a/R-Portable/library/Rcpp/help/paths.rds and b/R-Portable/library/Rcpp/help/paths.rds differ diff --git a/R-Portable/library/Rcpp/html/00Index.html b/R-Portable/library/Rcpp/html/00Index.html index 0fbae1205..55f5df4bc 100644 --- a/R-Portable/library/Rcpp/html/00Index.html +++ b/R-Portable/library/Rcpp/html/00Index.html @@ -11,7 +11,7 @@

Seamless R and C++ Integration
[Up] [Top] -

Documentation for package ‘Rcpp’ version 1.0.6

+

Documentation for package ‘Rcpp’ version 1.0.5

  • DESCRIPTION file.
  • User guides, package vignettes and other documentation.
  • diff --git a/R-Portable/library/Rcpp/include/Rcpp/DataFrame.h b/R-Portable/library/Rcpp/include/Rcpp/DataFrame.h index 0c8ce6335..4e37081f3 100644 --- a/R-Portable/library/Rcpp/include/Rcpp/DataFrame.h +++ b/R-Portable/library/Rcpp/include/Rcpp/DataFrame.h @@ -83,30 +83,6 @@ namespace Rcpp{ return LENGTH(rn); } - template - void push_back( const T& object){ - Parent::push_back(object); - set_type_after_push(); - } - - template - void push_back( const T& object, const std::string& name ){ - Parent::push_back(object, name); - set_type_after_push(); - } - - template - void push_front( const T& object){ - Parent::push_front(object); - set_type_after_push(); - } - - template - void push_front( const T& object, const std::string& name){ - Parent::push_front(object, name); - set_type_after_push(); - } - // Offer multiple variants to accomodate both old interface here and signatures in other classes inline int nrows() const { return DataFrame_Impl::nrow(); } inline int rows() const { return DataFrame_Impl::nrow(); } @@ -130,30 +106,6 @@ namespace Rcpp{ } } - void set_type_after_push(){ - int max_rows = 0; - bool invalid_column_size = false; - SEXP data = Parent::get__(); - List::iterator it; - // Get the maximum number of rows - for (it = Parent::begin(); it != Parent::end(); ++it) { - if (Rf_xlength(*it) > max_rows) { - max_rows = Rf_xlength(*it); - } - } - for (it = Parent::begin(); it != Parent::end(); ++it) { - if (Rf_xlength(*it) == 0 || ( Rf_xlength(*it) > 1 && max_rows % Rf_xlength(*it) != 0 )) { - // We have a column that is not an integer fraction of the largest - invalid_column_size = true; - } - } - if (invalid_column_size) { - warning("Column sizes are not equal in DataFrame::push_back, object degrading to List\n"); - } else { - set__(Parent::get__()); - } - } - static DataFrame_Impl from_list( Parent obj ){ bool use_default_strings_as_factors = true ; bool strings_as_factors = true ; diff --git a/R-Portable/library/Rcpp/include/Rcpp/XPtr.h b/R-Portable/library/Rcpp/include/Rcpp/XPtr.h index eb4a6d48d..a06d18368 100644 --- a/R-Portable/library/Rcpp/include/Rcpp/XPtr.h +++ b/R-Portable/library/Rcpp/include/Rcpp/XPtr.h @@ -110,8 +110,8 @@ class XPtr : } XPtr& operator=(const XPtr& other) { - Storage::copy__(other); - return *this; + Storage::copy__(other); + return *this; } /** diff --git a/R-Portable/library/Rcpp/include/Rcpp/config.h b/R-Portable/library/Rcpp/include/Rcpp/config.h index a074619af..6a8ae7d21 100644 --- a/R-Portable/library/Rcpp/include/Rcpp/config.h +++ b/R-Portable/library/Rcpp/include/Rcpp/config.h @@ -1,7 +1,7 @@ // config.h: Rcpp R/C++ interface class library -- Rcpp configuration // -// Copyright (C) 2010 - 2021 Dirk Eddelbuettel and Romain Francois +// Copyright (C) 2010 - 2020 Dirk Eddelbuettel and Romain Francois // // This file is part of Rcpp. // @@ -26,11 +26,11 @@ #define RcppDevVersion(maj, min, rev, dev) (((maj)*1000000) + ((min)*10000) + ((rev)*100) + (dev)) // the currently released version -#define RCPP_VERSION Rcpp_Version(1,0,6) -#define RCPP_VERSION_STRING "1.0.6" +#define RCPP_VERSION Rcpp_Version(1,0,5) +#define RCPP_VERSION_STRING "1.0.5" // the current source snapshot -#define RCPP_DEV_VERSION RcppDevVersion(1,0,6,0) -#define RCPP_DEV_VERSION_STRING "1.0.6.0" +#define RCPP_DEV_VERSION RcppDevVersion(1,0,5,0) +#define RCPP_DEV_VERSION_STRING "1.0.5" #endif diff --git a/R-Portable/library/Rcpp/include/Rcpp/generated/InternalFunction__ctors.h b/R-Portable/library/Rcpp/include/Rcpp/generated/InternalFunction__ctors.h index a86ad3a0e..e2db17aec 100644 --- a/R-Portable/library/Rcpp/include/Rcpp/generated/InternalFunction__ctors.h +++ b/R-Portable/library/Rcpp/include/Rcpp/generated/InternalFunction__ctors.h @@ -1,9 +1,9 @@ - +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- +// // InternalFunction_Impl_ctors.h -- generated helper code for InternalFunction__ctors.h // see rcpp-scripts repo for generator script -// also hand-edited so check generator state // -// Copyright (C) 2010 - 2020 Dirk Eddelbuettel and Romain Francois +// Copyright (C) 2010 - 2014 Dirk Eddelbuettel and Romain Francois // // This file is part of Rcpp. // @@ -23,465 +23,468 @@ #ifndef Rcpp__generated__InternalFunction_Impl_ctors_h #define Rcpp__generated__InternalFunction_Impl_ctors_h + + template InternalFunction_Impl(RESULT_TYPE (*fun)(void)) { - set(XPtr >(new CppFunction0(fun), true)); + set(XPtr >(new CppFunction0(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0)) { - set(XPtr >(new CppFunction1(fun), true)); + set(XPtr >(new CppFunction1(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1)) { - set(XPtr >(new CppFunction2(fun), true)); + set(XPtr >(new CppFunction2(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2)) { - set(XPtr >(new CppFunction3(fun), true)); + set(XPtr >(new CppFunction3(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3)) { - set(XPtr >(new CppFunction4(fun), true)); + set(XPtr >(new CppFunction4(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4)) { - set(XPtr >(new CppFunction5(fun), true)); + set(XPtr >(new CppFunction5(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5)) { - set(XPtr >(new CppFunction6(fun), true)); + set(XPtr >(new CppFunction6(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6)) { - set(XPtr >(new CppFunction7(fun), true)); + set(XPtr >(new CppFunction7(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7)) { - set(XPtr >(new CppFunction8(fun), true)); + set(XPtr >(new CppFunction8(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8)) { - set(XPtr >(new CppFunction9(fun), true)); + set(XPtr >(new CppFunction9(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9)) { - set(XPtr >(new CppFunction10(fun), true)); + set(XPtr >(new CppFunction10(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10)) { - set(XPtr >(new CppFunction11(fun), true)); + set(XPtr >(new CppFunction11(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11)) { - set(XPtr >(new CppFunction12(fun), true)); + set(XPtr >(new CppFunction12(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12)) { - set(XPtr >(new CppFunction13(fun), true)); + set(XPtr >(new CppFunction13(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13)) { - set(XPtr >(new CppFunction14(fun), true)); + set(XPtr >(new CppFunction14(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14)) { - set(XPtr >(new CppFunction15(fun), true)); + set(XPtr >(new CppFunction15(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15)) { - set(XPtr >(new CppFunction16(fun), true)); + set(XPtr >(new CppFunction16(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16)) { - set(XPtr >(new CppFunction17(fun), true)); + set(XPtr >(new CppFunction17(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17)) { - set(XPtr >(new CppFunction18(fun), true)); + set(XPtr >(new CppFunction18(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18)) { - set(XPtr >(new CppFunction19(fun), true)); + set(XPtr >(new CppFunction19(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19)) { - set(XPtr >(new CppFunction20(fun), true)); + set(XPtr >(new CppFunction20(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20)) { - set(XPtr >(new CppFunction21(fun), true)); + set(XPtr >(new CppFunction21(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21)) { - set(XPtr >(new CppFunction22(fun), true)); + set(XPtr >(new CppFunction22(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22)) { - set(XPtr >(new CppFunction23(fun), true)); + set(XPtr >(new CppFunction23(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23)) { - set(XPtr >(new CppFunction24(fun), true)); + set(XPtr >(new CppFunction24(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24)) { - set(XPtr >(new CppFunction25(fun), true)); + set(XPtr >(new CppFunction25(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25)) { - set(XPtr >(new CppFunction26(fun), true)); + set(XPtr >(new CppFunction26(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26)) { - set(XPtr >(new CppFunction27(fun), true)); + set(XPtr >(new CppFunction27(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27)) { - set(XPtr >(new CppFunction28(fun), true)); + set(XPtr >(new CppFunction28(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28)) { - set(XPtr >(new CppFunction29(fun), true)); + set(XPtr >(new CppFunction29(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29)) { - set(XPtr >(new CppFunction30(fun), true)); + set(XPtr >(new CppFunction30(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30)) { - set(XPtr >(new CppFunction31(fun), true)); + set(XPtr >(new CppFunction31(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31)) { - set(XPtr >(new CppFunction32(fun), true)); + set(XPtr >(new CppFunction32(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32)) { - set(XPtr >(new CppFunction33(fun), true)); + set(XPtr >(new CppFunction33(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33)) { - set(XPtr >(new CppFunction34(fun), true)); + set(XPtr >(new CppFunction34(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34)) { - set(XPtr >(new CppFunction35(fun), true)); + set(XPtr >(new CppFunction35(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35)) { - set(XPtr >(new CppFunction36(fun), true)); + set(XPtr >(new CppFunction36(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36)) { - set(XPtr >(new CppFunction37(fun), true)); + set(XPtr >(new CppFunction37(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37)) { - set(XPtr >(new CppFunction38(fun), true)); + set(XPtr >(new CppFunction38(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38)) { - set(XPtr >(new CppFunction39(fun), true)); + set(XPtr >(new CppFunction39(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39)) { - set(XPtr >(new CppFunction40(fun), true)); + set(XPtr >(new CppFunction40(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40)) { - set(XPtr >(new CppFunction41(fun), true)); + set(XPtr >(new CppFunction41(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41)) { - set(XPtr >(new CppFunction42(fun), true)); + set(XPtr >(new CppFunction42(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42)) { - set(XPtr >(new CppFunction43(fun), true)); + set(XPtr >(new CppFunction43(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43)) { - set(XPtr >(new CppFunction44(fun), true)); + set(XPtr >(new CppFunction44(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44)) { - set(XPtr >(new CppFunction45(fun), true)); + set(XPtr >(new CppFunction45(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45)) { - set(XPtr >(new CppFunction46(fun), true)); + set(XPtr >(new CppFunction46(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46)) { - set(XPtr >(new CppFunction47(fun), true)); + set(XPtr >(new CppFunction47(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47)) { - set(XPtr >(new CppFunction48(fun), true)); + set(XPtr >(new CppFunction48(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48)) { - set(XPtr >(new CppFunction49(fun), true)); + set(XPtr >(new CppFunction49(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49)) { - set(XPtr >(new CppFunction50(fun), true)); + set(XPtr >(new CppFunction50(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50)) { - set(XPtr >(new CppFunction51(fun), true)); + set(XPtr >(new CppFunction51(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51)) { - set(XPtr >(new CppFunction52(fun), true)); + set(XPtr >(new CppFunction52(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52)) { - set(XPtr >(new CppFunction53(fun), true)); + set(XPtr >(new CppFunction53(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53)) { - set(XPtr >(new CppFunction54(fun), true)); + set(XPtr >(new CppFunction54(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54)) { - set(XPtr >(new CppFunction55(fun), true)); + set(XPtr >(new CppFunction55(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55)) { - set(XPtr >(new CppFunction56(fun), true)); + set(XPtr >(new CppFunction56(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56)) { - set(XPtr >(new CppFunction57(fun), true)); + set(XPtr >(new CppFunction57(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57)) { - set(XPtr >(new CppFunction58(fun), true)); + set(XPtr >(new CppFunction58(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58)) { - set(XPtr >(new CppFunction59(fun), true)); + set(XPtr >(new CppFunction59(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59)) { - set(XPtr >(new CppFunction60(fun), true)); + set(XPtr >(new CppFunction60(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60)) { - set(XPtr >(new CppFunction61(fun), true)); + set(XPtr >(new CppFunction61(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60, U61 u61)) { - set(XPtr >(new CppFunction62(fun), true)); + set(XPtr >(new CppFunction62(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60, U61 u61, U62 u62)) { - set(XPtr >(new CppFunction63(fun), true)); + set(XPtr >(new CppFunction63(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60, U61 u61, U62 u62, U63 u63)) { - set(XPtr >(new CppFunction64(fun), true)); + set(XPtr >(new CppFunction64(fun), false)); } template InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60, U61 u61, U62 u62, U63 u63, U64 u64)) { - set(XPtr >(new CppFunction65(fun), true)); + set(XPtr >(new CppFunction65(fun), false)); } #endif + diff --git a/R-Portable/library/Rcpp/include/Rcpp/lang.h b/R-Portable/library/Rcpp/include/Rcpp/lang.h index 8e9031acf..7b3ff72ae 100644 --- a/R-Portable/library/Rcpp/include/Rcpp/lang.h +++ b/R-Portable/library/Rcpp/include/Rcpp/lang.h @@ -61,13 +61,21 @@ inline SEXP Rcpp_list5(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4) { return x0; } -inline SEXP Rcpp_list6(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5) { + + +// `Rf_lang6()` is available on R 3.3, but `Rf_list6()` is not +inline SEXP Rcpp_list6( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5 ) +{ PROTECT(x0); x0 = Rf_cons(x0, Rcpp_list5(x1, x2, x3, x4, x5)); UNPROTECT(1); return x0; } + + + + inline SEXP Rcpp_list7( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6 ) { PROTECT(x0); @@ -84,6 +92,10 @@ inline SEXP Rcpp_lang7( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SE return x0; } + + + + inline SEXP Rcpp_list8( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7 ) { PROTECT(x0); @@ -100,6 +112,10 @@ inline SEXP Rcpp_lang8( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SE return x0; } + + + + inline SEXP Rcpp_list9( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8 ) { PROTECT(x0); @@ -116,6 +132,10 @@ inline SEXP Rcpp_lang9( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SE return x0; } + + + + inline SEXP Rcpp_list10( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9 ) { PROTECT(x0); @@ -132,6 +152,10 @@ inline SEXP Rcpp_lang10( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list11( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10 ) { PROTECT(x0); @@ -148,6 +172,10 @@ inline SEXP Rcpp_lang11( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list12( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11 ) { PROTECT(x0); @@ -164,6 +192,10 @@ inline SEXP Rcpp_lang12( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list13( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12 ) { PROTECT(x0); @@ -180,6 +212,10 @@ inline SEXP Rcpp_lang13( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list14( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13 ) { PROTECT(x0); @@ -196,6 +232,10 @@ inline SEXP Rcpp_lang14( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list15( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14 ) { PROTECT(x0); @@ -212,6 +252,10 @@ inline SEXP Rcpp_lang15( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list16( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15 ) { PROTECT(x0); @@ -228,6 +272,10 @@ inline SEXP Rcpp_lang16( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list17( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16 ) { PROTECT(x0); @@ -244,6 +292,10 @@ inline SEXP Rcpp_lang17( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list18( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17 ) { PROTECT(x0); @@ -260,6 +312,10 @@ inline SEXP Rcpp_lang18( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list19( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18 ) { PROTECT(x0); @@ -276,6 +332,10 @@ inline SEXP Rcpp_lang19( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S return x0; } + + + + inline SEXP Rcpp_list20( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19 ) { PROTECT(x0); diff --git a/R-Portable/library/Rcpp/include/Rcpp/module/class.h b/R-Portable/library/Rcpp/include/Rcpp/module/class.h index 815626440..c997bc2db 100644 --- a/R-Portable/library/Rcpp/include/Rcpp/module/class.h +++ b/R-Portable/library/Rcpp/include/Rcpp/module/class.h @@ -167,7 +167,7 @@ SEXP invoke( SEXP method_xp, SEXP object, SEXP *args, int nargs ){ BEGIN_RCPP - vec_signed_method* mets = reinterpret_cast< vec_signed_method* >( R_ExternalPtrAddr( method_xp ) ) ; + vec_signed_method* mets = reinterpret_cast< vec_signed_method* >( EXTPTR_PTR( method_xp ) ) ; typename vec_signed_method::iterator it = mets->begin() ; int n = mets->size() ; method_class* m = 0 ; @@ -194,7 +194,7 @@ SEXP invoke_void( SEXP method_xp, SEXP object, SEXP *args, int nargs ){ BEGIN_RCPP - vec_signed_method* mets = reinterpret_cast< vec_signed_method* >( R_ExternalPtrAddr( method_xp ) ) ; + vec_signed_method* mets = reinterpret_cast< vec_signed_method* >( EXTPTR_PTR( method_xp ) ) ; typename vec_signed_method::iterator it = mets->begin() ; int n = mets->size() ; method_class* m = 0 ; @@ -216,7 +216,7 @@ SEXP invoke_notvoid( SEXP method_xp, SEXP object, SEXP *args, int nargs ){ BEGIN_RCPP - vec_signed_method* mets = reinterpret_cast< vec_signed_method* >( R_ExternalPtrAddr( method_xp ) ) ; + vec_signed_method* mets = reinterpret_cast< vec_signed_method* >( EXTPTR_PTR( method_xp ) ) ; typename vec_signed_method::iterator it = mets->begin() ; int n = mets->size() ; method_class* m = 0 ; @@ -393,14 +393,14 @@ SEXP getProperty( SEXP field_xp , SEXP object) { BEGIN_RCPP - prop_class* prop = reinterpret_cast< prop_class* >( R_ExternalPtrAddr( field_xp ) ) ; + prop_class* prop = reinterpret_cast< prop_class* >( EXTPTR_PTR( field_xp ) ) ; return prop->get( XP(object) ); END_RCPP } void setProperty( SEXP field_xp, SEXP object, SEXP value) { BEGIN_RCPP - prop_class* prop = reinterpret_cast< prop_class* >( R_ExternalPtrAddr( field_xp ) ) ; + prop_class* prop = reinterpret_cast< prop_class* >( EXTPTR_PTR( field_xp ) ) ; return prop->set( XP(object), value ); VOID_END_RCPP } diff --git a/R-Portable/library/Rcpp/libs/i386/Rcpp.dll b/R-Portable/library/Rcpp/libs/i386/Rcpp.dll index e0f6f48df..8325be9c2 100644 Binary files a/R-Portable/library/Rcpp/libs/i386/Rcpp.dll and b/R-Portable/library/Rcpp/libs/i386/Rcpp.dll differ diff --git a/R-Portable/library/Rcpp/libs/i386/symbols.rds b/R-Portable/library/Rcpp/libs/i386/symbols.rds index 05c66520c..e199acb3f 100644 Binary files a/R-Portable/library/Rcpp/libs/i386/symbols.rds and b/R-Portable/library/Rcpp/libs/i386/symbols.rds differ diff --git a/R-Portable/library/Rcpp/libs/x64/Rcpp.dll b/R-Portable/library/Rcpp/libs/x64/Rcpp.dll index 900eb27c3..59f36b5c4 100644 Binary files a/R-Portable/library/Rcpp/libs/x64/Rcpp.dll and b/R-Portable/library/Rcpp/libs/x64/Rcpp.dll differ diff --git a/R-Portable/library/Rcpp/libs/x64/symbols.rds b/R-Portable/library/Rcpp/libs/x64/symbols.rds index c1d16dc7d..91ab4b561 100644 Binary files a/R-Portable/library/Rcpp/libs/x64/symbols.rds and b/R-Portable/library/Rcpp/libs/x64/symbols.rds differ diff --git a/R-Portable/library/Rcpp/tinytest/cpp/DataFrame.cpp b/R-Portable/library/Rcpp/tinytest/cpp/DataFrame.cpp index ef48e2572..9cc6f27f3 100644 --- a/R-Portable/library/Rcpp/tinytest/cpp/DataFrame.cpp +++ b/R-Portable/library/Rcpp/tinytest/cpp/DataFrame.cpp @@ -94,101 +94,3 @@ IntegerVector DataFrame_nrow( DataFrame df){ IntegerVector DataFrame_ncol( DataFrame df){ return IntegerVector::create(df.ncol(), df.cols()); } - -// [[Rcpp::export]] -DataFrame DataFrame_PushBackNamed(){ - NumericVector u(2); - NumericVector v(2); - DataFrame df = DataFrame::create(_["u"] = u); - df.push_back(v, "v"); - return df; -} - -// [[Rcpp::export]] -DataFrame DataFrame_PushBackUnnamed(){ - NumericVector u(2); - NumericVector v(2); - DataFrame df = DataFrame::create(_["u"] = u); - df.push_back(v); - return df; -} - -// [[Rcpp::export]] -DataFrame DataFrame_PushFrontNamed(){ - NumericVector u(2); - NumericVector v(2); - DataFrame df = DataFrame::create(_["u"] = u); - df.push_front(v, "v"); - return df; -} - -// [[Rcpp::export]] -DataFrame DataFrame_PushFrontUnnamed(){ - NumericVector u(2); - NumericVector v(2); - DataFrame df = DataFrame::create(_["u"] = u); - df.push_front(v); - return df; -} - -// [[Rcpp::export]] -DataFrame DataFrame_PushFrontDataFrame(){ - NumericVector u(2); - NumericVector v(2); - NumericVector w(2); - NumericVector x(2); - - DataFrame df1 = DataFrame::create(_["u"] = u, _["v"] = v); - DataFrame df2 = DataFrame::create(_["w"] = w, _["x"] = x); - df1.push_front(df2); - return df1; -} - -// [[Rcpp::export]] -DataFrame DataFrame_PushBackDataFrame(){ - NumericVector u(2); - NumericVector v(2); - NumericVector w(2); - NumericVector x(2); - - DataFrame df1 = DataFrame::create(_["u"] = u, _["v"] = v); - DataFrame df2 = DataFrame::create(_["w"] = w, _["x"] = x); - df1.push_back(df2); - return df1; -} - -// [[Rcpp::export]] -DataFrame DataFrame_PushWrongSize(){ - NumericVector u(2); - NumericVector v(3); - - DataFrame df1 = DataFrame::create(_["u"] = u); - df1.push_back(v); - return df1; -} - -// [[Rcpp::export]] -DataFrame DataFrame_PushReplicateLength(){ - NumericVector u(2); - NumericVector v(4); - NumericVector x(1); - - u[0] = 1; - x[0] = 2; - - DataFrame df1 = DataFrame::create(_["u"] = u); - df1.push_back(v, "v"); - df1.push_back(x, "x"); - return df1; -} - -// [[Rcpp::export]] -DataFrame DataFrame_PushZeroLength(){ - NumericVector u(2); - NumericVector v(0); - - - DataFrame df1 = DataFrame::create(_["u"] = u); - df1.push_back(v); - return df1; -} diff --git a/R-Portable/library/Rcpp/tinytest/test_dataframe.R b/R-Portable/library/Rcpp/tinytest/test_dataframe.R index a2cc420da..df9e8e343 100644 --- a/R-Portable/library/Rcpp/tinytest/test_dataframe.R +++ b/R-Portable/library/Rcpp/tinytest/test_dataframe.R @@ -70,46 +70,3 @@ expect_equal( DataFrame_nrow( df ), rep(nrow(df), 2) ) # test.DataFrame.ncol <- function(){ df <- data.frame( x = 1:10, y = 1:10 ) expect_equal( DataFrame_ncol( df ), rep(ncol(df), 2) ) - -# test.DataFrame.PushBackNamed <- function(){ -df <- data.frame( u = c(0, 0), v = c(0, 0) ) -expect_true( is.data.frame( DataFrame_PushBackNamed() ) ) -expect_equal( DataFrame_PushBackNamed(), df ) - -# test.DataFrame.PushBackUnamed <- function(){ -df <- data.frame( u = c(0, 0), c(0, 0) ) -expect_true( is.data.frame( DataFrame_PushBackUnnamed() ) ) -expect_equal( DataFrame_PushBackUnnamed(), df ) - -# test.DataFrame.PushFrontNamed <- function(){ -df <- data.frame( v = c(0, 0), u = c(0, 0) ) -expect_true( is.data.frame( DataFrame_PushFrontNamed() ) ) -expect_equal( DataFrame_PushFrontNamed(), df ) - -# test.DataFrame.PushFrontUnnamed <- function(){ -df <- data.frame( c(0, 0), u = c(0, 0) ) -expect_true( is.data.frame( DataFrame_PushFrontUnnamed() ) ) -expect_equal( DataFrame_PushFrontUnnamed(), df ) - - -# test.DataFrame.PushFrontDataFrame <- function(){ -df <- data.frame( w = c(0, 0), x = c(0, 0), u = c(0, 0), v = c(0, 0) ) -expect_true( is.data.frame( DataFrame_PushFrontDataFrame() ) ) -expect_equal( DataFrame_PushFrontDataFrame(), df ) - -# test.DataFrame.PushBackDataFrame <- function(){ -df <- data.frame( u = c(0, 0), v = c(0, 0), w = c(0, 0), x = c(0, 0) ) -expect_true( is.data.frame( DataFrame_PushBackDataFrame() ) ) -expect_equal( DataFrame_PushBackDataFrame(), df ) - -# test.DataFrame.PushWrongSize <- function(){ -df <- data.frame( u = c(0, 0), v = c(0, 0), w = c(0, 0), x = c(0, 0) ) -expect_warning( DataFrame_PushWrongSize() ) - -# test.DataFrame.PushReplicateLength <- function(){ -df <- data.frame( u = c(1, 0), v = c(0, 0, 0, 0), x = c(2) ) -expect_true( is.data.frame( DataFrame_PushReplicateLength() ) ) -expect_equal( DataFrame_PushReplicateLength(), df ) - -# test.DataFrame.PushZeroLength <- function(){ -expect_warning( DataFrame_PushZeroLength()) diff --git a/data/create_database.min.sql b/data/create_database.min.sql index 41bd37da3..e8d76fca8 100644 --- a/data/create_database.min.sql +++ b/data/create_database.min.sql @@ -3,4 +3,5 @@ CREATE TABLE `sample` ( `sample` TEXT, `raw_data` BLOB NOT NULL, `raw_path` TEXT CREATE TABLE `project_sample` ( `project_sample` INTEGER PRIMARY KEY AUTOINCREMENT, `project` INTEGER NOT NULL, `sample` TEXT NOT NULL, `sample_id` TEXT NOT NULL ); CREATE TABLE `project` ( `project` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `comments` TEXT, `creation` DATE, `modified` DATE ); CREATE TABLE `deconvolution_param` ( `deconvolution_param` INTEGER PRIMARY KEY AUTOINCREMENT, `project` INTEGER NOT NULL, `chemical_type` TEXT NOT NULL, `adduct` TEXT NOT NULL, `instrument` TEXT NOT NULL, `resolution` REAL, `resolution_mz` REAL, `resolution_index` INTEGER, `ppm` REAL NOT NULL, `mda` REAL NOT NULL, `peakwidth_min` REAL NOT NULL, `peakwidth_max` REAL NOT NULL, `retention_time_min` REAL NOT NULL, `retention_time_max` REAL NOT NULL, `missing_scans` INTEGER NOT NULL ); -CREATE TABLE `feature` ( `feature` INTEGER PRIMARY KEY AUTOINCREMENT, `mz` REAL NOT NULL, `mzmin` REAL NOT NULL, `mzmax` REAL NOT NULL, `rt` REAL NOT NULL, `rtmin` REAL NOT NULL, `rtmax` REAL NOT NULL, `into` REAL NOT NULL, `intb` REAL NOT NULL, `maxo` REAL NOT NULL, `sn` REAL NOT NULL, `scale` INTEGER, `scpos` INTEGER NOT NULL, `scmin` INTEGER NOT NULL, `scmax` INTEGER NOT NULL, `iso` TEXT NOT NULL, `abundance` REAL NOT NULL, `score` REAL NOT NULL, `deviation` REAL NOT NULL, `chemical_ion` REAL NOT NULL, `intensities` REAL NOT NULL, `intensities_b` REAL NOT NULL, `weighted_deviation` REAL NOT NULL, `project_sample` INTEGER NOT NULL); \ No newline at end of file +CREATE TABLE `feature` ( `feature` INTEGER PRIMARY KEY AUTOINCREMENT, `mz` REAL NOT NULL, `mzmin` REAL NOT NULL, `mzmax` REAL NOT NULL, `rt` REAL NOT NULL, `rtmin` REAL NOT NULL, `rtmax` REAL NOT NULL, `into` REAL NOT NULL, `intb` REAL NOT NULL, `maxo` REAL NOT NULL, `sn` REAL NOT NULL, `scale` INTEGER, `scpos` INTEGER NOT NULL, `scmin` INTEGER NOT NULL, `scmax` INTEGER NOT NULL, `iso` TEXT NOT NULL, `abundance` REAL NOT NULL, `score` REAL NOT NULL, `deviation` REAL NOT NULL, `chemical_ion` REAL NOT NULL, `intensities` REAL NOT NULL, `intensities_b` REAL NOT NULL, `weighted_deviation` REAL NOT NULL, `project_sample` INTEGER NOT NULL); +CREATE TABLE `deconvolution_infos` ( `project` INTEGER NOT NULL UNIQUE, `time_start` TEXT, `time_end` TEXT, `time_diff` TEXT, `computer_manufacturer` TEXT, `computer_model` TEXT, `os_info` TEXT, `system_type` TEXT, `cpu_manufacturer` TEXT, `processor_info` TEXT, `cpu_cores` TEXT, `cpu_speed` TEXT, `memory_info` TEXT, `memory_speed` TEXT, FOREIGN KEY(`project`) REFERENCES `project`(`project`), PRIMARY KEY(`project`)); \ No newline at end of file diff --git a/data/create_database.sql b/data/create_database.sql index 18f1ddfa4..2d6cb21f9 100644 --- a/data/create_database.sql +++ b/data/create_database.sql @@ -76,4 +76,22 @@ CREATE TABLE `feature` ( `intensities` REAL NOT NULL, `weighted_deviation` REAL NOT NUL, `project_sample` INTEGER NOT NULL +); +CREATE TABLE `deconvolution_infos` ( + `project` INTEGER NOT NULL UNIQUE, + `time_start` TEXT, + `time_end` TEXT, + `time_diff` TEXT, + `computer_manufacturer` TEXT, + `computer_model` TEXT, + `os_info` TEXT, + `system_type` TEXT, + `cpu_manufacturer` TEXT, + `processor_info` TEXT, + `cpu_cores` TEXT, + `cpu_speed` TEXT, + `memory_info` TEXT, + `memory_speed` TEXT, + FOREIGN KEY(`project`) REFERENCES `project`(`project`), + PRIMARY KEY(`project`) ); \ No newline at end of file diff --git a/server.R b/server.R index f67c38905..1fd202713 100644 --- a/server.R +++ b/server.R @@ -56,42 +56,29 @@ shiny::observeEvent(c(input$user, input$project), { con = config_file) }) -source(file.path('server', 'func.R'), local = TRUE)$value +# Open the documentation file when the 'open_doc' input is triggered +shiny::observeEvent(input$open_doc, { + system(sprintf("\"%s\" \"%s\"", chromium, documentation_file), wait = FALSE) +}) +source(file.path('server', 'func.R'), local = TRUE)$value source(file.path('server', 'reactiveValues.R'), local = TRUE)$value - source(file.path('server', 'db_func.R'), local = TRUE)$value - source(file.path('server', 'db_delete.R'), local = TRUE)$value - source(file.path('server', 'db_record.R'), local = TRUE)$value - source(file.path('server', 'db_get.R'), local = TRUE)$value - source(file.path('server', 'chem_func.R'), local = TRUE)$value - source(file.path('server', 'plot.R'), local = TRUE)$value - source(file.path('server', 'user.R'), local = TRUE)$value - source(file.path('server', 'project.R'), local = TRUE)$value - source(file.path('server', 'file.R'), local = TRUE)$value - source(file.path('server', 'manage.R'), local = TRUE)$value - source(file.path('server', 'process.R'), local = TRUE)$value - source(file.path('server', 'deconvolution.R'), local = TRUE)$value - source(file.path('server', 'EIC.R'), local=TRUE)$value - source(file.path('server', 'process_results.R'), local = TRUE)$value - source(file.path('server', 'graphics.R'), local = TRUE)$value - source(file.path('server', 'regression.R'), local = TRUE)$value - source(file.path('server', 'export_function.R'), local = TRUE)$value # hide loader & show app div diff --git a/server/chem_func.R b/server/chem_func.R index 862cf2cee..b8e3d23d2 100644 --- a/server/chem_func.R +++ b/server/chem_func.R @@ -8,6 +8,7 @@ #' #' @return float, tolerance in Da ppm_to_da <- function(mass, ppm) mass * ppm * 10**-6 +# ppm_to_da <- .Call("_cppFuncs_ppm_to_da", mass, ppm) // Call Rcpp Function (Test) #' @title Convert Da to ppm #' @@ -19,6 +20,7 @@ ppm_to_da <- function(mass, ppm) mass * ppm * 10**-6 #' #' @return float, tolerance in ppm da_to_ppm <- function(mass, da) da * 10**6 / mass +# da_to_ppm <- .Call("_cppFuncs_da_to_ppm", mass, da) // Call Rcpp Function (Test) #' @title Get mass range #' diff --git a/server/db_get.R b/server/db_get.R index 8896e2759..0bf646fc0 100644 --- a/server/db_get.R +++ b/server/db_get.R @@ -598,4 +598,22 @@ get_formula <- function(db, chemical_type, C = 0, Cl = 0, Br = 0){ chemical_type == \"%s\" and C == %s and Cl == %s and Br == %s", chemical_type, C, Cl, Br) db_get_query(db, query) +} + +#' @title Get deconvolution_infos table +#' +#' @description +#' Recover information corresponding to execution times during deconvolution and information +#' on the specifications of the device that performed the calculation. +#' +#' @param db sqlite connection +#' @param project integrer project id +#' +#' @return complete info table +get_infos <- function(db, project = NULL){ + query <- "SELECT * FROM deconvolution_infos" + if (!is.null(project)) { + query <- paste(query, sprintf("WHERE project = '%s'", project), sep = " ") + } + db_get_query(db, query) } \ No newline at end of file diff --git a/server/db_record.R b/server/db_record.R index 3ced7f1ec..5ae9681df 100644 --- a/server/db_record.R +++ b/server/db_record.R @@ -99,6 +99,48 @@ record_project_sample <- function(db, project, sample_name, sample_id) { actualize$project_samples <<- runif(1) } +#' @title Record deconvolution info +#' +#' @description +#' Record info in database +#' +#' @param db sqlite connection +#' @param project integer, project id +#' @param params list with items: +#' \itemize{ +#' \item project PRIMARY KEY INTEGER NOT NULL UNIQUE FOREIGN KEY("project") REFERENCES "project"("project") +#' \item time_start TEXT +#' \item time_end TEXT +#' \item time_diff TEXT +#' \item computer_manufacturer TEXT +#' \item computer_model TEXT +#' \item os_info TEXT +#' \item system_type TEXT +#' \item cpu_manufacturer TEXT +#' \item processor_info TEXT +#' \item cpu_cores TEXT +#' \item cpu_speed TEXT +#' \item memory_info TEXT +#' \item memory_speed TEXT +#' } +record_deconvolution_infos <- function(db, infos) { + # Création de la chaîne de valeurs pour l'insertion + data <- paste(sprintf("('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", + infos$project, infos$time_start, infos$time_end, infos$time_diff, infos$computer_manufacturer, + infos$computer_model, infos$os_info, infos$system_type, infos$cpu_manufacturer, + infos$processor_info, infos$cpu_cores, infos$cpu_speed, infos$memory_info, + infos$memory_speed), collapse = ", ") + + # Création de la requête SQL + query <- sprintf("INSERT OR REPLACE INTO deconvolution_infos (project, time_start, time_end, time_diff, + computer_manufacturer, computer_model, os_info, system_type, cpu_manufacturer, + processor_info, cpu_cores, cpu_speed, memory_info, memory_speed) VALUES %s", data) + + # Exécution de la requête + db_execute(db, query) +} + + #' @title Record deconvolution params #' #' @description diff --git a/server/deconvolution.R b/server/deconvolution.R index 1687622bf..fc140b836 100644 --- a/server/deconvolution.R +++ b/server/deconvolution.R @@ -546,189 +546,229 @@ integrate2 <- function(eic, lm, baseline, noise, missing_scans, mzmat, scale = N #' \item weighted_deviation float weighted deviation #' } deconvolution <- function(xr, theoric_patterns, chemical_ids, scalerange, scanrange = NULL, - missing_scans = 1, pb = NULL, reintegration = FALSE) { - peaks <- NULL - pb_max <- length(theoric_patterns) - extend_range <- ceiling(scalerange[2] * 1.5) - for (i in seq(theoric_patterns)) { - time_begin <- Sys.time() - traces <- get_mzmat_eic(xr, theoric_patterns[[i]][1, c("mzmin", "mzmax")]) - roi <- get_rois(traces$eic[, "int"], scalerange[1]) - if (length(roi) == 0) next - traces <- append(list(traces), lapply(2:nrow(theoric_patterns[[i]]), function(j) - get_mzmat_eic(xr, theoric_patterns[[i]][j, c("mzmin", "mzmax")]))) - # xcms define noiserange as 1.5x peakwidth_max - baselines <- lapply(traces, function(x) - suppressWarnings(runmed(x$eic[, "int"], nrow(x$eic) / 3, endrule = "constant", algorithm = "Turlach"))) - noises <- sapply(traces, function(x) sd(x$eic[-c(roi[1]:roi[2]), "int"])) - if(reintegration){ - roi <- range(which(traces[[1]]$eic[, "int"] > 0 & - traces[[1]]$eic[, "rt"] > scanrange[1]*60 & traces[[1]]$eic[, "rt"] < scanrange[2]*60)) - if (roi[1] == Inf) next - lm <- c(roi[1] - traces[[1]]$eic[roi[1], "scan"] + 1, roi[2] - traces[[1]]$eic[roi[1], "scan"] + 1) - basepeaks <- integrate2(traces[[1]]$eic[roi[1]:roi[2], ], lm, - baselines[[1]][roi[1]:roi[2]], noises[1], missing_scans, - traces[[1]]$mzmat[which(traces[[1]]$mzmat[, "scan"] %in% roi[1]:roi[2]), , drop = FALSE]) - }else{ - # extend roi for better integration - roi <- range( - (if (min(roi) - extend_range < 1) 1 else min(roi) - extend_range) : - (if (max(roi) + extend_range > nrow(traces[[1]]$eic)) nrow(traces[[1]]$eic) else max(roi) + extend_range) - ) - basepeaks <- integrate(traces[[1]]$eic[roi[1]:roi[2], ], scalerange, - baselines[[1]][roi[1]:roi[2]], noises[1], missing_scans, - traces[[1]]$mzmat[which( - traces[[1]]$mzmat[, "scan"] %in% roi[1]:roi[2]) - , , drop = FALSE]) - } - - if (length(basepeaks) == 0) next - basepeaks <- cbind(basepeaks, abundance = 100, iso = "A") - if(is.vector(scanrange)) basepeaks <- basepeaks[(basepeaks$rt > scanrange[1] & basepeaks$rt < scanrange[2]),] - if(nrow(basepeaks) == 0) next - basepeak <- basepeaks[which.max(basepeaks$maxo),] - peaks2 <- NULL - scores <- c(theoric_patterns[[i]][1, "weight"]) - deviations <- c(basepeak[1, "mz"] - theoric_patterns[[i]][1, "mz"]) - weight <- c(theoric_patterns[[i]][1, "weight"]) - continue_integration <- TRUE - k <- 2 # To avoid iso = A - while (k < length(traces) & continue_integration) { - eic <- traces[[k]]$eic - mzmat <- traces[[k]]$mzmat - peak <- integrate2(eic[roi[1]:roi[2], ], - unlist(basepeak[, c("lmin", "lmax")]), - baselines[[k]][roi[1]:roi[2]], noises[k], missing_scans, - mzmat[which(mzmat[, "scan"] %in% roi[1]:roi[2]), , drop = FALSE])[1, ] - if (length(peak) > 0) { - if (k == 2) peaks2 <- basepeak - peak <- cbind(peak, - abundance = peak[1, "intb"] / basepeak[1, "intb"] * 100, - iso = theoric_patterns[[i]][k, "iso"]) - scores <- c(scores, (1 - - abs(theoric_patterns[[i]][k, "abundance"] - peak[1, "abundance"]) / - theoric_patterns[[i]][k, "abundance"]) * - theoric_patterns[[i]][k, "weight"]) - deviations <- c(deviations, - peak[1, "mz"] - theoric_patterns[[i]][k, "mz"]) - weight <- c(weight, theoric_patterns[[i]][k, "weight"]) - peaks2 <- rbind(peaks2, peak) - } else continue_integration <- FALSE - k <- k + 1 - } - if (length(peaks2) > 0) { - peaks <- rbind(peaks, cbind( - peaks2, - score = sum(scores) * 100, - deviation = mean(deviations) * 10**3, - chemical_ion = chemical_ids[i], - intensities = sum(peaks2[,"into"]), - intensities_b = sum(peaks2[,"intb"]), - weighted_deviations = sum(deviations*weight)/sum(weight) - )) - } - - shinyWidgets::updateProgressBar(session, id = pb, - value = i * 100 / pb_max, - title = "") + missing_scans = 1, pb = NULL, reintegration = FALSE) { + peaks <- NULL + pb_max <- length(theoric_patterns) + extend_range <- ceiling(scalerange[2] * 1.5) + + # Process cluster creation + detectCores <- detectCores() + if (!is.na(detectCores)) { + ncores <- round(detectCores() / 2L) + } else { + ncores <- 2L } - peaks + cl <- makeCluster(ncores) + + time_begin <- Sys.time() + print(time_begin) + + # Loop parallelization with parLapply + peaks <- parLapplyLB(cl, seq_along(theoric_patterns), function(i) { + traces <- get_mzmat_eic(xr, theoric_patterns[[i]][1, c("mzmin", "mzmax")]) + roi <- get_rois(traces$eic[, "int"], scalerange[1]) + if (length(roi) == 0) return(NULL) + traces <- append(list(traces), lapply(2:nrow(theoric_patterns[[i]]), function(j) + get_mzmat_eic(xr, theoric_patterns[[i]][j, c("mzmin", "mzmax")]))) + baselines <- lapply(traces, function(x) + suppressWarnings(runmed(x$eic[, "int"], nrow(x$eic) / 3, endrule = "constant", algorithm = "Turlach"))) + noises <- sapply(traces, function(x) sd(x$eic[-c(roi[1]:roi[2]), "int"])) + if(reintegration){ + roi <- range(which(traces[[1]]$eic[, "int"] > 0 & + traces[[1]]$eic[, "rt"] > scanrange[1]*60 & traces[[1]]$eic[, "rt"] < scanrange[2]*60)) + if (roi[1] == Inf) return(NULL) + lm <- c(roi[1] - traces[[1]]$eic[roi[1], "scan"] + 1, roi[2] - traces[[1]]$eic[roi[1], "scan"] + 1) + basepeaks <- integrate2(traces[[1]]$eic[roi[1]:roi[2], ], lm, + baselines[[1]][roi[1]:roi[2]], noises[1], missing_scans, + traces[[1]]$mzmat[which(traces[[1]]$mzmat[, "scan"] %in% roi[1]:roi[2]), , drop = FALSE]) + } else { + roi <- range( + (if (min(roi) - extend_range < 1) 1 else min(roi) - extend_range) : + (if (max(roi) + extend_range > nrow(traces[[1]]$eic)) nrow(traces[[1]]$eic) else max(roi) + extend_range) + ) + basepeaks <- integrate(traces[[1]]$eic[roi[1]:roi[2], ], scalerange, + baselines[[1]][roi[1]:roi[2]], noises[1], missing_scans, + traces[[1]]$mzmat[which( + traces[[1]]$mzmat[, "scan"] %in% roi[1]:roi[2]) + , , drop = FALSE]) + } + if (length(basepeaks) == 0) return(NULL) + basepeaks <- cbind(basepeaks, abundance = 100, iso = "A") + if(is.vector(scanrange)) basepeaks <- basepeaks[(basepeaks$rt > scanrange[1] & basepeaks$rt < scanrange[2]),] + if(nrow(basepeaks) == 0) return(NULL) + basepeak <- basepeaks[which.max(basepeaks$maxo),] + peaks2 <- NULL + scores <- c(theoric_patterns[[i]][1, "weight"]) + deviations <- c(basepeak[1, "mz"] - theoric_patterns[[i]][1, "mz"]) + weight <- c(theoric_patterns[[i]][1, "weight"]) + continue_integration <- TRUE + k <- 2 # To avoid iso = A + while (k < length(traces) & continue_integration) { + eic <- traces[[k]]$eic + mzmat <- traces[[k]]$mzmat + peak <- integrate2(eic[roi[1]:roi[2], ], + unlist(basepeak[, c("lmin", "lmax")]), + baselines[[k]][roi[1]:roi[2]], noises[k], missing_scans, + mzmat[which(mzmat[, "scan"] %in% roi[1]:roi[2]), , drop = FALSE])[1, ] + if (length(peak) > 0) { + if (k == 2) peaks2 <- basepeak + peak <- cbind(peak, + abundance = peak[1, "intb"] / basepeak[1, "intb"] * 100, + iso = theoric_patterns[[i]][k, "iso"]) + scores <- c(scores, (1 - + abs(theoric_patterns[[i]][k, "abundance"] - peak[1, "abundance"]) / + theoric_patterns[[i]][k, "abundance"]) * + theoric_patterns[[i]][k, "weight"]) + deviations <- c(deviations, + peak[1, "mz"] - theoric_patterns[[i]][k, "mz"]) + weight <- c(weight, theoric_patterns[[i]][k, "weight"]) + peaks2 <- rbind(peaks2, peak) + } else continue_integration <- FALSE + k <- k + 1 + } + if (length(peaks2) > 0) { + return(cbind( + peaks2, + score = sum(scores) * 100, + deviation = mean(deviations) * 10**3, + chemical_ion = chemical_ids[i], + intensities = sum(peaks2[,"into"]), + intensities_b = sum(peaks2[,"intb"]), + weighted_deviations = sum(deviations*weight)/sum(weight) + )) + } + }) + + time_end <- Sys.time() + print(time_end) + time_diff <- time_end - time_begin + print("############## deconvolution ##############") + print(time_diff) + print("###########################################") + + # Cluster shutdown + stopCluster(cl) + + # Combine results from different cores + peaks <- do.call(rbind, peaks) + + return(peaks) } + deconvolution_std <- function(xr, theoric_patterns, chemical_ids = NA, scalerange, scanrange = NULL, - missing_scans = 1, pb = NULL, reintegration = FALSE) { - peaks <- NULL - pb_max <- length(theoric_patterns) - extend_range <- ceiling(scalerange[2] * 1.5) - for (i in seq(theoric_patterns)) { - time_begin <- Sys.time() - traces <- get_mzmat_eic(xr, theoric_patterns[[i]][1, c("mzmin", "mzmax")]) - roi <- get_rois(traces$eic[, "int"], scalerange[1]) - if (length(roi) == 0){ - norois <- c(mz = NA, mzmin = NA, mzmax = NA, rt = NA, rtmin = NA, rtmax = NA, into = NA, intb = NA, maxo = NA, sn = NA, scale = NA, - scpos = NA, scmin = NA, scmax = NA, lmin = NA, lmax = NA, abundance = NA, iso = "no ROIs", score = NA, deviation = NA, chemical_ion = chemical_ids[i], - intensities = NA, intensities_b = NA, weighted_deviations = NA) - peaks <- rbind(peaks, norois) - next - } - traces <- append(list(traces), lapply(2:nrow(theoric_patterns[[i]]), function(j) - get_mzmat_eic(xr, theoric_patterns[[i]][j, c("mzmin", "mzmax")]))) - # xcms define noiserange as 1.5x peakwidth_max - baselines <- lapply(traces, function(x) - suppressWarnings(runmed(x$eic[, "int"], nrow(x$eic) / 3, endrule = "constant", algorithm = "Turlach"))) - noises <- sapply(traces, function(x) sd(x$eic[-c(roi[1]:roi[2]), "int"])) - if(reintegration){ - roi <- range(which(traces[[1]]$eic[, "int"] > 0 & - traces[[1]]$eic[, "rt"] > scanrange[1]*60 & traces[[1]]$eic[, "rt"] < scanrange[2]*60)) - if (roi[1] == Inf) next - lm <- c(roi[1] - traces[[1]]$eic[roi[1], "scan"] + 1, roi[2] - traces[[1]]$eic[roi[1], "scan"] + 1) - basepeaks <- integrate2(traces[[1]]$eic[roi[1]:roi[2], ], lm, - baselines[[1]][roi[1]:roi[2]], noises[1], missing_scans, - traces[[1]]$mzmat[which( - traces[[1]]$mzmat[, "scan"] %in% roi[1]:roi[2]) - , , drop = FALSE]) - } - else{ - # extend roi for better integration - roi <- range( - (if (min(roi) - extend_range < 1) 1 else min(roi) - extend_range) : - (if (max(roi) + extend_range > nrow(traces[[1]]$eic)) nrow(traces[[1]]$eic) else max(roi) + extend_range) - ) - basepeaks <- integrate(traces[[1]]$eic[roi[1]:roi[2], ], scalerange, - baselines[[1]][roi[1]:roi[2]], noises[1], missing_scans, - traces[[1]]$mzmat[which( - traces[[1]]$mzmat[, "scan"] %in% roi[1]:roi[2]) - , , drop = FALSE]) - } - if (length(basepeaks) == 0) next - basepeaks <- cbind(basepeaks, abundance = 100, iso = "A") - if(is.vector(scanrange)) basepeaks <- basepeaks[(basepeaks$rt > scanrange[1] & basepeaks$rt < scanrange[2]),] - if(nrow(basepeaks) == 0) next - basepeak <- basepeaks[which.max(basepeaks$maxo),] - peaks2 <- NULL - scores <- c(theoric_patterns[[i]][1, "weight"]) - deviations <- c(theoric_patterns[[i]][1, "mz"] - basepeak[1, "mz"]) - weight <- c(theoric_patterns[[i]][1, "weight"]) - continue_integration <- TRUE - k <- 2 - while (k < length(traces) & continue_integration) { - eic <- traces[[k]]$eic - mzmat <- traces[[k]]$mzmat - peak <- integrate2(eic[roi[1]:roi[2], ], - unlist(basepeak[, c("lmin", "lmax")]), - baselines[[k]][roi[1]:roi[2]], noises[k], missing_scans, - mzmat[which(mzmat[, "scan"] %in% roi[1]:roi[2]), , drop = FALSE])[1, ] - if (length(peak) > 0) { - if (k == 2) peaks2 <- basepeak - peak <- cbind(peak, - abundance = peak[1, "intb"] / basepeak[1, "intb"] * 100, - iso = theoric_patterns[[i]][k, "iso"]) - scores <- c(scores, (1 - - abs(theoric_patterns[[i]][k, "abundance"] - peak[1, "abundance"]) / - theoric_patterns[[i]][k, "abundance"]) * - theoric_patterns[[i]][k, "weight"]) - deviations <- c(deviations, - peak[1, "mz"] - theoric_patterns[[i]][k, "mz"]) - weight <- c(weight, theoric_patterns[[i]][k, "weight"]) - peaks2 <- rbind(peaks2, peak) - } else continue_integration <- FALSE - k <- k + 1 - } - if (length(peaks2) > 0) { - peaks <- rbind(peaks, cbind( - peaks2, - score = sum(scores) * 100, - deviation = mean(deviations) * 10**3, - chemical_ion = chemical_ids[i], - intensities = sum(peaks2[,"into"]), - intensities_b = sum(peaks2[,"intb"]), - weighted_deviations = sum(deviations*weight)/sum(weight) - )) - } - - shinyWidgets::updateProgressBar(session, id = pb, - value = i * 100 / pb_max, - title = "") + missing_scans = 1, pb = NULL, reintegration = FALSE, session = NULL) { + peaks <- NULL + pb_max <- length(theoric_patterns) + extend_range <- ceiling(scalerange[2] * 1.5) + + # Process cluster creation + detectCores <- detectCores() + if (!is.na(detectCores)) { + ncores <- round(detectCores() / 2L) + } else { + ncores <- 2L } - peaks + cl <- makeCluster(ncores) + + time_begin <- Sys.time() + print(time_begin) + + # Loop parallelization with parLapply + peaks <- parLapplyLB(cl, seq_along(theoric_patterns), function(i) { + traces <- get_mzmat_eic(xr, theoric_patterns[[i]][1, c("mzmin", "mzmax")]) + roi <- get_rois(traces$eic[, "int"], scalerange[1]) + if (length(roi) == 0) { + norois <- c(mz = NA, mzmin = NA, mzmax = NA, rt = NA, rtmin = NA, rtmax = NA, into = NA, intb = NA, maxo = NA, sn = NA, scale = NA, + scpos = NA, scmin = NA, scmax = NA, lmin = NA, lmax = NA, abundance = NA, iso = "no ROIs", score = NA, deviation = NA, chemical_ion = chemical_ids[i], + intensities = NA, intensities_b = NA, weighted_deviations = NA) + return(norois) + } + traces <- append(list(traces), lapply(2:nrow(theoric_patterns[[i]]), function(j) + get_mzmat_eic(xr, theoric_patterns[[i]][j, c("mzmin", "mzmax")]))) + baselines <- lapply(traces, function(x) + suppressWarnings(runmed(x$eic[, "int"], nrow(x$eic) / 3, endrule = "constant", algorithm = "Turlach"))) + noises <- sapply(traces, function(x) sd(x$eic[-c(roi[1]:roi[2]), "int"])) + if(reintegration){ + roi <- range(which(traces[[1]]$eic[, "int"] > 0 & + traces[[1]]$eic[, "rt"] > scanrange[1]*60 & traces[[1]]$eic[, "rt"] < scanrange[2]*60)) + if (roi[1] == Inf) return(NULL) + lm <- c(roi[1] - traces[[1]]$eic[roi[1], "scan"] + 1, roi[2] - traces[[1]]$eic[roi[1], "scan"] + 1) + basepeaks <- integrate2(traces[[1]]$eic[roi[1]:roi[2], ], lm, + baselines[[1]][roi[1]:roi[2]], noises[1], missing_scans, + traces[[1]]$mzmat[which( + traces[[1]]$mzmat[, "scan"] %in% roi[1]:roi[2]) + , , drop = FALSE]) + } else { + roi <- range( + (if (min(roi) - extend_range < 1) 1 else min(roi) - extend_range) : + (if (max(roi) + extend_range > nrow(traces[[1]]$eic)) nrow(traces[[1]]$eic) else max(roi) + extend_range) + ) + basepeaks <- integrate(traces[[1]]$eic[roi[1]:roi[2], ], scalerange, + baselines[[1]][roi[1]:roi[2]], noises[1], missing_scans, + traces[[1]]$mzmat[which( + traces[[1]]$mzmat[, "scan"] %in% roi[1]:roi[2]) + , , drop = FALSE]) + } + if (length(basepeaks) == 0) return(NULL) + basepeaks <- cbind(basepeaks, abundance = 100, iso = "A") + if(is.vector(scanrange)) basepeaks <- basepeaks[(basepeaks$rt > scanrange[1] & basepeaks$rt < scanrange[2]),] + if(nrow(basepeaks) == 0) return(NULL) + basepeak <- basepeaks[which.max(basepeaks$maxo),] + peaks2 <- NULL + scores <- c(theoric_patterns[[i]][1, "weight"]) + deviations <- c(theoric_patterns[[i]][1, "mz"] - basepeak[1, "mz"]) + weight <- c(theoric_patterns[[i]][1, "weight"]) + continue_integration <- TRUE + k <- 2 + while (k < length(traces) & continue_integration) { + eic <- traces[[k]]$eic + mzmat <- traces[[k]]$mzmat + peak <- integrate2(eic[roi[1]:roi[2], ], + unlist(basepeak[, c("lmin", "lmax")]), + baselines[[k]][roi[1]:roi[2]], noises[k], missing_scans, + mzmat[which(mzmat[, "scan"] %in% roi[1]:roi[2]), , drop = FALSE])[1, ] + if (length(peak) > 0) { + if (k == 2) peaks2 <- basepeak + peak <- cbind(peak, + abundance = peak[1, "intb"] / basepeak[1, "intb"] * 100, + iso = theoric_patterns[[i]][k, "iso"]) + scores <- c(scores, (1 - + abs(theoric_patterns[[i]][k, "abundance"] - peak[1, "abundance"]) / + theoric_patterns[[i]][k, "abundance"]) * + theoric_patterns[[i]][k, "weight"]) + deviations <- c(deviations, + peak[1, "mz"] - theoric_patterns[[i]][k, "mz"]) + weight <- c(weight, theoric_patterns[[i]][k, "weight"]) + peaks2 <- rbind(peaks2, peak) + } else continue_integration <- FALSE + k <- k + 1 + } + if (length(peaks2) > 0) { + return(cbind( + peaks2, + score = sum(scores) * 100, + deviation = mean(deviations) * 10**3, + chemical_ion = chemical_ids[i], + intensities = sum(peaks2[,"into"]), + intensities_b = sum(peaks2[,"intb"]), + weighted_deviations = sum(deviations*weight)/sum(weight) + )) + } + # shinyWidgets::updateProgressBar(session, id = pb, value = i * 100 / pb_max, title = "") + }) + + time_end <- Sys.time() + print(time_end) + time_diff <- time_end - time_begin + print("############## deconvolution_std ##############") + print(time_diff) + print("###############################################") + + # Cluster shutdown + stopCluster(cl) + + # Combine results from different cores + peaks <- do.call(rbind, peaks) + return(peaks) } \ No newline at end of file diff --git a/server/export_function.R b/server/export_function.R index b6a1f4b0a..77af51bdb 100644 --- a/server/export_function.R +++ b/server/export_function.R @@ -2,8 +2,6 @@ export_PCA <- function(user, maxBar, chem_type, adducts, project_informations, pbValue, output = ""){ # Template PCAs & PBAs - library(openxlsx) - #library(XLConnect) # for some more functions for(chem in chem_type){ for(adduct in adducts){ shinyWidgets::updateProgressBar(session, id = "exportBar", @@ -115,13 +113,15 @@ export_PCA <- function(user, maxBar, chem_type, adducts, project_informations, p openxlsx::writeData(wb, 2, "Standard", startRow = 15, startCol = 2) openxlsx::writeData(wb, 2, c("Formula","Adduct","Retention time 1","Retention time 2"), startRow = 16, startCol = 2) openxlsx::writeData(wb, 2, "Deconvolution process", startRow = 21, startCol = 2) - openxlsx::writeData(wb, 2, c("Start time","Computer","Duration"), startRow = 22, startCol = 2) - openxlsx::writeData(wb, 2, "Display format", startRow = 26, startCol = 2) - openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 27, startCol = 2) - openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 28, startCol = 2) - openxlsx::writeData(wb, 2, "Score threshold", startRow = 29, startCol = 2) - openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 30, startCol = 2) - addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,26), cols = 2) + openxlsx::writeData(wb, 2, c("Start time","Duration (minutes)"), startRow = 22, startCol = 2) + openxlsx::writeData(wb, 2, "Display format", startRow = 25, startCol = 2) + openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 26, startCol = 2) + openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 27, startCol = 2) + openxlsx::writeData(wb, 2, "Score threshold", startRow = 28, startCol = 2) + openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 29, startCol = 2) + openxlsx::writeData(wb, 2, "Computer Hardware", startRow = 31, startCol = 2) + openxlsx::writeData(wb, 2, c("Computer Manufacturer","Computer Model","Operating System","System Type", "CPU Manufacturer", "CPU Name", "Number of CPU Cores", "CPU Speed", "Installed Memory","RAM Speed"), startRow = 32, startCol = 2) + addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,25,31), cols = 2) setColWidths(wb, 2, cols = 2, widths = 25) # Mass tolerance @@ -213,20 +213,31 @@ export_PCA <- function(user, maxBar, chem_type, adducts, project_informations, p stdInfo$retention_time_max[which(stdInfo$chemical_type == std[2])]))," min"), startCol = 3, startRow = 19) ################################# - openxlsx::writeData(wb, 2, "time when started", startCol = 3, startRow = 22) # surement à créer - openxlsx::writeData(wb, 2, "computer name", startCol = 3, startRow = 23) # surement à créer - openxlsx::writeData(wb, 2, "time of duration", startCol = 3, startRow = 24) # surement à créer - openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 29) # pas compris - openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 30) # pas compris + info_table <- get_infos(db, input$project) + openxlsx::writeData(wb, 2, info_table$time_start, startCol = 3, startRow = 22) + openxlsx::writeData(wb, 2, info_table$time_diff, startCol = 3, startRow = 23) + openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 28) + openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 29) + openxlsx::writeData(wb, 2, info_table$computer_manufacturer, startCol = 3, startRow = 32) + openxlsx::writeData(wb, 2, info_table$computer_model, startCol = 3, startRow = 33) + openxlsx::writeData(wb, 2, info_table$os_info, startCol = 3, startRow = 34) + openxlsx::writeData(wb, 2, info_table$system_type, startCol = 3, startRow = 35) + openxlsx::writeData(wb, 2, info_table$cpu_manufacturer, startCol = 3, startRow = 36) + openxlsx::writeData(wb, 2, info_table$processor_info, startCol = 3, startRow = 37) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_cores, " (unit: cores)"), startCol = 3, startRow = 38) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_speed, " (unit: MHz)"), startCol = 3, startRow = 39) + openxlsx::writeData(wb, 2, paste0(info_table$memory_info, " (unit: GB)"), startCol = 3, startRow = 40) + openxlsx::writeData(wb, 2, paste0(info_table$memory_speed, " (unit: MHz)"), startCol = 3, startRow = 41) + setColWidths(wb, 2, cols = 3, widths = 55) - addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:24), cols = 3) - addStyle(wb, 2, sh2EndTableStyle, rows = 29:30, cols = 3) + addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:23,32:41), cols = 3) + addStyle(wb, 2, sh2EndTableStyle, rows = 28:29, cols = 3) - openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 24) - openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 29) - openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 30) - addStyle(wb, 2, italicStyle, rows = 24, cols = 4) - addStyle(wb, 2, sh2LegendStyle, rows = 29:30, cols = 4) + openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 23) + openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 28) + openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 29) + addStyle(wb, 2, italicStyle, rows = 23, cols = 4) + addStyle(wb, 2, sh2LegendStyle, rows = 28:29, cols = 4) ################################################################################ # Write the third sheet X times with X is the number of standard @@ -493,7 +504,7 @@ export_PCA <- function(user, maxBar, chem_type, adducts, project_informations, p ################################################################################ # Save the workbook - saveWorkbook(wb, paste0(config_dir,"/",project_informations$name,"_",project_informations$creation,"_[",adduct,"]_",chem,".xlsx"), overwrite = TRUE) # add start time + saveWorkbook(wb, paste0(config_dir,"/",project_informations$name,"_",project_informations$creation,"_[",adduct,"]_",chem,".xlsx"), overwrite = TRUE) # add Start time } } } @@ -501,8 +512,6 @@ export_PCA <- function(user, maxBar, chem_type, adducts, project_informations, p export_PCO <- function(user, maxBar, chem_type, adducts, project_informations, pbValue, output = ""){ - library(openxlsx) - #library(XLConnect) # for some more functions allProj <- deconvolution_params()[which(deconvolution_params()$chemical_type %in% chem_type),] myProjDeconv <- allProj[which(allProj$project == project_informations$project),] for(adduct in adducts){ @@ -619,13 +628,15 @@ export_PCO <- function(user, maxBar, chem_type, adducts, project_informations, p openxlsx::writeData(wb, 2, "Standard", startRow = 15, startCol = 2) openxlsx::writeData(wb, 2, c("Formula","Adduct","Retention time 1","Retention time 2"), startRow = 16, startCol = 2) openxlsx::writeData(wb, 2, "Deconvolution process", startRow = 21, startCol = 2) - openxlsx::writeData(wb, 2, c("Start time","Computer","Duration"), startRow = 22, startCol = 2) - openxlsx::writeData(wb, 2, "Display format", startRow = 26, startCol = 2) - openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 27, startCol = 2) - openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 28, startCol = 2) - openxlsx::writeData(wb, 2, "Score threshold", startRow = 29, startCol = 2) - openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 30, startCol = 2) - addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,26), cols = 2) + openxlsx::writeData(wb, 2, c("Start time","Duration (minutes)"), startRow = 22, startCol = 2) + openxlsx::writeData(wb, 2, "Display format", startRow = 25, startCol = 2) + openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 26, startCol = 2) + openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 27, startCol = 2) + openxlsx::writeData(wb, 2, "Score threshold", startRow = 28, startCol = 2) + openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 29, startCol = 2) + openxlsx::writeData(wb, 2, "Computer Hardware", startRow = 31, startCol = 2) + openxlsx::writeData(wb, 2, c("Computer Manufacturer","Computer Model","Operating System","System Type", "CPU Manufacturer", "CPU Name", "Number of CPU Cores", "CPU Speed", "Installed Memory","RAM Speed"), startRow = 32, startCol = 2) + addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,25,31), cols = 2) setColWidths(wb, 2, cols = 2, widths = 25) # Mass tolerance @@ -748,20 +759,31 @@ export_PCO <- function(user, maxBar, chem_type, adducts, project_informations, p stdInfo$retention_time_max[which(stdInfo$chemical_type == std[2])]))," min"), startCol = 3, startRow = 19) ################################# - openxlsx::writeData(wb, 2, "time when started", startCol = 3, startRow = 22) # surement à créer - openxlsx::writeData(wb, 2, "computer name", startCol = 3, startRow = 23) # surement à créer - openxlsx::writeData(wb, 2, "time of duration", startCol = 3, startRow = 24) # surement à créer - openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 29) # pas compris - openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 30) # pas compris + info_table <- get_infos(db, input$project) + openxlsx::writeData(wb, 2, info_table$time_start, startCol = 3, startRow = 22) + openxlsx::writeData(wb, 2, info_table$time_diff, startCol = 3, startRow = 23) + openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 28) + openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 29) + openxlsx::writeData(wb, 2, info_table$computer_manufacturer, startCol = 3, startRow = 32) + openxlsx::writeData(wb, 2, info_table$computer_model, startCol = 3, startRow = 33) + openxlsx::writeData(wb, 2, info_table$os_info, startCol = 3, startRow = 34) + openxlsx::writeData(wb, 2, info_table$system_type, startCol = 3, startRow = 35) + openxlsx::writeData(wb, 2, info_table$cpu_manufacturer, startCol = 3, startRow = 36) + openxlsx::writeData(wb, 2, info_table$processor_info, startCol = 3, startRow = 37) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_cores, " (unit: cores)"), startCol = 3, startRow = 38) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_speed, " (unit: MHz)"), startCol = 3, startRow = 39) + openxlsx::writeData(wb, 2, paste0(info_table$memory_info, " (unit: GB)"), startCol = 3, startRow = 40) + openxlsx::writeData(wb, 2, paste0(info_table$memory_speed, " (unit: MHz)"), startCol = 3, startRow = 41) + setColWidths(wb, 2, cols = 3, widths = 55) - addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:24), cols = 3) - addStyle(wb, 2, sh2EndTableStyle, rows = 29:30, cols = 3) + addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:23,32:41), cols = 3) + addStyle(wb, 2, sh2EndTableStyle, rows = 28:29, cols = 3) - openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 24) - openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 29) - openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 30) - addStyle(wb, 2, italicStyle, rows = 24, cols = 4) - addStyle(wb, 2, sh2LegendStyle, rows = 29:30, cols = 4) + openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 23) + openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 28) + openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 29) + addStyle(wb, 2, italicStyle, rows = 23, cols = 4) + addStyle(wb, 2, sh2LegendStyle, rows = 28:29, cols = 4) ################################################################################ # Write the third sheet X times with X is the number of standard @@ -887,7 +909,7 @@ export_PCO <- function(user, maxBar, chem_type, adducts, project_informations, p # Create the sheet of the file label addWorksheet(wb = wb, sheetName = file, gridLines = FALSE) - openxlsx::writeData(wb, sheet, paste("CP-Seeker Version"), startRow = 1) + openxlsx::writeData(wb, sheet, config$appname, startRow = 1) openxlsx::writeData(wb, sheet, file, startRow = 2) mySample <- samples()[which(samples()$sample %in% myActualFile$sample),] if(unique(mySample$polarity == "negative")){ @@ -1269,8 +1291,6 @@ export_PCO <- function(user, maxBar, chem_type, adducts, project_informations, p export_PXA <- function(user, maxBar, chem_type, adducts, project_informations, pbValue, output = ""){ - library(openxlsx) - #library(XLConnect) # for some more functions allProj <- deconvolution_params()[which(deconvolution_params()$chemical_type %in% chem_type),] myProjDeconv <- allProj[which(allProj$project == project_informations$project),] for(adduct in adducts){ @@ -1387,13 +1407,15 @@ export_PXA <- function(user, maxBar, chem_type, adducts, project_informations, p openxlsx::writeData(wb, 2, "Standard", startRow = 15, startCol = 2) openxlsx::writeData(wb, 2, c("Formula","Adduct","Retention time 1","Retention time 2"), startRow = 16, startCol = 2) openxlsx::writeData(wb, 2, "Deconvolution process", startRow = 21, startCol = 2) - openxlsx::writeData(wb, 2, c("Start time","Computer","Duration"), startRow = 22, startCol = 2) - openxlsx::writeData(wb, 2, "Display format", startRow = 26, startCol = 2) - openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 27, startCol = 2) - openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 28, startCol = 2) - openxlsx::writeData(wb, 2, "Score threshold", startRow = 29, startCol = 2) - openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 30, startCol = 2) - addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,26), cols = 2) + openxlsx::writeData(wb, 2, c("Start time","Duration (minutes)"), startRow = 22, startCol = 2) + openxlsx::writeData(wb, 2, "Display format", startRow = 25, startCol = 2) + openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 26, startCol = 2) + openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 27, startCol = 2) + openxlsx::writeData(wb, 2, "Score threshold", startRow = 28, startCol = 2) + openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 29, startCol = 2) + openxlsx::writeData(wb, 2, "Computer Hardware", startRow = 31, startCol = 2) + openxlsx::writeData(wb, 2, c("Computer Manufacturer","Computer Model","Operating System","System Type", "CPU Manufacturer", "CPU Name", "Number of CPU Cores", "CPU Speed", "Installed Memory","RAM Speed"), startRow = 32, startCol = 2) + addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,25,31), cols = 2) setColWidths(wb, 2, cols = 2, widths = 25) # Mass tolerance @@ -1507,20 +1529,31 @@ export_PXA <- function(user, maxBar, chem_type, adducts, project_informations, p stdInfo$retention_time_max[which(stdInfo$chemical_type == std[2])]))," min"), startCol = 3, startRow = 19) ################################# - openxlsx::writeData(wb, 2, "time when started", startCol = 3, startRow = 22) # surement à créer - openxlsx::writeData(wb, 2, "computer name", startCol = 3, startRow = 23) # surement à créer - openxlsx::writeData(wb, 2, "time of duration", startCol = 3, startRow = 24) # surement à créer - openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 29) # pas compris - openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 30) # pas compris + info_table <- get_infos(db, input$project) + openxlsx::writeData(wb, 2, info_table$time_start, startCol = 3, startRow = 22) + openxlsx::writeData(wb, 2, info_table$time_diff, startCol = 3, startRow = 23) + openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 28) + openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 29) + openxlsx::writeData(wb, 2, info_table$computer_manufacturer, startCol = 3, startRow = 32) + openxlsx::writeData(wb, 2, info_table$computer_model, startCol = 3, startRow = 33) + openxlsx::writeData(wb, 2, info_table$os_info, startCol = 3, startRow = 34) + openxlsx::writeData(wb, 2, info_table$system_type, startCol = 3, startRow = 35) + openxlsx::writeData(wb, 2, info_table$cpu_manufacturer, startCol = 3, startRow = 36) + openxlsx::writeData(wb, 2, info_table$processor_info, startCol = 3, startRow = 37) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_cores, " (unit: cores)"), startCol = 3, startRow = 38) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_speed, " (unit: MHz)"), startCol = 3, startRow = 39) + openxlsx::writeData(wb, 2, paste0(info_table$memory_info, " (unit: GB)"), startCol = 3, startRow = 40) + openxlsx::writeData(wb, 2, paste0(info_table$memory_speed, " (unit: MHz)"), startCol = 3, startRow = 41) + setColWidths(wb, 2, cols = 3, widths = 55) - addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:24), cols = 3) - addStyle(wb, 2, sh2EndTableStyle, rows = 29:30, cols = 3) + addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:23,32:41), cols = 3) + addStyle(wb, 2, sh2EndTableStyle, rows = 28:29, cols = 3) - openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 24) - openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 29) - openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 30) - addStyle(wb, 2, italicStyle, rows = 24, cols = 4) - addStyle(wb, 2, sh2LegendStyle, rows = 29:30, cols = 4) + openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 23) + openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 28) + openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 29) + addStyle(wb, 2, italicStyle, rows = 23, cols = 4) + addStyle(wb, 2, sh2LegendStyle, rows = 28:29, cols = 4) ################################################################################ # Write the third sheet X times with X is the number of standard @@ -1809,8 +1842,6 @@ export_PXA <- function(user, maxBar, chem_type, adducts, project_informations, p export_phase1 <- function(user, maxBar, chem_type, adducts, project_informations, pbValue, output = ""){ - library(openxlsx) - #library(XLConnect) # for some more functions allProj <- deconvolution_params()[which(deconvolution_params()$chemical_type %in% chem_type),] myProjDeconv <- allProj[which(allProj$project == project_informations$project),] for(adduct in adducts){ @@ -1927,13 +1958,15 @@ export_phase1 <- function(user, maxBar, chem_type, adducts, project_informations openxlsx::writeData(wb, 2, "Standard", startRow = 15, startCol = 2) openxlsx::writeData(wb, 2, c("Formula","Adduct","Retention time 1","Retention time 2"), startRow = 16, startCol = 2) openxlsx::writeData(wb, 2, "Deconvolution process", startRow = 21, startCol = 2) - openxlsx::writeData(wb, 2, c("Start time","Computer","Duration"), startRow = 22, startCol = 2) - openxlsx::writeData(wb, 2, "Display format", startRow = 26, startCol = 2) - openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 27, startCol = 2) - openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 28, startCol = 2) - openxlsx::writeData(wb, 2, "Score threshold", startRow = 29, startCol = 2) - openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 30, startCol = 2) - addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,26), cols = 2) + openxlsx::writeData(wb, 2, c("Start time","Duration (minutes)"), startRow = 22, startCol = 2) + openxlsx::writeData(wb, 2, "Display format", startRow = 25, startCol = 2) + openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 26, startCol = 2) + openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 27, startCol = 2) + openxlsx::writeData(wb, 2, "Score threshold", startRow = 28, startCol = 2) + openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 29, startCol = 2) + openxlsx::writeData(wb, 2, "Computer Hardware", startRow = 31, startCol = 2) + openxlsx::writeData(wb, 2, c("Computer Manufacturer","Computer Model","Operating System","System Type", "CPU Manufacturer", "CPU Name", "Number of CPU Cores", "CPU Speed", "Installed Memory","RAM Speed"), startRow = 32, startCol = 2) + addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,25,31), cols = 2) setColWidths(wb, 2, cols = 2, widths = 25) # Mass tolerance @@ -2050,20 +2083,31 @@ export_phase1 <- function(user, maxBar, chem_type, adducts, project_informations stdInfo$retention_time_max[which(stdInfo$chemical_type == std[2])]))," min"), startCol = 3, startRow = 19) ################################# - openxlsx::writeData(wb, 2, "time when started", startCol = 3, startRow = 22) # surement à créer - openxlsx::writeData(wb, 2, "computer name", startCol = 3, startRow = 23) # surement à créer - openxlsx::writeData(wb, 2, "time of duration", startCol = 3, startRow = 24) # surement à créer - openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 29) # pas compris - openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 30) # pas compris + info_table <- get_infos(db, input$project) + openxlsx::writeData(wb, 2, info_table$time_start, startCol = 3, startRow = 22) + openxlsx::writeData(wb, 2, info_table$time_diff, startCol = 3, startRow = 23) + openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 28) + openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 29) + openxlsx::writeData(wb, 2, info_table$computer_manufacturer, startCol = 3, startRow = 32) + openxlsx::writeData(wb, 2, info_table$computer_model, startCol = 3, startRow = 33) + openxlsx::writeData(wb, 2, info_table$os_info, startCol = 3, startRow = 34) + openxlsx::writeData(wb, 2, info_table$system_type, startCol = 3, startRow = 35) + openxlsx::writeData(wb, 2, info_table$cpu_manufacturer, startCol = 3, startRow = 36) + openxlsx::writeData(wb, 2, info_table$processor_info, startCol = 3, startRow = 37) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_cores, " (unit: cores)"), startCol = 3, startRow = 38) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_speed, " (unit: MHz)"), startCol = 3, startRow = 39) + openxlsx::writeData(wb, 2, paste0(info_table$memory_info, " (unit: GB)"), startCol = 3, startRow = 40) + openxlsx::writeData(wb, 2, paste0(info_table$memory_speed, " (unit: MHz)"), startCol = 3, startRow = 41) + setColWidths(wb, 2, cols = 3, widths = 55) - addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:24), cols = 3) - addStyle(wb, 2, sh2EndTableStyle, rows = 29:30, cols = 3) + addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:23,32:41), cols = 3) + addStyle(wb, 2, sh2EndTableStyle, rows = 28:29, cols = 3) - openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 24) - openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 29) - openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 30) - addStyle(wb, 2, italicStyle, rows = 24, cols = 4) - addStyle(wb, 2, sh2LegendStyle, rows = 29:30, cols = 4) + openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 23) + openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 28) + openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 29) + addStyle(wb, 2, italicStyle, rows = 23, cols = 4) + addStyle(wb, 2, sh2LegendStyle, rows = 28:29, cols = 4) ################################################################################ # Write the third sheet X times with X is the number of standard @@ -2189,7 +2233,7 @@ export_phase1 <- function(user, maxBar, chem_type, adducts, project_informations # Create the sheet of the file label addWorksheet(wb = wb, sheetName = file, gridLines = FALSE) - openxlsx::writeData(wb, sheet, paste("CP-Seeker Version"), startRow = 1) + openxlsx::writeData(wb, sheet, config$appname, startRow = 1) openxlsx::writeData(wb, sheet, file, startRow = 2) mySample <- samples()[which(samples()$sample %in% myActualFile$sample),] if(unique(mySample$polarity == "negative")){ @@ -2571,8 +2615,6 @@ export_phase1 <- function(user, maxBar, chem_type, adducts, project_informations } export_phase2 <- function(user, maxBar, chem_type, adducts, project_informations, pbValue, output = ""){ - library(openxlsx) - #library(XLConnect) # for some more functions allProj <- deconvolution_params()[which(deconvolution_params()$chemical_type %in% chem_type),] myProjDeconv <- allProj[which(allProj$project == project_informations$project),] for(adduct in adducts){ @@ -2689,13 +2731,15 @@ export_phase2 <- function(user, maxBar, chem_type, adducts, project_informations openxlsx::writeData(wb, 2, "Standard", startRow = 15, startCol = 2) openxlsx::writeData(wb, 2, c("Formula","Adduct","Retention time 1","Retention time 2"), startRow = 16, startCol = 2) openxlsx::writeData(wb, 2, "Deconvolution process", startRow = 21, startCol = 2) - openxlsx::writeData(wb, 2, c("Start time","Computer","Duration"), startRow = 22, startCol = 2) - openxlsx::writeData(wb, 2, "Display format", startRow = 26, startCol = 2) - openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 27, startCol = 2) - openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 28, startCol = 2) - openxlsx::writeData(wb, 2, "Score threshold", startRow = 29, startCol = 2) - openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 30, startCol = 2) - addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,26), cols = 2) + openxlsx::writeData(wb, 2, c("Start time","Duration (minutes)"), startRow = 22, startCol = 2) + openxlsx::writeData(wb, 2, "Display format", startRow = 25, startCol = 2) + openxlsx::writeData(wb, 2, "Out of m/z range, or number of halogen higher than number of carbon plus 3, or not processed", startRow = 26, startCol = 2) + openxlsx::writeData(wb, 2, "Stadding (at least the 2 most intense isotopomer groups)", startRow = 27, startCol = 2) + openxlsx::writeData(wb, 2, "Score threshold", startRow = 28, startCol = 2) + openxlsx::writeData(wb, 2, "Deviation tolerance (\u00b1 mDa)", startRow = 29, startCol = 2) + openxlsx::writeData(wb, 2, "Computer Hardware", startRow = 31, startCol = 2) + openxlsx::writeData(wb, 2, c("Computer Manufacturer","Computer Model","Operating System","System Type", "CPU Manufacturer", "CPU Name", "Number of CPU Cores", "CPU Speed", "Installed Memory","RAM Speed"), startRow = 32, startCol = 2) + addStyle(wb, 2, boldStyle, rows = c(4,11,15,21,25,31), cols = 2) setColWidths(wb, 2, cols = 2, widths = 25) # Mass tolerance @@ -2812,21 +2856,31 @@ export_phase2 <- function(user, maxBar, chem_type, adducts, project_informations stdInfo$retention_time_max[which(stdInfo$chemical_type == std[2])]))," min"), startCol = 3, startRow = 19) ################################# - openxlsx::writeData(wb, 2, "time when started", startCol = 3, startRow = 22) # surement à créer - openxlsx::writeData(wb, 2, "computer name", startCol = 3, startRow = 23) # surement à créer - openxlsx::writeData(wb, 2, "time of duration", startCol = 3, startRow = 24) # surement à créer - openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 29) # pas compris - openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 30) # pas compris - setColWidths(wb, 2, cols = 3, widths = 55) - addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:24), cols = 3) - addStyle(wb, 2, sh2EndTableStyle, rows = 29:30, cols = 3) - - openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 24) - openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 29) - openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 30) - addStyle(wb, 2, italicStyle, rows = 24, cols = 4) - addStyle(wb, 2, sh2LegendStyle, rows = 29:30, cols = 4) + info_table <- get_infos(db, input$project) + openxlsx::writeData(wb, 2, info_table$time_start, startCol = 3, startRow = 22) + openxlsx::writeData(wb, 2, info_table$time_diff, startCol = 3, startRow = 23) + openxlsx::writeData(wb, 2, paste0(as.numeric(80),"%"), startCol = 3, startRow = 28) + openxlsx::writeData(wb, 2, as.numeric(2), startCol = 3, startRow = 29) + openxlsx::writeData(wb, 2, info_table$computer_manufacturer, startCol = 3, startRow = 32) + openxlsx::writeData(wb, 2, info_table$computer_model, startCol = 3, startRow = 33) + openxlsx::writeData(wb, 2, info_table$os_info, startCol = 3, startRow = 34) + openxlsx::writeData(wb, 2, info_table$system_type, startCol = 3, startRow = 35) + openxlsx::writeData(wb, 2, info_table$cpu_manufacturer, startCol = 3, startRow = 36) + openxlsx::writeData(wb, 2, info_table$processor_info, startCol = 3, startRow = 37) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_cores, " (unit: cores)"), startCol = 3, startRow = 38) + openxlsx::writeData(wb, 2, paste0(info_table$cpu_speed, " (unit: MHz)"), startCol = 3, startRow = 39) + openxlsx::writeData(wb, 2, paste0(info_table$memory_info, " (unit: GB)"), startCol = 3, startRow = 40) + openxlsx::writeData(wb, 2, paste0(info_table$memory_speed, " (unit: MHz)"), startCol = 3, startRow = 41) + setColWidths(wb, 2, cols = 3, widths = 55) + addStyle(wb, 2, sh2TableStyle, rows = c(5:9,12:13,16:19,22:23,32:41), cols = 3) + addStyle(wb, 2, sh2EndTableStyle, rows = 28:29, cols = 3) + + openxlsx::writeData(wb, 2, "Possibly includes processing of other family and adduct types", startCol = 4, startRow = 23) + openxlsx::writeData(wb, 2, "Number in grey police if below", startCol = 4, startRow = 28) + openxlsx::writeData(wb, 2, "Number in grey police if outside", startCol = 4, startRow = 29) + addStyle(wb, 2, italicStyle, rows = 23, cols = 4) + addStyle(wb, 2, sh2LegendStyle, rows = 28:29, cols = 4) ################################################################################ # Write the third sheet X times with X is the number of standard sheet <- 3 @@ -2951,7 +3005,7 @@ export_phase2 <- function(user, maxBar, chem_type, adducts, project_informations # Create the sheet of the file label addWorksheet(wb = wb, sheetName = file, gridLines = FALSE) - openxlsx::writeData(wb, sheet, paste("CP-Seeker Version"), startRow = 1) + openxlsx::writeData(wb, sheet, config$appname, startRow = 1) openxlsx::writeData(wb, sheet, file, startRow = 2) mySample <- samples()[which(samples()$sample %in% myActualFile$sample),] if(unique(mySample$polarity == "negative")){ diff --git a/server/file.R b/server/file.R index 8d29a218e..f42ea3ae6 100644 --- a/server/file.R +++ b/server/file.R @@ -230,7 +230,7 @@ shiny::observeEvent(input$file_associate_valid2, { shinyFiles::shinyFileChoose(input, 'file_import', roots = volumes, filetypes = c('mzML', 'mzXML', 'CDF', 'RAW', 'd', 'YEP', 'BAF', 'FID', 'WIFF', 'MGF')) -#' @title File importation event +#' @title File import event #' #' @description #' open a modal for user to give sample ids for each file imported in a datatable diff --git a/server/func.R b/server/func.R index b5317a36f..e143e85a3 100644 --- a/server/func.R +++ b/server/func.R @@ -138,7 +138,7 @@ sweet_alert_error <- function(title = "", msg = "") shinyWidgets::sendSweetAlert text = shiny::tags$div(msg, shiny::tags$br(), shiny::tags$a(href = sprintf( 'mailto:sebastien.hutinet@oniris-nantes.fr?subject=Describe header of error&body=don\'t forget to attach error log (in "%s") and database if needed (in "%s")', - normalizePath('~/../.NIASSeeker/error.log'), normalizePath("")), + normalizePath(error_log_path), normalizePath("")), "Contact me" ) ), type='error') diff --git a/server/process.R b/server/process.R index 1c292b866..31c164d82 100644 --- a/server/process.R +++ b/server/process.R @@ -327,11 +327,15 @@ output$process_MS <- plotly::renderPlotly({ #' @param input$process_standard_adduct string adduct name for standard #' @param input$process_standard_retention_time float, standard retention time #' + shiny::observeEvent(input$process_launch, { print('############################################################') print('######################### PROCESS ##########################') print('############################################################') print(Sys.time()) + start_time <- Sys.time() + start_deconvolution <- as.character(start_time, units = "mins") + param <- list(standard_study = input$process_standard_study) params <- list( project = input$project, @@ -589,7 +593,7 @@ shiny::observeEvent(input$process_launch, { peaks2_standard)) } } - + shinyWidgets::updateProgressBar(session, id = 'pb', title = msg, value = 100) delete_features(db, params$project_samples, params$adduct, params$chemical_type) @@ -624,7 +628,69 @@ shiny::observeEvent(input$process_launch, { sweet_alert_error(e$message) }) print(Sys.time()) + end_time <- Sys.time() + + # Calculate the difference between end_time and start_time + time_diff <- end_time - start_time + print(paste(time_diff)) + + # Convert the time difference in minutes + minutes_diff <- as.character(time_diff, units = "mins") + print('############################################################') print('######################### END PROCESS ######################') print('############################################################') -}) + + print('############################################################') + print('####################### GET PC USER INFO ###################') + print('############################################################') + + computer_manufacturer <- system("powershell (Get-CimInstance -ClassName Win32_ComputerSystem).Manufacturer", intern = TRUE) + print(computer_manufacturer) + computer_model <- system("powershell (Get-CimInstance -ClassName Win32_ComputerSystem).Model", intern = TRUE) + print(computer_model) + + # Systeme d'exploitation et son architecture + os_info <- system("powershell (Get-CimInstance -ClassName Win32_OperatingSystem).Caption", intern = TRUE) + print(os_info) + system_type <- system("powershell (Get-CimInstance -ClassName Win32_ComputerSystem).SystemType", intern = TRUE) + print(system_type) + + # Obtenir les informations sur le processeur + cpu_manufacturer <- system("powershell (Get-CimInstance -ClassName Win32_Processor).Manufacturer", intern = TRUE) + print(cpu_manufacturer) + processor_info <- system("powershell Get-WmiObject Win32_Processor | Select-Object -ExpandProperty Name", intern = TRUE) + print(processor_info) + cpu_cores <- system("powershell (Get-CimInstance -ClassName Win32_Processor).NumberOfCores", intern = TRUE) + print(cpu_cores) + cpu_speed <- system("powershell (Get-CimInstance -ClassName Win32_Processor).MaxClockSpeed", intern = TRUE) + print(cpu_speed) + + # Obtenir les informations sur la mémoire physique + memory_info <- system("powershell (Get-WmiObject Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1GB", intern = TRUE) + print(memory_info) + memory_speed <- system("powershell Get-CimInstance -ClassName CIM_PhysicalMemory | Select-Object -ExpandProperty Speed", intern = TRUE) + print(memory_speed) + + infos <- list( + project = input$project, + time_start = start_deconvolution, + time_end = end_time, + time_diff = minutes_diff, + computer_manufacturer = computer_manufacturer, + computer_model = computer_model, + os_info = os_info, + system_type = system_type, + cpu_manufacturer = cpu_manufacturer, + processor_info = processor_info, + cpu_cores = cpu_cores, + cpu_speed = cpu_speed, + memory_info = memory_info, + memory_speed = memory_speed + ) + record_deconvolution_infos(db, infos) + + print('############################################################') + print('####################### END PC USER INFO ###################') + print('############################################################') +}) \ No newline at end of file diff --git a/server/process_results.R b/server/process_results.R index c371e4768..5f0d208c6 100644 --- a/server/process_results.R +++ b/server/process_results.R @@ -516,7 +516,7 @@ shiny::observeEvent(input$export_button,{ pbValue <- 0 # When add unique is when we considered all chem type in one family maxBar <- length(unique(allDeconv$adduct)) shinyWidgets::progressSweetAlert(session, 'exportBar', value = pbValue, title = "Export...", striped = TRUE, display_pct = TRUE) - full_mat <- mat() + full_mat <- mat(export = TRUE) finalResult <- NULL for(adduct in unique(allDeconv$adduct)){ pbValue <- pbValue + 1 diff --git a/server/reactiveValues.R b/server/reactiveValues.R index ff89e7e13..a8e84fa71 100644 --- a/server/reactiveValues.R +++ b/server/reactiveValues.R @@ -34,7 +34,7 @@ actualize <- shiny::reactiveValues( #' update when user changes the actual project #' #' @return list of matrix -mat <- reactive({ +mat <- function(export = FALSE) { actualize$deconvolution_params query <- sprintf('select chemical_type, adduct from deconvolution_param where project == %s and chemical_type in (select chemical_type from chemical where chemical_familly != "Standard");', @@ -47,14 +47,14 @@ mat <- reactive({ mat2 <- sapply(samples$sample_id[i], function(project){ sapply(unique(chemicals$chemical_type), function(chemical){ sapply(unique(chemicals$adduct[which(chemicals$chemical_type == chemical)]), function(adduct){ - get_profile_matrix(db, samples$project_sample[i], adduct, chemical) + get_profile_matrix(db, samples$project_sample[i], adduct, chemical, export = export) }, simplify = FALSE, USE.NAMES = TRUE) }, simplify = FALSE, USE.NAMES = TRUE) }, simplify = FALSE, USE.NAMES = TRUE) mat <- append(mat, mat2) } return(mat) -}) +} #' @title Matrix with filters reactive value #' diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/DESCRIPTION b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/DESCRIPTION new file mode 100644 index 000000000..f53bc6b04 --- /dev/null +++ b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/DESCRIPTION @@ -0,0 +1,14 @@ +Package: cppFuncs +Type: Package +Title: Optimize CP-Seeker +Version: 0.1.0 +Author: Damien Rat +Maintainer: The package maintainer +Description: This package optimizes the CP-Seeker application. The code belonging to it is developed in cpp and exported by Rcpp as classic R functions. The functions can be called up in the software's R code to speed up certain tasks. +License: GPL (>= 3) +Encoding: UTF-8 +RoxygenNote: 7.3.1 +LinkingTo: Rcpp +Imports: Rcpp +NeedsCompilation: yes +Packaged: 2024-04-15 15:42:05 UTC; DRA diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/NAMESPACE b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/NAMESPACE new file mode 100644 index 000000000..8da2ef51f --- /dev/null +++ b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/NAMESPACE @@ -0,0 +1,3 @@ +useDynLib(cppFuncs, .registration=TRUE) +exportPattern("^[[:alpha:]]+") +importFrom(Rcpp, evalCpp) diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/R/RcppExports.R b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/R/RcppExports.R new file mode 100644 index 000000000..c1b93d48b --- /dev/null +++ b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/R/RcppExports.R @@ -0,0 +1,7 @@ +# Generated by using Rcpp::compileAttributes() -> do not edit by hand +# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 + +ppm_to_da <- function(mass, ppm) { + .Call(`_cppFuncs_ppm_to_da`, mass, ppm) +} + diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/RcppExports.cpp b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/RcppExports.cpp new file mode 100644 index 000000000..18852632e --- /dev/null +++ b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/RcppExports.cpp @@ -0,0 +1,34 @@ +// Generated by using Rcpp::compileAttributes() -> do not edit by hand +// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 + +#include + +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 + +// ppm_to_da +NumericVector ppm_to_da(NumericVector mass, double ppm); +RcppExport SEXP _cppFuncs_ppm_to_da(SEXP massSEXP, SEXP ppmSEXP) { +BEGIN_RCPP + Rcpp::RObject rcpp_result_gen; + Rcpp::RNGScope rcpp_rngScope_gen; + Rcpp::traits::input_parameter< NumericVector >::type mass(massSEXP); + Rcpp::traits::input_parameter< double >::type ppm(ppmSEXP); + rcpp_result_gen = Rcpp::wrap(ppm_to_da(mass, ppm)); + return rcpp_result_gen; +END_RCPP +} + +static const R_CallMethodDef CallEntries[] = { + {"_cppFuncs_ppm_to_da", (DL_FUNC) &_cppFuncs_ppm_to_da, 2}, + {NULL, NULL, 0} +}; + +RcppExport void R_init_cppFuncs(DllInfo *dll) { + R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); + R_useDynamicSymbols(dll, FALSE); +} diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/RcppExports.o b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/RcppExports.o new file mode 100644 index 000000000..8dfec011e Binary files /dev/null and b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/RcppExports.o differ diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/cppFuncs.dll b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/cppFuncs.dll new file mode 100644 index 000000000..7ecce2338 Binary files /dev/null and b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/cppFuncs.dll differ diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/symbols.rds b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/symbols.rds new file mode 100644 index 000000000..7c7fff792 Binary files /dev/null and b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/symbols.rds differ diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/test.cpp b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/test.cpp new file mode 100644 index 000000000..6d2cdd6d1 --- /dev/null +++ b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/test.cpp @@ -0,0 +1,11 @@ +#include +using namespace Rcpp; + +// [[Rcpp::export]] +NumericVector ppm_to_da(NumericVector mass, double ppm) { + NumericVector result(mass.size()); + for (int i = 0; i < mass.size(); ++i) { + result[i] = mass[i] * ppm * pow(10, -6); + } + return result; +} diff --git a/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/test.o b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/test.o new file mode 100644 index 000000000..9e2d88651 Binary files /dev/null and b/src/cppFuncs.Rcheck/00_pkg_src/cppFuncs/src/test.o differ diff --git a/src/cppFuncs.Rcheck/00check.log b/src/cppFuncs.Rcheck/00check.log new file mode 100644 index 000000000..238f077e0 --- /dev/null +++ b/src/cppFuncs.Rcheck/00check.log @@ -0,0 +1,58 @@ +* using log directory 'C:/Users/DRA/Desktop/CP-Seeker/src/cppFuncs.Rcheck' +* using R version 4.3.3 (2024-02-29 ucrt) +* using platform: x86_64-w64-mingw32 (64-bit) +* R was compiled by + gcc.exe (GCC) 12.3.0 + GNU Fortran (GCC) 12.3.0 +* running under: Windows 11 x64 (build 22631) +* using session charset: UTF-8 +* using options '--no-manual --as-cran' +* checking for file 'cppFuncs/DESCRIPTION' ... OK +* checking extension type ... Package +* this is package 'cppFuncs' version '0.1.0' +* package encoding: UTF-8 +* checking package namespace information ... OK +* checking package dependencies ... OK +* checking if this is a source package ... OK +* checking if there is a namespace ... OK +* checking for executable files ... OK +* checking for hidden files and directories ... OK +* checking for portable file names ... OK +* checking serialization versions ... OK +* checking whether package 'cppFuncs' can be installed ... [11s] OK +* used C++ compiler: 'G__~1.EXE (GCC) 12.3.0' +* checking installed package size ... OK +* checking package directory ... OK +* checking for future file timestamps ... OK +* checking DESCRIPTION meta-information ... OK +* checking top-level files ... OK +* checking for left-over files ... OK +* checking index information ... OK +* checking package subdirectories ... OK +* checking R files for non-ASCII characters ... OK +* checking R files for syntax errors ... OK +* checking whether the package can be loaded ... OK +* checking whether the package can be loaded with stated dependencies ... OK +* checking whether the package can be unloaded cleanly ... OK +* checking whether the namespace can be loaded with stated dependencies ... OK +* checking whether the namespace can be unloaded cleanly ... OK +* checking dependencies in R code ... OK +* checking S3 generic/method consistency ... OK +* checking replacement functions ... OK +* checking foreign function calls ... OK +* checking R code for possible problems ... OK +* checking for missing documentation entries ... WARNING +Objets code non documentés : + 'ppm_to_da' +All user-level objects in a package should have documentation entries. +See chapter 'Writing R documentation files' in the 'Writing R +Extensions' manual. +* checking line endings in C/C++/Fortran sources/headers ... OK +* checking pragmas in C/C++ headers and code ... OK +* checking compilation flags used ... OK +* checking compiled code ... OK +* checking examples ... NONE +* checking for non-standard things in the check directory ... OK +* checking for detritus in the temp directory ... OK +* DONE +Status: 1 WARNING diff --git a/src/cppFuncs.Rcheck/00install.out b/src/cppFuncs.Rcheck/00install.out new file mode 100644 index 000000000..ffbbbc2b7 --- /dev/null +++ b/src/cppFuncs.Rcheck/00install.out @@ -0,0 +1,18 @@ +* installing *source* package 'cppFuncs' ... +** using staged installation +** libs +using C++ compiler: 'G__~1.EXE (GCC) 12.3.0' +g++ -std=gnu++17 -I"C:/Users/DRA/AppData/Local/Programs/R/R-43~1.3/include" -DNDEBUG -I'C:/Users/DRA/AppData/Local/Programs/R/R-4.3.3/library/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o +g++ -std=gnu++17 -I"C:/Users/DRA/AppData/Local/Programs/R/R-43~1.3/include" -DNDEBUG -I'C:/Users/DRA/AppData/Local/Programs/R/R-4.3.3/library/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c test.cpp -o test.o +g++ -std=gnu++17 -shared -s -static-libgcc -o cppFuncs.dll tmp.def RcppExports.o test.o -LC:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib -LC:/Users/DRA/AppData/Local/Programs/R/R-43~1.3/bin/x64 -lR +installing to C:/Users/DRA/Desktop/CP-Seeker/src/cppFuncs.Rcheck/00LOCK-cppFuncs/00new/cppFuncs/libs/x64 +** R +** byte-compile and prepare package for lazy loading +** help +No man pages found in package 'cppFuncs' +*** installing help indices +** building package indices +** testing if installed package can be loaded from temporary location +** testing if installed package can be loaded from final location +** testing if installed package keeps a record of temporary installation path +* DONE (cppFuncs) diff --git a/src/cppFuncs.Rcheck/cppFuncs/DESCRIPTION b/src/cppFuncs.Rcheck/cppFuncs/DESCRIPTION new file mode 100644 index 000000000..052612c28 --- /dev/null +++ b/src/cppFuncs.Rcheck/cppFuncs/DESCRIPTION @@ -0,0 +1,16 @@ +Package: cppFuncs +Type: Package +Title: Optimize CP-Seeker +Version: 0.1.0 +Author: Damien Rat +Maintainer: The package maintainer +Description: This package optimizes the CP-Seeker application. The code belonging to it is developed in cpp and exported by Rcpp as classic R functions. The functions can be called up in the software's R code to speed up certain tasks. +License: GPL (>= 3) +Encoding: UTF-8 +RoxygenNote: 7.3.1 +LinkingTo: Rcpp +Imports: Rcpp +NeedsCompilation: yes +Packaged: 2024-04-15 15:42:05 UTC; DRA +Built: R 4.3.3; x86_64-w64-mingw32; 2024-04-15 15:42:08 UTC; windows +Archs: x64 diff --git a/src/cppFuncs.Rcheck/cppFuncs/Meta/Rd.rds b/src/cppFuncs.Rcheck/cppFuncs/Meta/Rd.rds new file mode 100644 index 000000000..a8e841c72 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/Meta/Rd.rds differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/Meta/features.rds b/src/cppFuncs.Rcheck/cppFuncs/Meta/features.rds new file mode 100644 index 000000000..df2baf11b Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/Meta/features.rds differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/Meta/hsearch.rds b/src/cppFuncs.Rcheck/cppFuncs/Meta/hsearch.rds new file mode 100644 index 000000000..a5ca93fa8 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/Meta/hsearch.rds differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/Meta/links.rds b/src/cppFuncs.Rcheck/cppFuncs/Meta/links.rds new file mode 100644 index 000000000..79bc2ad0a Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/Meta/links.rds differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/Meta/nsInfo.rds b/src/cppFuncs.Rcheck/cppFuncs/Meta/nsInfo.rds new file mode 100644 index 000000000..1e7976262 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/Meta/nsInfo.rds differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/Meta/package.rds b/src/cppFuncs.Rcheck/cppFuncs/Meta/package.rds new file mode 100644 index 000000000..1911f8d85 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/Meta/package.rds differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/NAMESPACE b/src/cppFuncs.Rcheck/cppFuncs/NAMESPACE new file mode 100644 index 000000000..8da2ef51f --- /dev/null +++ b/src/cppFuncs.Rcheck/cppFuncs/NAMESPACE @@ -0,0 +1,3 @@ +useDynLib(cppFuncs, .registration=TRUE) +exportPattern("^[[:alpha:]]+") +importFrom(Rcpp, evalCpp) diff --git a/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs b/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs new file mode 100644 index 000000000..668615632 --- /dev/null +++ b/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs @@ -0,0 +1,27 @@ +# File share/R/nspackloader.R +# Part of the R package, https://www.R-project.org +# +# Copyright (C) 1995-2012 The R Core Team +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# A copy of the GNU General Public License is available at +# https://www.r-project.org/Licenses/ + +local({ + info <- loadingNamespaceInfo() + pkg <- info$pkgname + ns <- .getNamespace(as.name(pkg)) + if (is.null(ns)) + stop("cannot find namespace environment for ", pkg, domain = NA); + dbbase <- file.path(info$libname, pkg, "R", pkg) + lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.") +}) diff --git a/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs.rdb b/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs.rdb new file mode 100644 index 000000000..4f4e685fa Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs.rdb differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs.rdx b/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs.rdx new file mode 100644 index 000000000..2d8e1df36 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/R/cppFuncs.rdx differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/help/AnIndex b/src/cppFuncs.Rcheck/cppFuncs/help/AnIndex new file mode 100644 index 000000000..e69de29bb diff --git a/src/cppFuncs.Rcheck/cppFuncs/help/aliases.rds b/src/cppFuncs.Rcheck/cppFuncs/help/aliases.rds new file mode 100644 index 000000000..02353d205 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/help/aliases.rds differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/help/cppFuncs.rdb b/src/cppFuncs.Rcheck/cppFuncs/help/cppFuncs.rdb new file mode 100644 index 000000000..e69de29bb diff --git a/src/cppFuncs.Rcheck/cppFuncs/help/cppFuncs.rdx b/src/cppFuncs.Rcheck/cppFuncs/help/cppFuncs.rdx new file mode 100644 index 000000000..d80547eed Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/help/cppFuncs.rdx differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/help/paths.rds b/src/cppFuncs.Rcheck/cppFuncs/help/paths.rds new file mode 100644 index 000000000..bde9195c8 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/help/paths.rds differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/html/00Index.html b/src/cppFuncs.Rcheck/cppFuncs/html/00Index.html new file mode 100644 index 000000000..f820d6cb5 --- /dev/null +++ b/src/cppFuncs.Rcheck/cppFuncs/html/00Index.html @@ -0,0 +1,24 @@ + + +R: Optimize CP-Seeker + + + +
    +

    Optimize CP-Seeker + +

    +
    +
    +[Up] +[Top] +

    Documentation for package ‘cppFuncs’ version 0.1.0

    + + + +

    Help Pages

    + + +There are no help pages in this package +
    diff --git a/src/cppFuncs.Rcheck/cppFuncs/html/R.css b/src/cppFuncs.Rcheck/cppFuncs/html/R.css new file mode 100644 index 000000000..c2289098f --- /dev/null +++ b/src/cppFuncs.Rcheck/cppFuncs/html/R.css @@ -0,0 +1,130 @@ +@media screen { + .container { + padding-right: 10px; + padding-left: 10px; + margin-right: auto; + margin-left: auto; + max-width: 900px; + } +} + +.rimage img { /* from knitr - for examples and demos */ + width: 96%; + margin-left: 2%; +} + +.katex { font-size: 1.1em; } + +code { + color: inherit; + background: inherit; +} + +body { + line-height: 1.4; + background: white; + color: black; +} + +a:link { + background: white; + color: blue; +} + +a:visited { + background: white; + color: rgb(50%, 0%, 50%); +} + +h1 { + background: white; + color: rgb(55%, 55%, 55%); + font-family: monospace; + font-size: 1.4em; /* x-large; */ + text-align: center; +} + +h2 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; + font-size: 1.2em; /* large; */ + text-align: center; +} + +h3 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; + font-size: 1.2em; /* large; */ +} + +h4 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; + font-style: italic; + font-size: 1.2em; /* large; */ +} + +h5 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; +} + +h6 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; + font-style: italic; +} + +img.toplogo { + width: 4em; + vertical-align: middle; +} + +img.arrow { + width: 30px; + height: 30px; + border: 0; +} + +span.acronym { + font-size: small; +} + +span.env { + font-family: monospace; +} + +span.file { + font-family: monospace; +} + +span.option{ + font-family: monospace; +} + +span.pkg { + font-weight: bold; +} + +span.samp{ + font-family: monospace; +} + +div.vignettes a:hover { + background: rgb(85%, 85%, 85%); +} + +tr { + vertical-align: top; +} + +span.rlang { + font-family: Courier New, Courier; + color: #666666; +} + diff --git a/src/cppFuncs.Rcheck/cppFuncs/libs/x64/cppFuncs.dll b/src/cppFuncs.Rcheck/cppFuncs/libs/x64/cppFuncs.dll new file mode 100644 index 000000000..7ecce2338 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/libs/x64/cppFuncs.dll differ diff --git a/src/cppFuncs.Rcheck/cppFuncs/libs/x64/symbols.rds b/src/cppFuncs.Rcheck/cppFuncs/libs/x64/symbols.rds new file mode 100644 index 000000000..7c7fff792 Binary files /dev/null and b/src/cppFuncs.Rcheck/cppFuncs/libs/x64/symbols.rds differ diff --git a/src/cppFuncs/.RData b/src/cppFuncs/.RData new file mode 100644 index 000000000..8a033cbf2 Binary files /dev/null and b/src/cppFuncs/.RData differ diff --git a/src/cppFuncs/.Rbuildignore b/src/cppFuncs/.Rbuildignore new file mode 100644 index 000000000..e13c4051c --- /dev/null +++ b/src/cppFuncs/.Rbuildignore @@ -0,0 +1,3 @@ +^.*\.Rproj$ +^\.Rproj\.user$ +^LICENSE\.md$ diff --git a/src/cppFuncs/.Rhistory b/src/cppFuncs/.Rhistory new file mode 100644 index 000000000..ec233053c --- /dev/null +++ b/src/cppFuncs/.Rhistory @@ -0,0 +1,61 @@ +usethis::use_gpl3_license() +usethis::use_rcpp() +convolve(4, 4) +devtools::load_all(".") +getLoadedDLLs() +Rcpp::compileAttributes() +setwd +setwd() +setwd(dir) +setwd() +devtools::load_all(".") +multiplication(1,3) +devtools::load_all(".") +cmake --version +system("cmake --version") +devtools::load_all(".") +multiplicationCpp(4, 5) +install.packages(utils) +install.packages("utils") +install.packages("utils") +install.packages("utils") +install.packages("utils") +install.packages("Rcpp", version='1.0.6') +package_version(Rcpp) +package_version("Rcpp") +print(sessionInfo()) +print(version) +packageVersion("Rcpp") +install.packages("Rcpp", version='1.0.6') +.libPaths() +install.packages("Rcpp", version='1.0.6') +.libPaths() +.libPaths("C:/Users/DRA/AppData/Local/Programs/R/R-4.3.3/library") +.libPaths() +install.packages("Rcpp", version='1.0.6') +getwd("C:\Users\DRA\AppData\Local\Temp\Rtmp4MI6wX\downloaded_packages") +setwd("../..") +getwd +getwd() +setwd("./R-Portable/library/") +getwd() +.libPaths("C:/Users/DRA/Desktop/CP-Seeker/R-Portable/library") +.libPaths($) +.libPaths() +install.packages("Rcpp", version='1.0.6') +install.packages("Rcpp") +remove.packages("Rcpp") +install.packages("Rcpp") +library("Rcpp") +version("Rcpp") +install.packages(ggplot2) +install.packages("ggplot2") +if (!require("BiocManager", quietly = TRUE)) +install.packages("BiocManager") +BiocManager::install("mzR") +sapply(c("Rcpp", "Seurat"), packageVersion) +install.packages("Rcpp") +install.packages("Rcpp", repos="https://rcppcore.github.io/drat") +library("Rcpp") +install.packages("Rcpp") +install.packages("Rcpp") diff --git a/src/cppFuncs/DESCRIPTION b/src/cppFuncs/DESCRIPTION new file mode 100644 index 000000000..c37fb42f0 --- /dev/null +++ b/src/cppFuncs/DESCRIPTION @@ -0,0 +1,15 @@ +Package: cppFuncs +Type: Package +Title: Optimize CP-Seeker +Version: 0.1.0 +Author: Damien Rat +Maintainer: The package maintainer +Description: This package optimizes the CP-Seeker application. The code belonging to it is developed in cpp and exported by Rcpp as classic R functions. The functions can be called up in the software's R code to speed up certain tasks. +License: GPL (>= 3) +Encoding: UTF-8 +LazyData: true +RoxygenNote: 7.3.1 +LinkingTo: + Rcpp +Imports: + Rcpp diff --git a/src/cppFuncs/NAMESPACE b/src/cppFuncs/NAMESPACE new file mode 100644 index 000000000..8da2ef51f --- /dev/null +++ b/src/cppFuncs/NAMESPACE @@ -0,0 +1,3 @@ +useDynLib(cppFuncs, .registration=TRUE) +exportPattern("^[[:alpha:]]+") +importFrom(Rcpp, evalCpp) diff --git a/src/cppFuncs/R/RcppExports.R b/src/cppFuncs/R/RcppExports.R new file mode 100644 index 000000000..c1b93d48b --- /dev/null +++ b/src/cppFuncs/R/RcppExports.R @@ -0,0 +1,7 @@ +# Generated by using Rcpp::compileAttributes() -> do not edit by hand +# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 + +ppm_to_da <- function(mass, ppm) { + .Call(`_cppFuncs_ppm_to_da`, mass, ppm) +} + diff --git a/src/cppFuncs/cppfunc.Rproj b/src/cppFuncs/cppfunc.Rproj new file mode 100644 index 000000000..497f8bfcf --- /dev/null +++ b/src/cppFuncs/cppfunc.Rproj @@ -0,0 +1,20 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source diff --git a/src/cppFuncs/src/.gitignore b/src/cppFuncs/src/.gitignore new file mode 100644 index 000000000..22034c461 --- /dev/null +++ b/src/cppFuncs/src/.gitignore @@ -0,0 +1,3 @@ +*.o +*.so +*.dll diff --git a/src/cppFuncs/src/RcppExports.cpp b/src/cppFuncs/src/RcppExports.cpp new file mode 100644 index 000000000..18852632e --- /dev/null +++ b/src/cppFuncs/src/RcppExports.cpp @@ -0,0 +1,34 @@ +// Generated by using Rcpp::compileAttributes() -> do not edit by hand +// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 + +#include + +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 + +// ppm_to_da +NumericVector ppm_to_da(NumericVector mass, double ppm); +RcppExport SEXP _cppFuncs_ppm_to_da(SEXP massSEXP, SEXP ppmSEXP) { +BEGIN_RCPP + Rcpp::RObject rcpp_result_gen; + Rcpp::RNGScope rcpp_rngScope_gen; + Rcpp::traits::input_parameter< NumericVector >::type mass(massSEXP); + Rcpp::traits::input_parameter< double >::type ppm(ppmSEXP); + rcpp_result_gen = Rcpp::wrap(ppm_to_da(mass, ppm)); + return rcpp_result_gen; +END_RCPP +} + +static const R_CallMethodDef CallEntries[] = { + {"_cppFuncs_ppm_to_da", (DL_FUNC) &_cppFuncs_ppm_to_da, 2}, + {NULL, NULL, 0} +}; + +RcppExport void R_init_cppFuncs(DllInfo *dll) { + R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); + R_useDynamicSymbols(dll, FALSE); +} diff --git a/src/cppFuncs/src/test.cpp b/src/cppFuncs/src/test.cpp new file mode 100644 index 000000000..e3e0e913f --- /dev/null +++ b/src/cppFuncs/src/test.cpp @@ -0,0 +1,16 @@ +#include +using namespace Rcpp; + +// [[Rcpp::export]] +NumericVector ppm_to_da(NumericVector mass, double ppm) { + NumericVector result(mass.size()); + for (int i = 0; i < mass.size(); ++i) { + result[i] = mass[i] * ppm * pow(10, -6); + } + return result; +} + +// [[Rcpp::export]] +double da_to_ppm(double mass, double da) { + return da * pow(10, 6) / mass; +} diff --git a/src/cppFuncs_0.1.0.tar.gz b/src/cppFuncs_0.1.0.tar.gz new file mode 100644 index 000000000..fd4c08c87 Binary files /dev/null and b/src/cppFuncs_0.1.0.tar.gz differ diff --git a/src/cppFuncs_0.1.0.zip b/src/cppFuncs_0.1.0.zip new file mode 100644 index 000000000..16e5d029b Binary files /dev/null and b/src/cppFuncs_0.1.0.zip differ diff --git a/ui.R b/ui.R index 3cf30817c..b9894c4e5 100644 --- a/ui.R +++ b/ui.R @@ -18,6 +18,13 @@ header <- shiny::tags$header( shiny::tags$div(class = "form-group", style = "float:left", shiny::tags$span(id = "titleApp", class = "logo", appname) ), + shiny::tags$div(class = "form-group", style = "float:right;", + shiny::tags$a(`data-toggle` = "tooltip", + `data-placement` = "left", + title = 'CP-Seeker Documentation', + shiny::actionButton('open_doc', '', icon = icon('file-pdf')) + ) + ), shiny::tags$div(class = "form-group", style = "float: right; padding-top: 0.55%; padding-right: 10px", shiny::tags$table( @@ -69,7 +76,7 @@ sidebar <- shinydashboard::dashboardSidebar(collapsed = TRUE, disable = TRUE, radioButtons("export_format", "Document format", c("Excel", "CSV"),inline = FALSE, selected = 1), shiny::actionButton("export_button", "Launch Report", class = "butt"), tags$head(tags$style(".butt{color: blue !important;}")) - ) + ) ) ) diff --git a/utils/checks.R b/utils/checks.R index 5a61dfa84..b910c4fce 100644 --- a/utils/checks.R +++ b/utils/checks.R @@ -8,9 +8,10 @@ if (is.null(reg_paths$thermo)) stop('Missing thermo in file reg_paths.json') if (is.null(reg_paths$create_database)) stop('Missing create_database in file reg_paths.json') if (is.null(reg_paths$chemical)) stop('Missing chemical in file reg_paths.json') if (is.null(reg_paths$chemical_ion)) stop('Missing chemical_ion in file reg_paths.json') -if (is.null(reg_paths$create_database)) stop('Missing create_database in file reg_paths.json') if (is.null(reg_paths$sqlite_path)) stop('Missing sqlitePath in file reg_paths.json') if (is.null(reg_paths$sqlite_lighted_path)) stop('Missing sqlite lighted path in file reg_paths.json') +if (is.null(reg_paths$documentation_file)) stop('Missing documentation file in file reg_paths.json') +if (is.null(reg_paths$error_log_path)) stop('Missing error.log in file reg_paths.json') for (i in 1:length(reg_paths)){ name <- names(reg_paths[i]) @@ -50,9 +51,18 @@ converter <- reg_paths$converter thermo <- reg_paths$thermo sqlite_path <- reg_paths$sqlite_path sqlite_lighted_path <- reg_paths$sqlite_lighted_path +documentation_file <- reg_paths$documentation_file +error_log_path <- reg_paths$error_log_path + +dll_file <- reg_paths$dll_file + +# Root PATH +app_root <- normalizePath(".", mustWork = FALSE) # create a config file if not exists already -config_dir <- paste0("~/.", appname) +config_dir <- file.path(app_root, "export") + +# Create the "export" directory if it doesn't exist config_file <- file.path(config_dir, "user.cfg") if (!dir.exists(config_dir)) dir.create(config_dir) if (file.exists(config_file)) { @@ -62,4 +72,13 @@ if (file.exists(config_file)) { } else { last_user <- NULL last_project <- NULL -} \ No newline at end of file +} + +if (!file.exists(dll_file)) { + stop("DLL file not found: ", dll_file) +} else { + message("DLL file found ", dll_file) +} + +# Load the DLL file +dyn.load(dll_file) \ No newline at end of file diff --git a/utils/config.cfg b/utils/config.cfg index c947687e2..0f40931cf 100644 --- a/utils/config.cfg +++ b/utils/config.cfg @@ -14,13 +14,13 @@ "DT": ">=0.15", "plotly": ">=4.9.2.1", "stringr": ">=1.4.0", - "fst": ">=0.9.4", + "fst": ">=0.9.4", "blob": ">=1.2.1", "openxlsx": ">=4.2.2", "MSnbase": ">=2.12.0", "xcms": ">=3.8.2", "enviPat": ">=2.4", - "pracma": ">=2.3.3", + "pracma": ">=2.3.3", "dbscan": ">=1.1-6" } } \ No newline at end of file diff --git a/utils/cppFuncs.dll b/utils/cppFuncs.dll new file mode 100644 index 000000000..4829f9d4e Binary files /dev/null and b/utils/cppFuncs.dll differ diff --git a/utils/regpaths.json b/utils/regpaths.json index 0ce9ed9cb..e5e1a4da3 100644 --- a/utils/regpaths.json +++ b/utils/regpaths.json @@ -1,12 +1,15 @@ { -"r": "R-Portable", -"chromium": "chromium/chromium.exe", -"rtools": "Rtools/bin", -"converter": "pwiz/msconvert.exe", -"thermo": "pwiz/ThermoRawMetaDump.exe", -"create_database": "data/create_database.min.sql", -"chemical": "data/chemical.csv", -"chemical_ion": "data/chemical_ion.csv", -"sqlite_path": "database.sqlite", -"sqlite_lighted_path": "database_lighted.sqlite" + "r": "R-Portable", + "chromium": "chromium/chromium.exe", + "rtools": "Rtools/bin", + "converter": "pwiz/msconvert.exe", + "thermo": "pwiz/ThermoRawMetaDump.exe", + "create_database": "data/create_database.min.sql", + "chemical": "data/chemical.csv", + "chemical_ion": "data/chemical_ion.csv", + "sqlite_path": "database.sqlite", + "sqlite_lighted_path": "database_lighted.sqlite", + "dll_file": "utils/cppFuncs.dll", + "documentation_file": "NOT-SCI-004 v003 CP-Seeker Documentation.pdf", + "error_log_path": "C:\\Users\\DRA\\Desktop\\CP-Seeker\\Error_log\\error_2024-04-16-14h-47min.log" } \ No newline at end of file diff --git a/utils/wsf/js/run.js b/utils/wsf/js/run.js index f8aedbcfb..ffd7db75c 100644 --- a/utils/wsf/js/run.js +++ b/utils/wsf/js/run.js @@ -35,17 +35,39 @@ if (this.JSON) { // If deployed to users individually, keep with the deployment (default) // If deployed to a central location (e.g. a network share) use a directory in // each user's %userprofile% -sLogPath = 'log'; -//' Determine User Home directory -var sUPath = oShell.ExpandEnvironmentStrings("%USERPROFILE%"); -var sLogPath = sUPath + "\\." + oConfig.appname; + +// Old code +// sLogPath = 'log'; +// //' Determine User Home directory +// var sUPath = oShell.ExpandEnvironmentStrings("%USERPROFILE%"); +// var sLogPath = sUPath + "\\." + oConfig.appname; + +// New version +// Define the log directory path to store the error log file. +// It is obtained by going three levels up from the current script's directory. +var sLogPath = oFSO.GetParentFolderName(oFSO.GetParentFolderName(oFSO.GetParentFolderName(WScript.ScriptFullName))) + "\\Error_log"; + +//' Create the error log directory if it does not exist +if (!oFSO.FolderExists(sLogPath)) { + try { + oFSO.CreateFolder(sLogPath); + WScript.Echo("Directory created: " + sLogPath); + } catch(e) { + WScript.Echo("Error creating directory: " + sLogPath); + WScript.Quit(1); // Quit the script if directory creation fails + } +} //' Create an application log directory as needed if (!oFSO.FolderExists(sLogPath)) { oFSO.CreateFolder(sLogPath); } -sLogFile = 'error.log'; +// Ajoutez la date dans le nom du fichier error.log +var currentDate = new Date(); +// Format de la date : YYYY-MM-DD_HH-MM +var formattedDate = currentDate.getFullYear() + '-' + ('0' + (currentDate.getMonth() + 1)).slice(-2) + '-' + ('0' + currentDate.getDate()).slice(-2) + '-' + ('0' + currentDate.getHours()).slice(-2) + 'h-' + ('0' + currentDate.getMinutes()).slice(-2) + 'min'; +sLogFile = 'error_' + formattedDate + '.log'; //' Define the R interpreter var Rbindir = ""; @@ -73,6 +95,15 @@ if (!oFSO.FileExists(RScriptFile)) { var Outfile = sLogPath + "\\" + sLogFile; +var regPathsContent = oFSO.OpenTextFile('utils\\regpaths.json', 1).ReadAll(); // Load the current content of regpaths.json +var regPathsObject = JSON.parse(JSON.minify(regPathsContent)); // Convert the JSON content to a JavaScript object +regPathsObject.error_log_path = Outfile; // Update the error log file path +var updatedRegPathsContent = JSON.stringify(regPathsObject, null, 2); // Convert the updated JavaScript object to JSON string +var regPathsFile = oFSO.OpenTextFile('utils\\regpaths.json', 2); // 2 = for writing // Write the JSON string to the regpaths.json file +regPathsFile.Write(updatedRegPathsContent); +regPathsFile.Close(); + + var strCommand = ['"' + Rexe + '"', Ropts, '"' + RScriptFile + '"', "1>", '"' + Outfile + '"', "2>&1"].join(" "); // var strCommand = ['"' + Rexe + '"', RScriptFile].join(" "); var intWindowStyle = 0; diff --git a/www/CPSeeker.css b/www/CPSeeker.css index 583d733fe..82b689621 100644 --- a/www/CPSeeker.css +++ b/www/CPSeeker.css @@ -12,6 +12,13 @@ .selectize-dropdown-content { max-height: 200px; } +#open_doc{ + border: none; + background: none; + color: white; + font-size: 20px; + margin: 4px; +} .lds-dual-ring { display: inline-block; width: 200px;