Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cfhammill committed Mar 9, 2020
2 parents a02a04a + 141a62a commit 1f2cef9
Show file tree
Hide file tree
Showing 54 changed files with 649 additions and 329 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
^_config.yml$
^_pkgdown\.yml$
^docs$
^tmp/.*$
65 changes: 55 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,75 @@
matrix:
include:
- os: linux
dist: trusty
dist: xenial
script: |
R CMD build .
R CMD INSTALL RMINC*.tar.gz
R CMD check --as-cran --no-install RMINC*.tar.gz
cat RMINC.Rcheck/00check.log
Rscript -e "\
testr <- devtools::test(); \
testr <- as.data.frame(testr); \
if(any(testr\$error) || any(testr\$warning > 0)) \
stop('Found failing tests') \
"
pass=$?
if [[ $pass -ne 0 || $(grep "WARNING\|ERROR" RMINC.Rcheck/00check.log) != "" ]]; then
(exit 1)
else
(exit 0)
fi
- os: osx
script: |
R CMD build .
R CMD INSTALL RMINC*.tar.gz
R CMD check --as-cran --no-install RMINC*.tar.gz
cat RMINC.Rcheck/00check.log
Rscript -e "\
testr <- devtools::test(); \
testr <- as.data.frame(testr); \
if(any(testr\$error) || any(testr\$warning > 0)) \
stop('Found failing tests') \
"
pass=$?
if [[ $pass -ne 0 || $(grep "WARNING\|ERROR" RMINC.Rcheck/00check.log) != "" ]]; then
(exit 1)
else
(exit 0)
fi
language: r
r_binary_packages:
- devtools
- roxygen2
- tidyverse
- lme4
sudo: required

addons:
apt:
update: true
packages:
- libgl1-mesa-dev
- libglu1-mesa-dev
- freeglut3-dev
env:
MINC_PATH=/opt/minc/1.9.17

before_install: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
(cd ../ ;
wget http://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.16-20180117-Ubuntu_14.04-x86_64.deb )
sudo dpkg -i ../minc-toolkit-1.9.16-20180117-Ubuntu_14.04-x86_64.deb
source /opt/minc/1.9.16/minc-toolkit-config.sh
wget https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.17-20190313-Ubuntu_16.04-x86_64.deb)
sudo dpkg -i ../minc-toolkit-1.9.17-20190313-Ubuntu_16.04-x86_64.deb
source /opt/minc/1.9.17/minc-toolkit-config.sh
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
## brew install gcc
## mkdir $HOME/.R/; touch $HOME/.R/Makevars
## echo 'FLIBS=-L/usr/local/Cellar/gcc/5.3.0/lib/gcc/5' > $HOME/.R/Makevars
(cd ../ ;
wget http://packages.bic.mni.mcgill.ca/minc-toolkit/MacOSX/minc-toolkit-1.9.16-20180117-Darwin-10.8-x86_64.dmg)
sudo hdiutil attach ../minc-toolkit-1.9.16-20180117-Darwin-10.8-x86_64.dmg
sudo installer -package /Volumes/minc-toolkit-1.9.16-20180117-Darwin-x86_64/minc-toolkit-1.9.16-20180117-Darwin-x86_64.pkg -target /
source /opt/minc/1.9.16/minc-toolkit-config.sh
export LDFLAGS="$LDFLAGS -L$(brew --prefix zlib)/lib"
Rscript -e "install.packages('digest')"
fi
repos:
bioCsoft: http://bioconductor.org/packages/3.8/bioc
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: RMINC
Version: 1.5.2.2
Version: 1.5.2.3
Date: 2017-05-31
Title: Statistical Tools for Medical Imaging NetCDF (MINC) Files
Authors@R: c(person("Jason", "Lerch", role = "aut", email = "jason.lerch@sickkids.ca"),
Expand All @@ -13,7 +13,7 @@ Authors@R: c(person("Jason", "Lerch", role = "aut", email = "jason.lerch@sickkid
person("Gabriel", "Devenyi", role = "ctb", email = "gdevenyi@gmail.com"))
Description: Tools for reading, writing, analyzing, and visualizing Medical
Imaging NetCDF (MINC) files with R.
Additional_repositories: http://bioconductor.org/packages/3.6/bioc
Additional_repositories: http://bioconductor.org/packages/3.10/bioc
Depends:
R (>= 3.2)
Imports:
Expand All @@ -40,12 +40,12 @@ Imports:
visNetwork (>= 2.0.4),
rjson (>= 0.2.20),
DT (>= 0.4),
rlang (>= 0.2.1)
rlang (>= 0.2.1),
bigstatsr
Suggests:
rgl,
plotrix,
lmerTest,
BiocInstaller,
qvalue,
testthat,
igraph
Expand All @@ -62,4 +62,4 @@ OS_type: unix
BugReports: https://github.com/Mouse-Imaging-Centre/RMINC/issues
URL: https://github.com/Mouse-Imaging-Centre/RMINC,
https://wiki.mouseimaging.ca/display/MICePub/RMINC
RoxygenNote: 6.1.0
RoxygenNote: 6.1.1
14 changes: 12 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ you can use homebrew to install the Gnu Compiler Collection which
comes with gfortran

```
brew install gcc
brew install gcc libssh2 libgit2 libomp libz
```

Regardless of how you install gfortran you will need to tell
R where to find it. If you installed via brew you can run
R where to find it. If you installed via brew you can run the
following in terminal

```
mkdir $HOME/.R/ ## Ignore the error if this directory already exists
Expand All @@ -79,6 +80,15 @@ library path. My best guess is
echo 'FLIBS=-L/usr/local/gfortran/lib" >> $HOME/.R/Makevars'
```

Additionally, recent mac versions have struggled to link libz in
to RMINC. You will probably need to run the following in the terminal
before opening R

```
export LDFLAGS="$LDFLAGS -L$(brew --prefix zlib)/lib"
```


If that works or doesn't let me know in the issues!


1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export(mincSelectRandomVoxels)
export(mincSum)
export(mincSummary)
export(mincTFCE)
export(mincTable)
export(mincTriplanarSlicePlot)
export(mincTtest)
export(mincVar)
Expand Down
19 changes: 19 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
New in Version 1.5.*.*
=======================
2.3
--
- Fixed mincLmer reinit (formula out of scope bug)
- Improved mac install notes (issue #261)
- Defaults RMINC_LABEL_DEFINITIONS to null instead of empty string
(issue #259)
- anatGetAll fails faster if the label defs are broken (issue #260)
- civet.readCBrain now supports `columnsToKeep` to pass to flattening
code
- Add environment variable to configure where test data is located, useful
for systems where internet isn't available.
- Improvement to FDR threshold selection in launch_shiny_RMINC
- Code for reading in a matrix of minc files `mincTable`. Supports
file backed matrices for when your files are too big for your computers
memory.
- Fixed reading QC for CIVET 1.1.12 experiments
- Fixed and streamlined the continuous integration (travis) build scripts
- Fixed all outstanding R CMD check and test issues

2.2
--
- Improvements to vertex code (thanks @vfonov), now can
Expand Down
7 changes: 6 additions & 1 deletion R/RMINC.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ NULL
### Package initialization function, syncs environment vars and defines defaults
.onLoad <-
function(libname, pkgname){
empty_to_null <- function(x){
`if`(x == "", NULL, x)
}

#Set default options taken from Hadley's r-packages book
op <- options()
Expand All @@ -85,11 +88,13 @@ NULL
RMINC_MASKED_VALUE =
structure(0, class = "RMINC_MASKED_VALUE")
, RMINC_LABEL_DEFINITIONS =
Sys.getenv("RMINC_LABEL_DEFINITIONS")
empty_to_null(Sys.getenv("RMINC_LABEL_DEFINITIONS"))
, RMINC_BATCH_CONF =
`if`(Sys.getenv("RMINC_BATCH_CONF") == ""
, system.file("parallel/pbs_batchtools.R", package = "RMINC")
, Sys.getenv("RMINC_BATCH_CONF"))
, RMINC_DATA_DIR =
empty_to_null(Sys.getenv("RMINC_DATA_DIR"))
)

toset <- !(names(op.RMINC) %in% names(op))
Expand Down
Loading

0 comments on commit 1f2cef9

Please sign in to comment.