-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for CRAN release #369
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have attempted to verify this works by using Docker, but I am having trouble installing dartR.base:
This is the contents of the dockerfile I'm working with (which is modified from the one in this repository). Note that I know that I can use install2.r to speed up installation and I will likely do that on my next iteration, but for now, I am done for the night. FROM rocker/r-devel-san
MAINTAINER Thibaut Jombart <[email protected]>
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y libcurl4-openssl-dev libssl-dev libfontconfig1-dev libxml2-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev gdal-bin proj-bin libgdal-dev libproj-dev libgmp3-dev jags
## add guest user
RUN adduser --disabled-password --gecos "" guest
RUN usermod -a -G users guest && usermod -a -G staff guest
RUN chmod a+rw /usr/local/lib/R/site-library -R
## install CRAN packages
# RUN echo 'options(download.file.method = "libcurl", repos = c(CRAN = "https://cran.ma.imperial.ac.uk"))' > ~/.Rprofile
RUN r -e "install.packages('devtools')" \
&& r -e "install.packages('adegenet', dependencies = TRUE)" \
&& r -e 'install.packages("BiocManager")' \
&& r -e 'BiocManager::install("SNPRelate")' \
&& r -e 'install.packages("dartR.base")'
## clone repos to get sources
RUN apt-get install -y git
RUN su guest
RUN mkdir ~/dev
WORKDIR /home/guest/dev
RUN git clone https://github.com/thibautjombart/adegenet
WORKDIR /home/guest/
CMD Rscript -e 'library(dartR.base); gl.pcoa(testset.gl)' |
I also fixed some indentation issues. This was prompted by a message I got from Ivan. I took his suggestion and applied it to `bytesToInt()` and `bytesToDouble()` Ivan Krylov 2:05 AM (14 hours ago) to me Dear Zhian, Thank you for undertaking the fix on such a short notice! I'm afraid there's still one reachable overflow. Consider the case of an SNPbin object with nLoc(.) = 201 byte-packed SNPs. They have to be stored in ceiling(201/8) = 26 bytes, with 7 last bits used for padding. Currently, the functions bytesToInt(), bytesToDouble() [*] always write (*veclength)*8 entries into the destination vector. When nLoc(.) is not divisible by 8, this will cause them to decode and write the padding bytes past the end of 'vecres'. The original case caught by dartR.base involves such an object (with nLoc(.) = 199). I think that the overflow can be avoided by adding a check to the innermost loop: for(j=0;j<=7;j++){ if (j+idres >= *reslength) break; // do not decode padding bytes
Closed
On cran now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.