Errors in running code in vignettes:
when running code in ‘metaRNASeq.Rnw’
  ...

> options(width = 60)

> library(metaRNASeq)

> data(param)

> dim(param)
[1] 26408     3

> data(dispFuncs)

> set.seed(123)

> matsim <- sim.function(param = param, dispFuncs = dispFuncs)

> sim.conds <- colnames(matsim)

> rownames(matsim) <- paste("tag", 1:dim(matsim)[1], 
+     sep = "")

> dim(matsim)
[1] 26408    16

> colnames(matsim)
 [1] "study1cond1" "study1cond1" "study1cond1" "study1cond1"
 [5] "study1cond2" "study1cond2" "study1cond2" "study1cond2"
 [9] "study2cond1" "study2cond1" "study2cond1" "study2cond1"
[13] "study2cond2" "study2cond2" "study2cond2" "study2cond2"

> simstudy1 <- extractfromsim(matsim, "study1")

> head(simstudy1$study)
     rep1 rep2 rep3 rep4 rep5 rep6 rep7 rep8
tag1  338  401  428  565  476  545  407  367
tag2  919  849 1397 1541  917 1268 1596 1020
tag3  127  166  235  276  133  206  238  127
tag4  224  353  426  252  881  717  889  808
tag5    4    4    8    6    9    5   10    9
tag6  108   61   39   22  158   97   16  107

> simstudy1$pheno
      study condition
rep1 study1 untreated
rep2 study1 untreated
rep3 study1 untreated
rep4 study1 untreated
rep5 study1   treated
rep6 study1   treated
rep7 study1   treated
rep8 study1   treated

> simstudy2 <- extractfromsim(matsim, "study2")

> if (requireNamespace("DESeq2", quietly = TRUE)) {
+     dds1 <- DESeq2::DESeqDataSetFromMatrix(countData = simstudy1$study, 
+         colData = sim .... [TRUNCATED] 
converting counts to integer mode
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
converting counts to integer mode
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing

> rawpval <- list(pval1 = res1[["pvalue"]], pval2 = res2[["pvalue"]])

> FC <- list(FC1 = res1[["log2FoldChange"]], FC2 = res2[["log2FoldChange"]])

> adjpval <- list(adjpval1 = res1[["padj"]], adjpval2 = res2[["padj"]])

> studies <- c("study1", "study2")

> DE <- mapply(adjpval, FUN = function(x) ifelse(x <= 
+     0.05, 1, 0))

> colnames(DE) = paste("DE", studies, sep = ".")

> par(mfrow = c(1, 2))

> hist(rawpval[[1]], breaks = 100, col = "grey", main = "Study 1", 
+     xlab = "Raw p-values")

> hist(rawpval[[2]], breaks = 100, col = "grey", main = "Study 2", 
+     xlab = "Raw p-values")

> filtered <- lapply(adjpval, FUN = function(pval) which(is.na(pval)))

> rawpval[[1]][filtered[[1]]] = NA

> rawpval[[2]][filtered[[2]]] = NA

> par(mfrow = c(1, 2))

> hist(rawpval[[1]], breaks = 100, col = "grey", main = "Study 1", 
+     xlab = "Raw p-values")

> hist(rawpval[[2]], breaks = 100, col = "grey", main = "Study 2", 
+     xlab = "Raw p-values")

> fishcomb <- fishercomb(rawpval, BHth = 0.05)

> hist(fishcomb$rawpval, breaks = 100, col = "grey", 
+     main = "Fisher method", xlab = "Raw p-values (meta-analysis)")

> invnormcomb <- invnorm(rawpval, nrep = c(8, 8), BHth = 0.05)

> hist(invnormcomb$rawpval, breaks = 100, col = "grey", 
+     main = "Inverse normal method", xlab = "Raw p-values (meta-analysis)")

> DEresults <- data.frame(DE, DE.fishercomb = ifelse(fishcomb$adjpval <= 
+     0.05, 1, 0), DE.invnorm = ifelse(invnormcomb$adjpval <= 0.05, 
+     1 .... [TRUNCATED] 

> head(DEresults)
  DE.study1 DE.study2 DE.fishercomb DE.invnorm
1         0         0             0          0
2         0         0             0          0
3         0         0             0          0
4         1         1             1          1
5         0        NA             0          0
6         0         0             0          0

> signsFC <- mapply(FC, FUN = function(x) sign(x))

> sumsigns <- apply(signsFC, 1, sum)

> commonsgnFC <- ifelse(abs(sumsigns) == dim(signsFC)[2], 
+     sign(sumsigns), 0)

> unionDE <- unique(c(fishcomb$DEindices, invnormcomb$DEindices))

> FC.selecDE <- data.frame(DEresults[unionDE, ], do.call(cbind, 
+     FC)[unionDE, ], signFC = commonsgnFC[unionDE], DE = param$DE[unionDE])

> keepDE <- FC.selecDE[which(abs(FC.selecDE$signFC) == 
+     1), ]

> conflictDE <- FC.selecDE[which(FC.selecDE$signFC == 
+     0), ]

> dim(FC.selecDE)
[1] 1468    8

> dim(keepDE)
[1] 1252    8

> dim(conflictDE)
[1] 216   8

> head(keepDE)
   DE.study1 DE.study2 DE.fishercomb DE.invnorm        FC1
4          1         1             1          1  1.3953545
11         1         1             1          1 -0.9995552
22         1         1             1          1 -1.1846747
36         1         1             1          1 -3.0703646
55         0         1             1          1 -0.4229671
59         1         1             1          1  1.1465211
          FC2 signFC   DE
4   2.0827031      1 TRUE
11 -0.5666576     -1 TRUE
22 -0.9829686     -1 TRUE
36 -2.8604490     -1 TRUE
55 -1.0557672     -1 TRUE
59  1.3520264      1 TRUE

> nbtrueconflicts = as.vector(table(conflictDE$DE)[2])

> table(conflictDE$DE)

FALSE  TRUE 
   66   150 

> fishcomb_de <- rownames(keepDE)[which(keepDE[, "DE.fishercomb"] == 
+     1)]

> invnorm_de <- rownames(keepDE)[which(keepDE[, "DE.invnorm"] == 
+     1)]

> indstudy_de <- list(rownames(keepDE)[which(keepDE[, 
+     "DE.study1"] == 1)], rownames(keepDE)[which(keepDE[, "DE.study2"] == 
+     1)])

> IDD.IRR(fishcomb_de, indstudy_de)
     DE     IDD    Loss     IDR     IRR 
1248.00   18.00    0.00    1.44    0.00 

> IDD.IRR(invnorm_de, indstudy_de)
     DE     IDD    Loss     IDR     IRR 
1217.00   22.00   35.00    1.81    2.85 

> x = IDD.IRR(fishcomb_de, indstudy_de)

> y = IDD.IRR(invnorm_de, indstudy_de)

> if (require("VennDiagram", quietly = TRUE)) {
+     venn.plot <- venn.diagram(x = list(study1 = which(keepDE[, 
+         "DE.study1"] == 1), study2 .... [TRUNCATED] 
pdf 
  2 

> sessionInfo()
Warning in FUN(X[[i]], ...) :
  DESCRIPTION file of package 'locfit' is missing or broken
R version 4.0.3 Patched (2020-10-13 r79345)
Platform: i386-pc-solaris2.10 (32-bit)
Running under: Solaris 10

Matrix products: default
BLAS:   /home/ripley/R/cc/lib/libRblas.so
LAPACK: /home/ripley/R/cc/lib/libRlapack.so

locale:
[1] /en_GB.UTF-8/C/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] grid      stats     graphics  grDevices utils    
[6] datasets  methods   base     

other attached packages:
[1] VennDiagram_1.6.20  futile.logger_1.4.3
[3] metaRNASeq_1.0.3   

loaded via a namespace (and not attached):

  When sourcing ‘metaRNASeq.R’:
Error: subscript out of bounds
Execution halted

  ‘metaRNASeq.Rnw’... failed