[med-svn] r20432 - in trunk/packages/R/r-bioc-aroma.light/trunk/debian: . patches
Andreas Tille
tille at moszumanska.debian.org
Sun Nov 8 19:26:50 UTC 2015
Author: tille
Date: 2015-11-08 19:26:49 +0000 (Sun, 08 Nov 2015)
New Revision: 20432
Added:
trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/
trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/remove_test_using_external_functions.patch
trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/series
Modified:
trunk/packages/R/r-bioc-aroma.light/trunk/debian/changelog
trunk/packages/R/r-bioc-aroma.light/trunk/debian/watch
Log:
New upstream version, remove patches with external non packaged functions
Modified: trunk/packages/R/r-bioc-aroma.light/trunk/debian/changelog
===================================================================
--- trunk/packages/R/r-bioc-aroma.light/trunk/debian/changelog 2015-11-08 19:11:41 UTC (rev 20431)
+++ trunk/packages/R/r-bioc-aroma.light/trunk/debian/changelog 2015-11-08 19:26:49 UTC (rev 20432)
@@ -1,3 +1,10 @@
+r-bioc-aroma.light (3.0.0-1) unstable; urgency=medium
+
+ * New upstream version
+ * Exclude tests requiring external functions
+
+ -- Andreas Tille <tille at debian.org> Sun, 08 Nov 2015 19:39:53 +0100
+
r-bioc-aroma.light (2.4.0-1) unstable; urgency=low
* Initial release (closes: #793992)
Added: trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/remove_test_using_external_functions.patch
===================================================================
--- trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/remove_test_using_external_functions.patch (rev 0)
+++ trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/remove_test_using_external_functions.patch 2015-11-08 19:26:49 UTC (rev 20432)
@@ -0,0 +1,246 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Sun, 08 Nov 2015 19:39:53 +0100
+Description: Remove test using external not packaged function
+ Comment says
+ This example requires plot3d() in R.basic [http://www.braju.com/R/]
+ But this URL does not exist.
+
+--- a/tests/distanceBetweenLines.R
++++ /dev/null
+@@ -1,82 +0,0 @@
+-library("aroma.light")
+-
+-for (zzz in 0) {
+-
+-# This example requires plot3d() in R.basic [http://www.braju.com/R/]
+-if (!require(pkgName <- "R.basic", character.only=TRUE)) break
+-
+-layout(matrix(1:4, nrow=2, ncol=2, byrow=TRUE))
+-
+-############################################################
+-# Lines in two-dimensions
+-############################################################
+-x <- list(a=c(1,0), b=c(1,2))
+-y <- list(a=c(0,2), b=c(1,1))
+-fit <- distanceBetweenLines(ax=x$a, bx=x$b, ay=y$a, by=y$b)
+-
+-xlim <- ylim <- c(-1,8)
+-plot(NA, xlab="", ylab="", xlim=ylim, ylim=ylim)
+-
+-# Highlight the offset coordinates for both lines
+-points(t(x$a), pch="+", col="red")
+-text(t(x$a), label=expression(a[x]), adj=c(-1,0.5))
+-points(t(y$a), pch="+", col="blue")
+-text(t(y$a), label=expression(a[y]), adj=c(-1,0.5))
+-
+-v <- c(-1,1)*10;
+-xv <- list(x=x$a[1]+x$b[1]*v, y=x$a[2]+x$b[2]*v)
+-yv <- list(x=y$a[1]+y$b[1]*v, y=y$a[2]+y$b[2]*v)
+-
+-lines(xv, col="red")
+-lines(yv, col="blue")
+-
+-points(t(fit$xs), cex=2.0, col="red")
+-text(t(fit$xs), label=expression(x(s)), adj=c(+2,0.5))
+-points(t(fit$yt), cex=1.5, col="blue")
+-text(t(fit$yt), label=expression(y(t)), adj=c(-1,0.5))
+-print(fit)
+-
+-
+-############################################################
+-# Lines in three-dimensions
+-############################################################
+-x <- list(a=c(0,0,0), b=c(1,1,1)) # The 'diagonal'
+-y <- list(a=c(2,1,2), b=c(2,1,3)) # A 'fitted' line
+-fit <- distanceBetweenLines(ax=x$a, bx=x$b, ay=y$a, by=y$b)
+-
+-xlim <- ylim <- zlim <- c(-1,3)
+-dummy <- t(c(1,1,1))*100;
+-
+-# Coordinates for the lines in 3d
+-v <- seq(-10,10, by=1);
+-xv <- list(x=x$a[1]+x$b[1]*v, y=x$a[2]+x$b[2]*v, z=x$a[3]+x$b[3]*v)
+-yv <- list(x=y$a[1]+y$b[1]*v, y=y$a[2]+y$b[2]*v, z=y$a[3]+y$b[3]*v)
+-
+-for (theta in seq(30,140,length=3)) {
+- plot3d(dummy, theta=theta, phi=30, xlab="", ylab="", zlab="",
+- xlim=ylim, ylim=ylim, zlim=zlim)
+-
+- # Highlight the offset coordinates for both lines
+- points3d(t(x$a), pch="+", col="red")
+- text3d(t(x$a), label=expression(a[x]), adj=c(-1,0.5))
+- points3d(t(y$a), pch="+", col="blue")
+- text3d(t(y$a), label=expression(a[y]), adj=c(-1,0.5))
+-
+- # Draw the lines
+- lines3d(xv, col="red")
+- lines3d(yv, col="blue")
+-
+- # Draw the two points that are closest to each other
+- points3d(t(fit$xs), cex=2.0, col="red")
+- text3d(t(fit$xs), label=expression(x(s)), adj=c(+2,0.5))
+- points3d(t(fit$yt), cex=1.5, col="blue")
+- text3d(t(fit$yt), label=expression(y(t)), adj=c(-1,0.5))
+-
+- # Draw the distance between the two points
+- lines3d(rbind(fit$xs,fit$yt), col="purple", lwd=2)
+-}
+-
+-print(fit)
+-
+-} # for (zzz in 0)
+-rm(zzz)
+--- a/tests/iwpca.matrix.R
++++ /dev/null
+@@ -1,76 +0,0 @@
+-library("aroma.light")
+-
+-for (zzz in 0) {
+-
+-# This example requires plot3d() in R.basic [http://www.braju.com/R/]
+-if (!require(pkgName <- "R.basic", character.only=TRUE)) break
+-
+-# Simulate data from the model y <- a + bx + eps(bx)
+-x <- rexp(1000)
+-a <- c(2,15,3)
+-b <- c(2,3,4)
+-bx <- outer(b,x)
+-eps <- apply(bx, MARGIN=2, FUN=function(x) rnorm(length(x), mean=0, sd=0.1*x))
+-y <- a + bx + eps
+-y <- t(y)
+-
+-# Add some outliers by permuting the dimensions for 1/10 of the observations
+-idx <- sample(1:nrow(y), size=1/10*nrow(y))
+-y[idx,] <- y[idx,c(2,3,1)]
+-
+-# Plot the data with fitted lines at four different view points
+-opar <- par(mar=c(1,1,1,1)+0.1)
+-N <- 4
+-layout(matrix(1:N, nrow=2, byrow=TRUE))
+-theta <- seq(0,270,length=N)
+-phi <- rep(20, length.out=N)
+-xlim <- ylim <- zlim <- c(0,45);
+-persp <- list();
+-for (kk in seq(theta)) {
+- # Plot the data
+- persp[[kk]] <- plot3d(y, theta=theta[kk], phi=phi[kk], xlim=xlim, ylim=ylim, zlim=zlim)
+-}
+-
+-# Weights on the observations
+-# Example a: Equal weights
+-w <- NULL
+-# Example b: More weight on the outliers (uncomment to test)
+-w <- rep(1, length(x)); w[idx] <- 0.8
+-
+-# ...and show all iterations too with different colors.
+-maxIter <- c(seq(1,20,length=10),Inf)
+-col <- topo.colors(length(maxIter))
+-# Show the fitted value for every iteration
+-for (ii in seq(along=maxIter)) {
+- # Fit a line using IWPCA through data
+- fit <- iwpca(y, w=w, maxIter=maxIter[ii], swapDirections=TRUE)
+-
+- ymid <- fit$xMean
+- d0 <- apply(y, MARGIN=2, FUN=min) - ymid
+- d1 <- apply(y, MARGIN=2, FUN=max) - ymid
+- b <- fit$vt[1,]
+- y0 <- -b * max(abs(d0))
+- y1 <- b * max(abs(d1))
+- yline <- matrix(c(y0,y1), nrow=length(b), ncol=2)
+- yline <- yline + ymid
+-
+- for (kk in seq(theta)) {
+- # Set pane to draw in
+- par(mfg=c((kk-1) %/% 2, (kk-1) %% 2) + 1);
+- # Set the viewpoint of the pane
+- options(persp.matrix=persp[[kk]]);
+-
+- # Get the first principal component
+- points3d(t(ymid), col=col[ii])
+- lines3d(t(yline), col=col[ii])
+-
+- # Highlight the last one
+- if (ii == length(maxIter))
+- lines3d(t(yline), col="red", lwd=3)
+- }
+-}
+-
+-par(opar)
+-
+-} # for (zzz in 0)
+-rm(zzz)
+--- a/tests/wpca.matrix.R
++++ /dev/null
+@@ -1,72 +0,0 @@
+-library("aroma.light")
+-
+-for (zzz in 0) {
+-
+-# This example requires plot3d() in R.basic [http://www.braju.com/R/]
+-if (!require(pkgName <- "R.basic", character.only=TRUE)) break
+-
+-# -------------------------------------------------------------
+-# A first example
+-# -------------------------------------------------------------
+-# Simulate data from the model y <- a + bx + eps(bx)
+-x <- rexp(1000)
+-a <- c(2,15,3)
+-b <- c(2,3,15)
+-bx <- outer(b,x)
+-eps <- apply(bx, MARGIN=2, FUN=function(x) rnorm(length(x), mean=0, sd=0.1*x))
+-y <- a + bx + eps
+-y <- t(y)
+-
+-# Add some outliers by permuting the dimensions for 1/3 of the observations
+-idx <- sample(1:nrow(y), size=1/3*nrow(y))
+-y[idx,] <- y[idx,c(2,3,1)]
+-
+-# Down-weight the outliers W times to demonstrate how weights are used
+-W <- 10
+-
+-# Plot the data with fitted lines at four different view points
+-N <- 4
+-theta <- seq(0,180,length=N)
+-phi <- rep(30, length.out=N)
+-
+-# Use a different color for each set of weights
+-col <- topo.colors(W)
+-
+-opar <- par(mar=c(1,1,1,1)+0.1)
+-layout(matrix(1:N, nrow=2, byrow=TRUE))
+-for (kk in seq(theta)) {
+- # Plot the data
+- plot3d(y, theta=theta[kk], phi=phi[kk])
+-
+- # First, same weights for all observations
+- w <- rep(1, length=nrow(y))
+-
+- for (ww in 1:W) {
+- # Fit a line using IWPCA through data
+- fit <- wpca(y, w=w, swapDirections=TRUE)
+-
+- # Get the first principal component
+- ymid <- fit$xMean
+- d0 <- apply(y, MARGIN=2, FUN=min) - ymid
+- d1 <- apply(y, MARGIN=2, FUN=max) - ymid
+- b <- fit$vt[1,]
+- y0 <- -b * max(abs(d0))
+- y1 <- b * max(abs(d1))
+- yline <- matrix(c(y0,y1), nrow=length(b), ncol=2)
+- yline <- yline + ymid
+-
+- points3d(t(ymid), col=col)
+- lines3d(t(yline), col=col)
+-
+- # Down-weight outliers only, because here we know which they are.
+- w[idx] <- w[idx]/2
+- }
+-
+- # Highlight the last one
+- lines3d(t(yline), col="red", lwd=3)
+-}
+-
+-par(opar)
+-
+-} # for (zzz in 0)
+-rm(zzz)
Added: trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/series
===================================================================
--- trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/series (rev 0)
+++ trunk/packages/R/r-bioc-aroma.light/trunk/debian/patches/series 2015-11-08 19:26:49 UTC (rev 20432)
@@ -0,0 +1 @@
+remove_test_using_external_functions.patch
Modified: trunk/packages/R/r-bioc-aroma.light/trunk/debian/watch
===================================================================
--- trunk/packages/R/r-bioc-aroma.light/trunk/debian/watch 2015-11-08 19:11:41 UTC (rev 20431)
+++ trunk/packages/R/r-bioc-aroma.light/trunk/debian/watch 2015-11-08 19:26:49 UTC (rev 20432)
@@ -1,3 +1,3 @@
version=3
-opts=downloadurlmangle=s/\.\./packages\/release\/bioc/ \
+opts=downloadurlmangle=s?^(.*)\.\.?http:$1packages/release/bioc? \
http://www.bioconductor.org/packages/release/bioc/html/aroma.light.html .*/aroma.light_([\d\.]+)\.tar\.gz
More information about the debian-med-commit
mailing list