Back to Multiple platform build/check report for BioC 3.11
A[B]CDEFGHIJKLMNOPQRSTUVWXYZ

CHECK report for birta on tokay2

This page was generated on 2020-10-17 11:56:10 -0400 (Sat, 17 Oct 2020).

TO THE DEVELOPERS/MAINTAINERS OF THE birta PACKAGE: Please make sure to use the following settings in order to reproduce any error or warning you see on this page.
Package 188/1905HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
birta 1.32.0
Benedikt Zacher
Snapshot Date: 2020-10-16 14:40:19 -0400 (Fri, 16 Oct 2020)
URL: https://git.bioconductor.org/packages/birta
Branch: RELEASE_3_11
Last Commit: c2f1a45
Last Changed Date: 2020-04-27 14:29:03 -0400 (Mon, 27 Apr 2020)
malbec2 Linux (Ubuntu 18.04.4 LTS) / x86_64  OK  OK  ERROR 
tokay2 Windows Server 2012 R2 Standard / x64  OK  OK [ ERROR ] OK 
machv2 macOS 10.14.6 Mojave / x86_64  OK  OK  ERROR  OK 

Summary

Package: birta
Version: 1.32.0
Command: C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:birta.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings birta_1.32.0.tar.gz
StartedAt: 2020-10-17 02:04:31 -0400 (Sat, 17 Oct 2020)
EndedAt: 2020-10-17 02:05:31 -0400 (Sat, 17 Oct 2020)
EllapsedTime: 60.4 seconds
RetCode: 1
Status:  ERROR  
CheckDir: birta.Rcheck
Warnings: NA

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:birta.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings birta_1.32.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory 'C:/Users/biocbuild/bbs-3.11-bioc/meat/birta.Rcheck'
* using R version 4.0.3 (2020-10-10)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* using option '--no-vignettes'
* checking for file 'birta/DESCRIPTION' ... OK
* this is package 'birta' version '1.32.0'
* 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 hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'birta' can be installed ... WARNING
Found the following significant warnings:
  Rd warning: C:/Users/biocbuild/bbs-3.11-bioc/tmpdir/Rtmp8gmmRN/R.INSTALLc105ee44acb/birta/man/plotConvergence.Rd:17: file link 'birta' in package 'birta' does not exist and so has been treated as a topic
  Warning: Package 'birta' is deprecated and will be removed from Bioconductor
See 'C:/Users/biocbuild/bbs-3.11-bioc/meat/birta.Rcheck/00install.out' for details.
* checking installed package size ... OK
* checking package directory ... OK
* checking 'build' directory ... 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
* loading checks for arch 'i386'
** 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
* loading checks for arch 'x64'
** 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 ... NOTE
Packages in Depends field not imported from:
  'Biobase' 'methods'
  These packages need to be imported from (in the NAMESPACE file)
  for when this namespace is loaded but not attached.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
FisherPretest : <anonymous>: no visible global function definition for
  'fisher.test'
FisherPretest: no visible global function definition for 'p.adjust'
birtaRun: no visible global function definition for 'median'
birtaRun: no visible global function definition for 'var'
plotConvergence: no visible global function definition for 'abline'
birta,ExpressionSet-ExpressionSet-ExpressionSet: no visible global
  function definition for 'exprs'
birta,ExpressionSet-ExpressionSet-ExpressionSet: no visible global
  function definition for 'callGeneric'
birta,ExpressionSet-ExpressionSet-missing: no visible global function
  definition for 'exprs'
birta,ExpressionSet-ExpressionSet-missing: no visible global function
  definition for 'callGeneric'
birta,ExpressionSet-missing-ExpressionSet: no visible global function
  definition for 'exprs'
birta,ExpressionSet-missing-ExpressionSet: no visible global function
  definition for 'callGeneric'
birta,ExpressionSet-missing-missing: no visible global function
  definition for 'exprs'
birta,ExpressionSet-missing-missing: no visible global function
  definition for 'callGeneric'
limmaAnalysis,ExpressionSet-matrix-character: no visible global
  function definition for 'exprs'
limmaAnalysis,ExpressionSet-matrix-character: no visible global
  function definition for 'callGeneric'
Undefined global functions or variables:
  abline callGeneric exprs fisher.test median p.adjust var
Consider adding
  importFrom("graphics", "abline")
  importFrom("methods", "callGeneric")
  importFrom("stats", "fisher.test", "median", "p.adjust", "var")
to your NAMESPACE file (and ensure that your DESCRIPTION Imports field
contains 'methods').
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking compiled code ... NOTE
Note: information on .o files for i386 is not available
Note: information on .o files for x64 is not available
File 'C:/Users/biocbuild/bbs-3.11-bioc/R/library/birta/libs/i386/birta.dll':
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
  Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
  Found 'printf', possibly from 'printf' (C)
  Found 'rand', possibly from 'rand' (C)
  Found 'srand', possibly from 'srand' (C)
File 'C:/Users/biocbuild/bbs-3.11-bioc/R/library/birta/libs/x64/birta.dll':
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
  Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
  Found 'printf', possibly from 'printf' (C)
  Found 'rand', possibly from 'rand' (C)
  Found 'srand', possibly from 'srand' (C)

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs. The detected symbols are linked into the code but
might come from libraries and not actually be called.

See 'Writing portable packages' in the 'Writing R Extensions' manual.
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... ERROR
Running examples in 'birta-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: birta
> ### Title: Main interface for Bayesian Inference of Regulation of
> ###   Transcriptional Activity.
> ### Aliases: birta
> ### Keywords: htest
> 
> ### ** Examples
> 
> data(humanSim)
> design = model.matrix(~0+factor(c(rep("control", 5), rep("treated", 5))))
> colnames(design) = c("control", "treated")
> contrasts = "treated - control"
> limmamRNA = limmaAnalysis(sim$dat.mRNA, design, contrasts)
> limmamiRNA = limmaAnalysis(sim$dat.miRNA, design, contrasts)
> sim_result = birta(sim$dat.mRNA, sim$dat.miRNA, limmamRNA=limmamRNA, 
+  limmamiRNA=limmamiRNA, nrep=c(5,5,5,5), genesets=genesets, 
+  model="all-plug-in", niter=50000, nburnin=10000, 
+  sample.weights=FALSE, potential_swaps=potential_swaps)
Formatting regulator-target network -> checking overlap between network and measurements.
30  DE gene(s) have  69 regulating TFs and  328 regulating miRNAs
 ----------- FAILURE REPORT -------------- 
 --- failure: length > 1 in coercion to logical ---
 --- srcref --- 
: 
 --- package (from environment) --- 
birta
 --- call from context --- 
birtaStart(mRNAexpr = dat.mRNA, miRNAexpr = dat.miRNA, genesetsTF = genesetsTFs, 
    genesetsmiRNA = genesetsmiRNA, alpha_i = alpha_i, alpha_i0 = alpha_i0, 
    alpha = alpha, beta = beta, b_j = b.mRNA, replicates = nrep, 
    niter = niter, burnin = nburnin, thin = thin, model = model, 
    only_switches = only_switches, nomiRNA = is.null(genesetsmiRNA), 
    noTF = is.null(genesetsTFs), omega_miRNA = omegamiRNA, omega_TF = omegaTF, 
    potential_swaps = potential_swaps, theta_TF = theta_TF, theta_miRNA = theta_miRNA, 
    weightSampleMean = weightSampleMean, weightSampleVariance = weightSampleVariance, 
    weight_samples_per_move = weight_samples_per_move, equal.regulator.weights = one.regulator.weight, 
    A_sigma = A_Sigma, O_sigma = O_Sigma, lambda_omega = mylambda, 
    init_S = init_miR, init_T = init_TF, condition.specific.inference = condition.specific.inference, 
    TFexpr = TFexpr, alpha_i0TF = alpha_i0TF, alpha_iTF = alpha_iTF, 
    TF_sigma = TF_Sigma, alphaTF = alphaTF, betaTF = betaTF)
 --- call from argument --- 
is.null(potential_swaps) || sapply(potential_swaps[["T_potential_swaps"]], 
    length) != sapply(potential_swaps.orig[["T_potential_swaps"]], 
    length)
 --- R stacktrace ---
where 1: birtaStart(mRNAexpr = dat.mRNA, miRNAexpr = dat.miRNA, genesetsTF = genesetsTFs, 
    genesetsmiRNA = genesetsmiRNA, alpha_i = alpha_i, alpha_i0 = alpha_i0, 
    alpha = alpha, beta = beta, b_j = b.mRNA, replicates = nrep, 
    niter = niter, burnin = nburnin, thin = thin, model = model, 
    only_switches = only_switches, nomiRNA = is.null(genesetsmiRNA), 
    noTF = is.null(genesetsTFs), omega_miRNA = omegamiRNA, omega_TF = omegaTF, 
    potential_swaps = potential_swaps, theta_TF = theta_TF, theta_miRNA = theta_miRNA, 
    weightSampleMean = weightSampleMean, weightSampleVariance = weightSampleVariance, 
    weight_samples_per_move = weight_samples_per_move, equal.regulator.weights = one.regulator.weight, 
    A_sigma = A_Sigma, O_sigma = O_Sigma, lambda_omega = mylambda, 
    init_S = init_miR, init_T = init_TF, condition.specific.inference = condition.specific.inference, 
    TFexpr = TFexpr, alpha_i0TF = alpha_i0TF, alpha_iTF = alpha_iTF, 
    TF_sigma = TF_Sigma, alphaTF = alphaTF, betaTF = betaTF)
where 2: birtaRun(dat.mRNA, dat.miRNA, TFexpr = NULL, limmamRNA, limmamiRNA, 
    limmaTF, nrep, fdr.mRNA, fdr.miRNA, lfc.mRNA, lfc.miRNA, 
    genesets, lambda, sample.weights, one.regulator.weight, theta_TF, 
    theta_miRNA, model, niter, nburnin, thin, potential_swaps, 
    run.pretest, condition.specific.inference, only_switches, 
    weightSampleMean, weightSampleVariance)
where 3: birta(sim$dat.mRNA, sim$dat.miRNA, limmamRNA = limmamRNA, limmamiRNA = limmamiRNA, 
    nrep = c(5, 5, 5, 5), genesets = genesets, model = "all-plug-in", 
    niter = 50000, nburnin = 10000, sample.weights = FALSE, potential_swaps = potential_swaps)
where 4: birta(sim$dat.mRNA, sim$dat.miRNA, limmamRNA = limmamRNA, limmamiRNA = limmamiRNA, 
    nrep = c(5, 5, 5, 5), genesets = genesets, model = "all-plug-in", 
    niter = 50000, nburnin = 10000, sample.weights = FALSE, potential_swaps = potential_swaps)

 --- value of length: 156 type: logical ---
              V$AIRE_01                V$AP3_Q6              V$CEBPA_01 
                  FALSE                   FALSE                   FALSE 
               V$EN1_01              V$FOXJ2_02            V$HELIOSA_01 
                  FALSE                   FALSE                   FALSE 
             V$HOXA4_Q2               V$PAX2_02             V$STAT5A_03 
                  FALSE                   FALSE                   FALSE 
            V$STAT5A_04              V$TFIIA_Q6                V$USF_02 
                  FALSE                   FALSE                   FALSE 
              V$ELK1_01              V$HOXA3_01               V$PAX5_02 
                  FALSE                   FALSE                   FALSE 
               V$YY1_01            V$CEBP_Q2_01               V$CEBP_Q2 
                  FALSE                   FALSE                   FALSE 
           V$HNF4_Q6_02               V$HNF4_Q6               V$PAX4_04 
                  FALSE                   FALSE                   FALSE 
               V$PXR_Q2              V$FOXP3_Q4              V$GATA4_Q3 
                  FALSE                   FALSE                   FALSE 
            V$MAF_Q6_01               V$CEBP_Q3               V$CEBP_01 
                  FALSE                   FALSE                   FALSE 
            V$NF1_Q6_01                V$NF1_Q6               V$TBX5_02 
                  FALSE                   FALSE                   FALSE 
              V$TEF1_Q6               V$GFI1_01                 V$PR_Q2 
                  FALSE                   FALSE                   FALSE 
             V$GR_Q6_01               V$OCT1_06              V$AREB6_02 
                  FALSE                   FALSE                   FALSE 
             V$STAT4_01              V$GATA6_01               V$ELF1_Q6 
                  FALSE                   FALSE                   FALSE 
             V$STAT6_01              V$NKX62_Q2               V$PAX8_01 
                  FALSE                   FALSE                   FALSE 
               V$PAX8_B                V$RFX_Q6        V$P53_DECAMER_Q2 
                  FALSE                   FALSE                   FALSE 
               V$GCM_Q2                V$CRX_Q4                V$SRY_01 
                  FALSE                   FALSE                   FALSE 
              V$PAX5_01                V$AP4_01                V$AP4_Q6 
                  FALSE                   FALSE                   FALSE 
              V$E2F1_Q3                V$ETS2_B               V$HES1_Q2 
                  FALSE                   FALSE                   FALSE 
              V$E2F1_Q4                 V$GR_Q6            V$E2F1_Q3_01 
                  FALSE                   FALSE                   FALSE 
              V$ATF4_Q2               V$NERF_Q2               V$OLF1_01 
                  FALSE                   FALSE                   FALSE 
              V$P300_01               V$TST1_01               V$USF2_Q6 
                  FALSE                   FALSE                   FALSE 
              V$ZIC1_01              V$AREB6_04               V$MZF1_01 
                  FALSE                   FALSE                   FALSE 
               V$VDR_Q3               V$STAT_Q6               V$PAX4_03 
                  FALSE                   FALSE                   FALSE 
             V$SMAD4_Q6               V$SMAD_Q6               V$ZIC2_01 
                  FALSE                   FALSE                   FALSE 
              V$PBX1_03                V$PBX_Q3                V$CEBP_C 
                  FALSE                   FALSE                   FALSE 
          V$DELTAEF1_01              V$FOXM1_01               V$TCF4_Q5 
                  FALSE                   FALSE                   FALSE 
              V$TTF1_Q6                V$AP4_Q5               V$MYOD_01 
                  FALSE                   FALSE                   FALSE 
               V$SP3_Q3               V$MSX1_01                V$NCX_01 
                  FALSE                   FALSE                   FALSE 
             V$GATA1_06              V$SREBP_Q3                V$EGR_Q6 
                  FALSE                   FALSE                   FALSE 
            V$SREBP1_Q6              V$GATA1_05                V$EFC_Q6 
                  FALSE                   FALSE                   FALSE 
              V$LBP1_Q6                V$ETS1_B               V$TAL1_Q6 
                  FALSE                   FALSE                   FALSE 
             V$STAT1_02           V$CETS1P54_01           V$CETS1P54_02 
                  FALSE                   FALSE                   FALSE 
              V$OCT1_05              V$STAT6_02                V$MYB_Q6 
                  FALSE                   FALSE                   FALSE 
               V$T3R_Q6            V$NFAT_Q4_01               V$NFAT_Q6 
                  FALSE                   FALSE                   FALSE 
               V$CP2_02            V$SMAD_Q6_01             V$AP1_Q6_01 
                  FALSE                   FALSE                   FALSE 
               V$DEC_Q1              V$HMGIY_Q3              V$AREB6_01 
                  FALSE                   FALSE                   FALSE 
              V$TBX5_01               V$SOX5_01              V$NKX25_02 
                  FALSE                   FALSE                   FALSE 
               V$HNF1_C            V$HELIOSA_02                V$AHR_Q5 
                  FALSE                   FALSE                   FALSE 
             V$GATA1_03              V$CEBPB_02              V$CEBPB_01 
                  FALSE                   FALSE                   FALSE 
              V$EVI1_05               V$EVI1_02               V$CDC5_01 
                  FALSE                   FALSE                   FALSE 
              V$AFP1_Q6               V$E2F1_Q6               V$SOX9_B1 
                  FALSE                   FALSE                   FALSE 
             V$GATA3_03               V$OCT1_02                V$TFE_Q6 
                  FALSE                   FALSE                   FALSE 
          V$AP2ALPHA_02              V$HMGIY_Q6                V$FOX_Q2 
                  FALSE                   FALSE                   FALSE 
              V$LYF1_01               V$MYOD_Q6                V$EBF_Q6 
                  FALSE                   FALSE                   FALSE 
              V$OSF2_Q6               V$FAC1_01                V$ETS_Q6 
                  FALSE                   FALSE                   FALSE 
               V$ETS_Q4                V$TEF_Q6                V$GABP_B 
                  FALSE                   FALSE                   FALSE 
         V$CEBPGAMMA_Q6             V$AP1_Q4_01               V$AML1_Q6 
                  FALSE                   FALSE                   FALSE 
            V$AP2REP_01             V$POU3F2_02          V$CEBPDELTA_Q6 
                  FALSE                   FALSE                   FALSE 
               V$P53_02                V$E47_02                V$IRF_Q6 
                  FALSE                   FALSE                   FALSE 
             V$FOXO4_02             V$COUPTF_Q6 V$CACCCBINDINGFACTOR_Q6 
                  FALSE                   FALSE                   FALSE 
             V$TITF1_Q3               V$ERR1_Q2              V$STAT1_03 
                  FALSE                   FALSE                   FALSE 
              V$CREB_Q3              V$CART1_01              V$HNF3B_01 
                  FALSE                   FALSE                   FALSE 
 --- function from context --- 
function (mRNAexpr, miRNAexpr = NULL, mRNA.data.type = c("array", 
    "RNAseq"), miRNA.data.type = c("array", "RNAseq"), genesetsTF = NULL, 
    genesetsmiRNA = NULL, replicates = c(5, 5, 5, 5), n0 = 1, 
    alpha = 1, beta = 0.1, alpha_i = NULL, alpha_i0 = NULL, b_j, 
    niter = 1e+06, burnin = 5 * 1e+05, thin = 50, model = c("all-plug-in", 
        "no-plug-in"), only_switches = FALSE, noTF = FALSE, nomiRNA = FALSE, 
    A_sigma = NULL, O_sigma, omega_miRNA = NULL, omega_TF = NULL, 
    weightSampleMean = 0, weightSampleVariance = 1, equal.regulator.weights = TRUE, 
    potential_swaps = NULL, weight_samples_per_move = 10, theta_TF = 0.01, 
    theta_miRNA = 0.01, lambda_omega = 0, init_S = NULL, init_T = NULL, 
    condition.specific.inference = TRUE, TFexpr = NULL, alpha_i0TF = NULL, 
    alpha_iTF = NULL, TF_sigma = NULL, alphaTF = NULL, betaTF = NULL) 
{
    model = match.arg(model, several.ok = FALSE)
    stopifnot(model %in% c("all-plug-in", "no-plug-in"))
    model = switch(model, `no-plug-in` = 3, `all-plug-in` = 1)
    mRNA.data.type = match.arg(mRNA.data.type, several.ok = FALSE)
    miRNA.data.type = match.arg(miRNA.data.type, several.ok = FALSE)
    if (!is.null(TFexpr)) {
        tfexpr = rownames(TFexpr)
        tfnotexpr = names(genesetsTF)[(!(names(genesetsTF) %in% 
            tfexpr))]
        genesetsTF = genesetsTF[c(tfexpr, tfnotexpr)]
        omega_TF = omega_TF[c(tfexpr, tfnotexpr)]
    }
    potential_swaps.orig = potential_swaps
    genesetsmiRNA = sapply(genesetsmiRNA, function(s) intersect(s, 
        rownames(mRNAexpr)))
    genesetsTF = sapply(genesetsTF, function(s) intersect(s, 
        rownames(mRNAexpr)))
    genesetsmiRNA = genesetsmiRNA[unique(names(genesetsmiRNA))]
    genesetsTF = genesetsTF[unique(names(genesetsTF))]
    omega_TF = sapply(omega_TF, function(s) s[intersect(names(s), 
        rownames(mRNAexpr))])
    omega_miRNA = sapply(omega_miRNA, function(s) s[intersect(names(s), 
        rownames(mRNAexpr))])
    if (length(genesetsmiRNA) != length(omega_miRNA) | !all(sapply(genesetsmiRNA, 
        length) == sapply(omega_miRNA, length))) 
        stop("dimensions of genesetsmiRNA have to equal the dimensions of omega_miRNA")
    if (length(genesetsTF) != length(omega_TF) | !all(sapply(genesetsTF, 
        length) == sapply(omega_TF, length))) 
        stop("dimensions of genesetsTF have to equal the dimensions of omega_TF")
    if (any(sapply(genesetsmiRNA, length) == 0) | any(sapply(genesetsTF, 
        length) == 0)) {
        warning("Not all genesets have non-zero length --> removing empty genesets")
        genesetsmiRNA = genesetsmiRNA[sapply(genesetsmiRNA, length) > 
            0]
        genesetsTF = genesetsTF[sapply(genesetsTF, length) > 
            0]
        omega_miRNA = omega_miRNA[sapply(omega_miRNA, length) > 
            0]
        omega_TF = omega_TF[sapply(omega_TF, length) > 0]
    }
    if (!nomiRNA & NROW(miRNAexpr) > 0) {
        common.miRNAs = intersect(names(genesetsmiRNA), rownames(miRNAexpr))
        genesetsmiRNA = genesetsmiRNA[common.miRNAs]
        omega_miRNA = omega_miRNA[common.miRNAs]
        miRNAexpr = miRNAexpr[common.miRNAs, ]
        A_sigma = A_sigma[common.miRNAs]
        alpha_i = alpha_i[common.miRNAs]
        alpha_i0 = alpha_i0[common.miRNAs]
        if (!is.null(init_S)) 
            init_S = init_S[, common.miRNAs]
    }
    regulon = union(unlist(genesetsTF), unlist(genesetsmiRNA))
    mRNAexpr = mRNAexpr[rownames(mRNAexpr) %in% regulon, ]
    O_sigma = O_sigma[names(O_sigma) %in% regulon]
    b_j = b_j[names(b_j) %in% regulon]
    if ((!only_switches)) {
        if (is.null(potential_swaps) || sapply(potential_swaps[["T_potential_swaps"]], 
            length) != sapply(potential_swaps.orig[["T_potential_swaps"]], 
            length) || sapply(potential_swaps[["S_potential_swaps"]], 
            length) != sapply(potential_swaps.orig[["S_potential_swaps"]], 
            length)) {
            potential_swaps = get_potential_swaps(genesetsTF, 
                genesetsmiRNA)
        }
    }
    if (!is.null(A_sigma) & length(A_sigma) != NROW(miRNAexpr)) 
        stop("length of A_sigma has to equal number of miRNAs!")
    if (length(alpha_i) != NROW(miRNAexpr)) 
        stop("length of alpha_i has to equal number of miRNAs!")
    if (length(alpha_i0) != NROW(miRNAexpr)) 
        stop("length of alpha_i0 has to equal number of miRNAs!")
    if (!is.null(O_sigma) & length(O_sigma) != NROW(mRNAexpr)) 
        stop("length of O_sigma has to equal number of mRNAs!")
    if (length(b_j) != NROW(mRNAexpr)) 
        stop("length of b_j has to equal number of mRNAs!")
    if (length(replicates) != 4) 
        stop("Length of replicates has equal 4! Put 0, if miRNA data is missing.")
    if (is.null(init_T)) {
        init_T = matrix(0, nrow = 2, length(genesetsTF))
        colnames(init_T) = names(genesetsTF)
    }
    if (is.null(init_S) & NROW(miRNAexpr) > 0) {
        init_S = matrix(0, nrow = 2, ncol = NROW(miRNAexpr))
        colnames(init_S) = rownames(miRNAexpr)
    }
    if (!is.null(init_T) & NCOL(init_T) != length(genesetsTF)) 
        stop("length of init_T has to equal length of genesetsTF")
    if (!is.null(init_S) & NCOL(init_S) != length(genesetsmiRNA)) 
        stop("length of init_S has to equal length of genesetsmiRNA")
    if (!is.null(miRNAexpr)) {
        if (length(genesetsmiRNA) != NROW(miRNAexpr)) 
            stop("length of genesetsmiRNA and NROW(miRNAexpr) have to be equal!")
    }
    lambda_omega = abs(lambda_omega)
    theta_miRNA = abs(theta_miRNA)
    theta_TF = abs(theta_TF)
    alpha = abs(alpha)
    beta = abs(beta)
    n0 = abs(n0)
    weight_samples_per_move = abs(weight_samples_per_move)
    weightSampleVariance = abs(weightSampleVariance)
    burnin = abs(burnin)
    thin = abs(thin)
    niter = abs(niter)
    miRNA = names(genesetsmiRNA)
    mRNA = rownames(mRNAexpr)
    TF = names(genesetsTF)
    A_cnt = as.integer(length(miRNA))
    T_cnt = as.integer(length(TF))
    if (nomiRNA) {
        A_cnt = 0
        use_miRNA_expression = 0
    }
    else {
        use_miRNA_expression = (NROW(miRNAexpr) > 0)
    }
    if (noTF) {
        T_cnt = 0
    }
    init_T = init_T[, TF]
    mirTargets = genesetsmiRNA[miRNA]
    mirTargets = lapply(mirTargets, function(x) {
        which(mRNA %in% x)
    })
    TFtargets = genesetsTF[TF]
    TFtargets = lapply(TFtargets, function(x) {
        which(mRNA %in% x)
    })
    cat("\nBIRTA\n")
    cat("Data and network: #mRNAs = ", nrow(mRNAexpr), "#miRNAs = ", 
        A_cnt, "#TFs = ", T_cnt, "only one weight per regulator = ", 
        equal.regulator.weights, "\n")
    cat("Prior parameters: theta_TF = ", theta_TF, "theta_miRNA = ", 
        theta_miRNA, "lambda = ", lambda_omega, "\n")
    if (model != "all-plug-in") 
        cat("Hyperparameters: alpha = ", alpha, " beta = ", beta, 
            " n0 = ", n0, "\n")
    cat("MCMC parameters: burnin = ", burnin, "niter = ", niter, 
        "thin = ", thin, "condition specific inference = ", condition.specific.inference, 
        "\n\n")
    nTFexpr = 0
    if (!is.null(TFexpr)) {
        nTFexpr = as.integer(dim(TFexpr)[1])
    }
    result = .Call("getStates", nmRNA = as.integer(length(mRNA)), 
        mRNA = as.character(mRNA), nmiRNA = as.integer(A_cnt), 
        miRNA = as.character(miRNA), nTF = as.integer(T_cnt), 
        TF = as.character(TF), replicates = as.integer(replicates), 
        mRNA_expression = as.numeric(mRNAexpr), miRNA_expression = as.numeric(miRNAexpr), 
        mRNADataType = as.integer((mRNA.data.type == "RNAseq") * 
            1), miRNADataType = as.integer((miRNA.data.type == 
            "RNAseq") * 1), use_miRNA_expression = as.integer(use_miRNA_expression), 
        genesetsmiRNA = mirTargets, genesetsTF = TFtargets, n0 = as.numeric(n0), 
        alpha = as.numeric(alpha), beta = as.numeric(beta), alpha_i0 = as.numeric(alpha_i0), 
        alpha_i = as.numeric(alpha_i), b_j = as.numeric(b_j), 
        omega_miRNA = omega_miRNA, omega_TF = omega_TF, niter = as.integer(niter), 
        A_sigma = as.numeric(A_sigma), O_sigma = as.numeric(O_sigma), 
        model = as.integer(model), burnin = as.integer(burnin), 
        thin = as.integer(thin), only_switches = as.integer(only_switches), 
        T_potential_swaps = sapply(potential_swaps$T_potential_swaps, 
            as.integer), S_potential_swaps = sapply(potential_swaps$S_potential_swaps, 
            as.integer), weightSampleMean = as.numeric(weightSampleMean), 
        weightSampleVariance = as.numeric(weightSampleVariance), 
        weight_samples_per_move = as.integer(weight_samples_per_move), 
        theta_TF = as.numeric(theta_TF), theta_miRNA = as.numeric(theta_miRNA), 
        lambda_omega = as.numeric(lambda_omega), init_S = as.integer(init_S), 
        init_T = as.integer(init_T), condition_specific = as.integer(condition.specific.inference), 
        equal_regulator_weights = as.integer(equal.regulator.weights), 
        TFexpr = as.numeric(TFexpr), nTFexpr = as.integer(nTFexpr), 
        alpha_i0TF = as.numeric(alpha_i0TF), alpha_iTF = as.numeric(alpha_iTF), 
        TF_sigma = as.numeric(TF_sigma), alphaTF = as.numeric(alphaTF), 
        betaTF = as.numeric(betaTF), PACKAGE = "birta")
    if ((!noTF) & (!condition.specific.inference)) {
        names(result$TFstates1) = TF
        names(result$TFstates2) = TF
        result$TFActivitySwitch = result$TFstates2
        result = result[-which(names(result) %in% c("TFstates1", 
            "TFstates2"))]
    }
    if (!nomiRNA) {
        names(result$miRNAstates1) = miRNA
        names(result$miRNAstates2) = miRNA
        if (!condition.specific.inference) {
            result$miRNAactivitySwitch = result$miRNAstates2
            result$miRNAactivitySwitch[which(result$miRNAstates1 > 
                0)] = result$miRNAstates1[which(result$miRNAstates1 > 
                0)]
            result = result[-which(names(result) %in% c("miRNAstates1", 
                "miRNAstates2"))]
        }
    }
    if ((!is.null(TFexpr)) > 0 & condition.specific.inference) {
        names(result$TFstates1) = TF
        names(result$TFstates2) = TF
        result$TFActivitySwitch = result$TFstates2[(!(names(result$TFstates2) %in% 
            rownames(TFexpr)))]
        result$TFstates1 = result$TFstates1[rownames(TFexpr)]
        result$TFstates2 = result$TFstates2[rownames(TFexpr)]
    }
    if ((is.null(TFexpr)) > 0 & condition.specific.inference) {
        names(result$TFstates1) = TF
        names(result$TFstates2) = TF
        result$TFActivitySwitch = result$TFstates2
        result = result[-which(names(result) %in% c("TFstates1", 
            "TFstates2"))]
    }
    result$genesetsTF = genesetsTF
    result$genesetsmiRNA = genesetsmiRNA
    result$mRNAexpr = mRNAexpr
    result$miRNAexpr = miRNAexpr
    return(result)
}
<bytecode: 0x03eb3258>
<environment: namespace:birta>
 --- function search by body ---
Function birtaStart in namespace birta has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: length > 1 in coercion to logical

** running examples for arch 'x64' ... ERROR
Running examples in 'birta-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: birta
> ### Title: Main interface for Bayesian Inference of Regulation of
> ###   Transcriptional Activity.
> ### Aliases: birta
> ### Keywords: htest
> 
> ### ** Examples
> 
> data(humanSim)
> design = model.matrix(~0+factor(c(rep("control", 5), rep("treated", 5))))
> colnames(design) = c("control", "treated")
> contrasts = "treated - control"
> limmamRNA = limmaAnalysis(sim$dat.mRNA, design, contrasts)
> limmamiRNA = limmaAnalysis(sim$dat.miRNA, design, contrasts)
> sim_result = birta(sim$dat.mRNA, sim$dat.miRNA, limmamRNA=limmamRNA, 
+  limmamiRNA=limmamiRNA, nrep=c(5,5,5,5), genesets=genesets, 
+  model="all-plug-in", niter=50000, nburnin=10000, 
+  sample.weights=FALSE, potential_swaps=potential_swaps)
Formatting regulator-target network -> checking overlap between network and measurements.
30  DE gene(s) have  69 regulating TFs and  328 regulating miRNAs
 ----------- FAILURE REPORT -------------- 
 --- failure: length > 1 in coercion to logical ---
 --- srcref --- 
: 
 --- package (from environment) --- 
birta
 --- call from context --- 
birtaStart(mRNAexpr = dat.mRNA, miRNAexpr = dat.miRNA, genesetsTF = genesetsTFs, 
    genesetsmiRNA = genesetsmiRNA, alpha_i = alpha_i, alpha_i0 = alpha_i0, 
    alpha = alpha, beta = beta, b_j = b.mRNA, replicates = nrep, 
    niter = niter, burnin = nburnin, thin = thin, model = model, 
    only_switches = only_switches, nomiRNA = is.null(genesetsmiRNA), 
    noTF = is.null(genesetsTFs), omega_miRNA = omegamiRNA, omega_TF = omegaTF, 
    potential_swaps = potential_swaps, theta_TF = theta_TF, theta_miRNA = theta_miRNA, 
    weightSampleMean = weightSampleMean, weightSampleVariance = weightSampleVariance, 
    weight_samples_per_move = weight_samples_per_move, equal.regulator.weights = one.regulator.weight, 
    A_sigma = A_Sigma, O_sigma = O_Sigma, lambda_omega = mylambda, 
    init_S = init_miR, init_T = init_TF, condition.specific.inference = condition.specific.inference, 
    TFexpr = TFexpr, alpha_i0TF = alpha_i0TF, alpha_iTF = alpha_iTF, 
    TF_sigma = TF_Sigma, alphaTF = alphaTF, betaTF = betaTF)
 --- call from argument --- 
is.null(potential_swaps) || sapply(potential_swaps[["T_potential_swaps"]], 
    length) != sapply(potential_swaps.orig[["T_potential_swaps"]], 
    length)
 --- R stacktrace ---
where 1: birtaStart(mRNAexpr = dat.mRNA, miRNAexpr = dat.miRNA, genesetsTF = genesetsTFs, 
    genesetsmiRNA = genesetsmiRNA, alpha_i = alpha_i, alpha_i0 = alpha_i0, 
    alpha = alpha, beta = beta, b_j = b.mRNA, replicates = nrep, 
    niter = niter, burnin = nburnin, thin = thin, model = model, 
    only_switches = only_switches, nomiRNA = is.null(genesetsmiRNA), 
    noTF = is.null(genesetsTFs), omega_miRNA = omegamiRNA, omega_TF = omegaTF, 
    potential_swaps = potential_swaps, theta_TF = theta_TF, theta_miRNA = theta_miRNA, 
    weightSampleMean = weightSampleMean, weightSampleVariance = weightSampleVariance, 
    weight_samples_per_move = weight_samples_per_move, equal.regulator.weights = one.regulator.weight, 
    A_sigma = A_Sigma, O_sigma = O_Sigma, lambda_omega = mylambda, 
    init_S = init_miR, init_T = init_TF, condition.specific.inference = condition.specific.inference, 
    TFexpr = TFexpr, alpha_i0TF = alpha_i0TF, alpha_iTF = alpha_iTF, 
    TF_sigma = TF_Sigma, alphaTF = alphaTF, betaTF = betaTF)
where 2: birtaRun(dat.mRNA, dat.miRNA, TFexpr = NULL, limmamRNA, limmamiRNA, 
    limmaTF, nrep, fdr.mRNA, fdr.miRNA, lfc.mRNA, lfc.miRNA, 
    genesets, lambda, sample.weights, one.regulator.weight, theta_TF, 
    theta_miRNA, model, niter, nburnin, thin, potential_swaps, 
    run.pretest, condition.specific.inference, only_switches, 
    weightSampleMean, weightSampleVariance)
where 3: birta(sim$dat.mRNA, sim$dat.miRNA, limmamRNA = limmamRNA, limmamiRNA = limmamiRNA, 
    nrep = c(5, 5, 5, 5), genesets = genesets, model = "all-plug-in", 
    niter = 50000, nburnin = 10000, sample.weights = FALSE, potential_swaps = potential_swaps)
where 4: birta(sim$dat.mRNA, sim$dat.miRNA, limmamRNA = limmamRNA, limmamiRNA = limmamiRNA, 
    nrep = c(5, 5, 5, 5), genesets = genesets, model = "all-plug-in", 
    niter = 50000, nburnin = 10000, sample.weights = FALSE, potential_swaps = potential_swaps)

 --- value of length: 156 type: logical ---
              V$AIRE_01                V$AP3_Q6              V$CEBPA_01 
                  FALSE                   FALSE                   FALSE 
               V$EN1_01              V$FOXJ2_02            V$HELIOSA_01 
                  FALSE                   FALSE                   FALSE 
             V$HOXA4_Q2               V$PAX2_02             V$STAT5A_03 
                  FALSE                   FALSE                   FALSE 
            V$STAT5A_04              V$TFIIA_Q6                V$USF_02 
                  FALSE                   FALSE                   FALSE 
              V$ELK1_01              V$HOXA3_01               V$PAX5_02 
                  FALSE                   FALSE                   FALSE 
               V$YY1_01            V$CEBP_Q2_01               V$CEBP_Q2 
                  FALSE                   FALSE                   FALSE 
           V$HNF4_Q6_02               V$HNF4_Q6               V$PAX4_04 
                  FALSE                   FALSE                   FALSE 
               V$PXR_Q2              V$FOXP3_Q4              V$GATA4_Q3 
                  FALSE                   FALSE                   FALSE 
            V$MAF_Q6_01               V$CEBP_Q3               V$CEBP_01 
                  FALSE                   FALSE                   FALSE 
            V$NF1_Q6_01                V$NF1_Q6               V$TBX5_02 
                  FALSE                   FALSE                   FALSE 
              V$TEF1_Q6               V$GFI1_01                 V$PR_Q2 
                  FALSE                   FALSE                   FALSE 
             V$GR_Q6_01               V$OCT1_06              V$AREB6_02 
                  FALSE                   FALSE                   FALSE 
             V$STAT4_01              V$GATA6_01               V$ELF1_Q6 
                  FALSE                   FALSE                   FALSE 
             V$STAT6_01              V$NKX62_Q2               V$PAX8_01 
                  FALSE                   FALSE                   FALSE 
               V$PAX8_B                V$RFX_Q6        V$P53_DECAMER_Q2 
                  FALSE                   FALSE                   FALSE 
               V$GCM_Q2                V$CRX_Q4                V$SRY_01 
                  FALSE                   FALSE                   FALSE 
              V$PAX5_01                V$AP4_01                V$AP4_Q6 
                  FALSE                   FALSE                   FALSE 
              V$E2F1_Q3                V$ETS2_B               V$HES1_Q2 
                  FALSE                   FALSE                   FALSE 
              V$E2F1_Q4                 V$GR_Q6            V$E2F1_Q3_01 
                  FALSE                   FALSE                   FALSE 
              V$ATF4_Q2               V$NERF_Q2               V$OLF1_01 
                  FALSE                   FALSE                   FALSE 
              V$P300_01               V$TST1_01               V$USF2_Q6 
                  FALSE                   FALSE                   FALSE 
              V$ZIC1_01              V$AREB6_04               V$MZF1_01 
                  FALSE                   FALSE                   FALSE 
               V$VDR_Q3               V$STAT_Q6               V$PAX4_03 
                  FALSE                   FALSE                   FALSE 
             V$SMAD4_Q6               V$SMAD_Q6               V$ZIC2_01 
                  FALSE                   FALSE                   FALSE 
              V$PBX1_03                V$PBX_Q3                V$CEBP_C 
                  FALSE                   FALSE                   FALSE 
          V$DELTAEF1_01              V$FOXM1_01               V$TCF4_Q5 
                  FALSE                   FALSE                   FALSE 
              V$TTF1_Q6                V$AP4_Q5               V$MYOD_01 
                  FALSE                   FALSE                   FALSE 
               V$SP3_Q3               V$MSX1_01                V$NCX_01 
                  FALSE                   FALSE                   FALSE 
             V$GATA1_06              V$SREBP_Q3                V$EGR_Q6 
                  FALSE                   FALSE                   FALSE 
            V$SREBP1_Q6              V$GATA1_05                V$EFC_Q6 
                  FALSE                   FALSE                   FALSE 
              V$LBP1_Q6                V$ETS1_B               V$TAL1_Q6 
                  FALSE                   FALSE                   FALSE 
             V$STAT1_02           V$CETS1P54_01           V$CETS1P54_02 
                  FALSE                   FALSE                   FALSE 
              V$OCT1_05              V$STAT6_02                V$MYB_Q6 
                  FALSE                   FALSE                   FALSE 
               V$T3R_Q6            V$NFAT_Q4_01               V$NFAT_Q6 
                  FALSE                   FALSE                   FALSE 
               V$CP2_02            V$SMAD_Q6_01             V$AP1_Q6_01 
                  FALSE                   FALSE                   FALSE 
               V$DEC_Q1              V$HMGIY_Q3              V$AREB6_01 
                  FALSE                   FALSE                   FALSE 
              V$TBX5_01               V$SOX5_01              V$NKX25_02 
                  FALSE                   FALSE                   FALSE 
               V$HNF1_C            V$HELIOSA_02                V$AHR_Q5 
                  FALSE                   FALSE                   FALSE 
             V$GATA1_03              V$CEBPB_02              V$CEBPB_01 
                  FALSE                   FALSE                   FALSE 
              V$EVI1_05               V$EVI1_02               V$CDC5_01 
                  FALSE                   FALSE                   FALSE 
              V$AFP1_Q6               V$E2F1_Q6               V$SOX9_B1 
                  FALSE                   FALSE                   FALSE 
             V$GATA3_03               V$OCT1_02                V$TFE_Q6 
                  FALSE                   FALSE                   FALSE 
          V$AP2ALPHA_02              V$HMGIY_Q6                V$FOX_Q2 
                  FALSE                   FALSE                   FALSE 
              V$LYF1_01               V$MYOD_Q6                V$EBF_Q6 
                  FALSE                   FALSE                   FALSE 
              V$OSF2_Q6               V$FAC1_01                V$ETS_Q6 
                  FALSE                   FALSE                   FALSE 
               V$ETS_Q4                V$TEF_Q6                V$GABP_B 
                  FALSE                   FALSE                   FALSE 
         V$CEBPGAMMA_Q6             V$AP1_Q4_01               V$AML1_Q6 
                  FALSE                   FALSE                   FALSE 
            V$AP2REP_01             V$POU3F2_02          V$CEBPDELTA_Q6 
                  FALSE                   FALSE                   FALSE 
               V$P53_02                V$E47_02                V$IRF_Q6 
                  FALSE                   FALSE                   FALSE 
             V$FOXO4_02             V$COUPTF_Q6 V$CACCCBINDINGFACTOR_Q6 
                  FALSE                   FALSE                   FALSE 
             V$TITF1_Q3               V$ERR1_Q2              V$STAT1_03 
                  FALSE                   FALSE                   FALSE 
              V$CREB_Q3              V$CART1_01              V$HNF3B_01 
                  FALSE                   FALSE                   FALSE 
 --- function from context --- 
function (mRNAexpr, miRNAexpr = NULL, mRNA.data.type = c("array", 
    "RNAseq"), miRNA.data.type = c("array", "RNAseq"), genesetsTF = NULL, 
    genesetsmiRNA = NULL, replicates = c(5, 5, 5, 5), n0 = 1, 
    alpha = 1, beta = 0.1, alpha_i = NULL, alpha_i0 = NULL, b_j, 
    niter = 1e+06, burnin = 5 * 1e+05, thin = 50, model = c("all-plug-in", 
        "no-plug-in"), only_switches = FALSE, noTF = FALSE, nomiRNA = FALSE, 
    A_sigma = NULL, O_sigma, omega_miRNA = NULL, omega_TF = NULL, 
    weightSampleMean = 0, weightSampleVariance = 1, equal.regulator.weights = TRUE, 
    potential_swaps = NULL, weight_samples_per_move = 10, theta_TF = 0.01, 
    theta_miRNA = 0.01, lambda_omega = 0, init_S = NULL, init_T = NULL, 
    condition.specific.inference = TRUE, TFexpr = NULL, alpha_i0TF = NULL, 
    alpha_iTF = NULL, TF_sigma = NULL, alphaTF = NULL, betaTF = NULL) 
{
    model = match.arg(model, several.ok = FALSE)
    stopifnot(model %in% c("all-plug-in", "no-plug-in"))
    model = switch(model, `no-plug-in` = 3, `all-plug-in` = 1)
    mRNA.data.type = match.arg(mRNA.data.type, several.ok = FALSE)
    miRNA.data.type = match.arg(miRNA.data.type, several.ok = FALSE)
    if (!is.null(TFexpr)) {
        tfexpr = rownames(TFexpr)
        tfnotexpr = names(genesetsTF)[(!(names(genesetsTF) %in% 
            tfexpr))]
        genesetsTF = genesetsTF[c(tfexpr, tfnotexpr)]
        omega_TF = omega_TF[c(tfexpr, tfnotexpr)]
    }
    potential_swaps.orig = potential_swaps
    genesetsmiRNA = sapply(genesetsmiRNA, function(s) intersect(s, 
        rownames(mRNAexpr)))
    genesetsTF = sapply(genesetsTF, function(s) intersect(s, 
        rownames(mRNAexpr)))
    genesetsmiRNA = genesetsmiRNA[unique(names(genesetsmiRNA))]
    genesetsTF = genesetsTF[unique(names(genesetsTF))]
    omega_TF = sapply(omega_TF, function(s) s[intersect(names(s), 
        rownames(mRNAexpr))])
    omega_miRNA = sapply(omega_miRNA, function(s) s[intersect(names(s), 
        rownames(mRNAexpr))])
    if (length(genesetsmiRNA) != length(omega_miRNA) | !all(sapply(genesetsmiRNA, 
        length) == sapply(omega_miRNA, length))) 
        stop("dimensions of genesetsmiRNA have to equal the dimensions of omega_miRNA")
    if (length(genesetsTF) != length(omega_TF) | !all(sapply(genesetsTF, 
        length) == sapply(omega_TF, length))) 
        stop("dimensions of genesetsTF have to equal the dimensions of omega_TF")
    if (any(sapply(genesetsmiRNA, length) == 0) | any(sapply(genesetsTF, 
        length) == 0)) {
        warning("Not all genesets have non-zero length --> removing empty genesets")
        genesetsmiRNA = genesetsmiRNA[sapply(genesetsmiRNA, length) > 
            0]
        genesetsTF = genesetsTF[sapply(genesetsTF, length) > 
            0]
        omega_miRNA = omega_miRNA[sapply(omega_miRNA, length) > 
            0]
        omega_TF = omega_TF[sapply(omega_TF, length) > 0]
    }
    if (!nomiRNA & NROW(miRNAexpr) > 0) {
        common.miRNAs = intersect(names(genesetsmiRNA), rownames(miRNAexpr))
        genesetsmiRNA = genesetsmiRNA[common.miRNAs]
        omega_miRNA = omega_miRNA[common.miRNAs]
        miRNAexpr = miRNAexpr[common.miRNAs, ]
        A_sigma = A_sigma[common.miRNAs]
        alpha_i = alpha_i[common.miRNAs]
        alpha_i0 = alpha_i0[common.miRNAs]
        if (!is.null(init_S)) 
            init_S = init_S[, common.miRNAs]
    }
    regulon = union(unlist(genesetsTF), unlist(genesetsmiRNA))
    mRNAexpr = mRNAexpr[rownames(mRNAexpr) %in% regulon, ]
    O_sigma = O_sigma[names(O_sigma) %in% regulon]
    b_j = b_j[names(b_j) %in% regulon]
    if ((!only_switches)) {
        if (is.null(potential_swaps) || sapply(potential_swaps[["T_potential_swaps"]], 
            length) != sapply(potential_swaps.orig[["T_potential_swaps"]], 
            length) || sapply(potential_swaps[["S_potential_swaps"]], 
            length) != sapply(potential_swaps.orig[["S_potential_swaps"]], 
            length)) {
            potential_swaps = get_potential_swaps(genesetsTF, 
                genesetsmiRNA)
        }
    }
    if (!is.null(A_sigma) & length(A_sigma) != NROW(miRNAexpr)) 
        stop("length of A_sigma has to equal number of miRNAs!")
    if (length(alpha_i) != NROW(miRNAexpr)) 
        stop("length of alpha_i has to equal number of miRNAs!")
    if (length(alpha_i0) != NROW(miRNAexpr)) 
        stop("length of alpha_i0 has to equal number of miRNAs!")
    if (!is.null(O_sigma) & length(O_sigma) != NROW(mRNAexpr)) 
        stop("length of O_sigma has to equal number of mRNAs!")
    if (length(b_j) != NROW(mRNAexpr)) 
        stop("length of b_j has to equal number of mRNAs!")
    if (length(replicates) != 4) 
        stop("Length of replicates has equal 4! Put 0, if miRNA data is missing.")
    if (is.null(init_T)) {
        init_T = matrix(0, nrow = 2, length(genesetsTF))
        colnames(init_T) = names(genesetsTF)
    }
    if (is.null(init_S) & NROW(miRNAexpr) > 0) {
        init_S = matrix(0, nrow = 2, ncol = NROW(miRNAexpr))
        colnames(init_S) = rownames(miRNAexpr)
    }
    if (!is.null(init_T) & NCOL(init_T) != length(genesetsTF)) 
        stop("length of init_T has to equal length of genesetsTF")
    if (!is.null(init_S) & NCOL(init_S) != length(genesetsmiRNA)) 
        stop("length of init_S has to equal length of genesetsmiRNA")
    if (!is.null(miRNAexpr)) {
        if (length(genesetsmiRNA) != NROW(miRNAexpr)) 
            stop("length of genesetsmiRNA and NROW(miRNAexpr) have to be equal!")
    }
    lambda_omega = abs(lambda_omega)
    theta_miRNA = abs(theta_miRNA)
    theta_TF = abs(theta_TF)
    alpha = abs(alpha)
    beta = abs(beta)
    n0 = abs(n0)
    weight_samples_per_move = abs(weight_samples_per_move)
    weightSampleVariance = abs(weightSampleVariance)
    burnin = abs(burnin)
    thin = abs(thin)
    niter = abs(niter)
    miRNA = names(genesetsmiRNA)
    mRNA = rownames(mRNAexpr)
    TF = names(genesetsTF)
    A_cnt = as.integer(length(miRNA))
    T_cnt = as.integer(length(TF))
    if (nomiRNA) {
        A_cnt = 0
        use_miRNA_expression = 0
    }
    else {
        use_miRNA_expression = (NROW(miRNAexpr) > 0)
    }
    if (noTF) {
        T_cnt = 0
    }
    init_T = init_T[, TF]
    mirTargets = genesetsmiRNA[miRNA]
    mirTargets = lapply(mirTargets, function(x) {
        which(mRNA %in% x)
    })
    TFtargets = genesetsTF[TF]
    TFtargets = lapply(TFtargets, function(x) {
        which(mRNA %in% x)
    })
    cat("\nBIRTA\n")
    cat("Data and network: #mRNAs = ", nrow(mRNAexpr), "#miRNAs = ", 
        A_cnt, "#TFs = ", T_cnt, "only one weight per regulator = ", 
        equal.regulator.weights, "\n")
    cat("Prior parameters: theta_TF = ", theta_TF, "theta_miRNA = ", 
        theta_miRNA, "lambda = ", lambda_omega, "\n")
    if (model != "all-plug-in") 
        cat("Hyperparameters: alpha = ", alpha, " beta = ", beta, 
            " n0 = ", n0, "\n")
    cat("MCMC parameters: burnin = ", burnin, "niter = ", niter, 
        "thin = ", thin, "condition specific inference = ", condition.specific.inference, 
        "\n\n")
    nTFexpr = 0
    if (!is.null(TFexpr)) {
        nTFexpr = as.integer(dim(TFexpr)[1])
    }
    result = .Call("getStates", nmRNA = as.integer(length(mRNA)), 
        mRNA = as.character(mRNA), nmiRNA = as.integer(A_cnt), 
        miRNA = as.character(miRNA), nTF = as.integer(T_cnt), 
        TF = as.character(TF), replicates = as.integer(replicates), 
        mRNA_expression = as.numeric(mRNAexpr), miRNA_expression = as.numeric(miRNAexpr), 
        mRNADataType = as.integer((mRNA.data.type == "RNAseq") * 
            1), miRNADataType = as.integer((miRNA.data.type == 
            "RNAseq") * 1), use_miRNA_expression = as.integer(use_miRNA_expression), 
        genesetsmiRNA = mirTargets, genesetsTF = TFtargets, n0 = as.numeric(n0), 
        alpha = as.numeric(alpha), beta = as.numeric(beta), alpha_i0 = as.numeric(alpha_i0), 
        alpha_i = as.numeric(alpha_i), b_j = as.numeric(b_j), 
        omega_miRNA = omega_miRNA, omega_TF = omega_TF, niter = as.integer(niter), 
        A_sigma = as.numeric(A_sigma), O_sigma = as.numeric(O_sigma), 
        model = as.integer(model), burnin = as.integer(burnin), 
        thin = as.integer(thin), only_switches = as.integer(only_switches), 
        T_potential_swaps = sapply(potential_swaps$T_potential_swaps, 
            as.integer), S_potential_swaps = sapply(potential_swaps$S_potential_swaps, 
            as.integer), weightSampleMean = as.numeric(weightSampleMean), 
        weightSampleVariance = as.numeric(weightSampleVariance), 
        weight_samples_per_move = as.integer(weight_samples_per_move), 
        theta_TF = as.numeric(theta_TF), theta_miRNA = as.numeric(theta_miRNA), 
        lambda_omega = as.numeric(lambda_omega), init_S = as.integer(init_S), 
        init_T = as.integer(init_T), condition_specific = as.integer(condition.specific.inference), 
        equal_regulator_weights = as.integer(equal.regulator.weights), 
        TFexpr = as.numeric(TFexpr), nTFexpr = as.integer(nTFexpr), 
        alpha_i0TF = as.numeric(alpha_i0TF), alpha_iTF = as.numeric(alpha_iTF), 
        TF_sigma = as.numeric(TF_sigma), alphaTF = as.numeric(alphaTF), 
        betaTF = as.numeric(betaTF), PACKAGE = "birta")
    if ((!noTF) & (!condition.specific.inference)) {
        names(result$TFstates1) = TF
        names(result$TFstates2) = TF
        result$TFActivitySwitch = result$TFstates2
        result = result[-which(names(result) %in% c("TFstates1", 
            "TFstates2"))]
    }
    if (!nomiRNA) {
        names(result$miRNAstates1) = miRNA
        names(result$miRNAstates2) = miRNA
        if (!condition.specific.inference) {
            result$miRNAactivitySwitch = result$miRNAstates2
            result$miRNAactivitySwitch[which(result$miRNAstates1 > 
                0)] = result$miRNAstates1[which(result$miRNAstates1 > 
                0)]
            result = result[-which(names(result) %in% c("miRNAstates1", 
                "miRNAstates2"))]
        }
    }
    if ((!is.null(TFexpr)) > 0 & condition.specific.inference) {
        names(result$TFstates1) = TF
        names(result$TFstates2) = TF
        result$TFActivitySwitch = result$TFstates2[(!(names(result$TFstates2) %in% 
            rownames(TFexpr)))]
        result$TFstates1 = result$TFstates1[rownames(TFexpr)]
        result$TFstates2 = result$TFstates2[rownames(TFexpr)]
    }
    if ((is.null(TFexpr)) > 0 & condition.specific.inference) {
        names(result$TFstates1) = TF
        names(result$TFstates2) = TF
        result$TFActivitySwitch = result$TFstates2
        result = result[-which(names(result) %in% c("TFstates1", 
            "TFstates2"))]
    }
    result$genesetsTF = genesetsTF
    result$genesetsmiRNA = genesetsmiRNA
    result$mRNAexpr = mRNAexpr
    result$miRNAexpr = miRNAexpr
    return(result)
}
<bytecode: 0x0000000008102c38>
<environment: namespace:birta>
 --- function search by body ---
Function birtaStart in namespace birta has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: length > 1 in coercion to logical

* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 2 ERRORs, 1 WARNING, 3 NOTEs
See
  'C:/Users/biocbuild/bbs-3.11-bioc/meat/birta.Rcheck/00check.log'
for details.


Installation output

birta.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\cygwin\bin\curl.exe -O https://malbec2.bioconductor.org/BBS/3.11/bioc/src/contrib/birta_1.32.0.tar.gz && rm -rf birta.buildbin-libdir && mkdir birta.buildbin-libdir && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=birta.buildbin-libdir birta_1.32.0.tar.gz && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL birta_1.32.0.zip && rm birta_1.32.0.tar.gz birta_1.32.0.zip
###
##############################################################################
##############################################################################


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  431k  100  431k    0     0  6390k      0 --:--:-- --:--:-- --:--:-- 7076k

install for i386

* installing *source* package 'birta' ...
** using staged installation
** libs
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11  -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c BayesNetwork.cpp -o BayesNetwork.o
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11  -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c BayesNetworkNC.cpp -o BayesNetworkNC.o
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11  -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c getStates.cpp -o getStates.o
C:/rtools40/mingw32/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o birta.dll tmp.def BayesNetwork.o BayesNetworkNC.o getStates.o -LC:/extsoft/lib/i386 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.11-/R/bin/i386 -lR
installing to C:/Users/biocbuild/bbs-3.11-bioc/meat/birta.buildbin-libdir/00LOCK-birta/00new/birta/libs/i386
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'birta'
    finding HTML links ... done
    EColiNetwork                            html  
    EColiOxygen                             html  
    TFexpr                                  html  
    birta-methods                           html  
    birta-package                           html  
    birta.run                               html  
    genesets                                html  
    get_potential_swaps                     html  
    limmaAnalysis-methods                   html  
    limmaAnalysis                           html  
    plotConvergence                         html  
Rd warning: C:/Users/biocbuild/bbs-3.11-bioc/tmpdir/Rtmp8gmmRN/R.INSTALLc105ee44acb/birta/man/plotConvergence.Rd:17: file link 'birta' in package 'birta' does not exist and so has been treated as a topic
    potential_swaps                         html  
    sim                                     html  
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Warning: Package 'birta' is deprecated and will be removed from Bioconductor
  version 3.12
** testing if installed package can be loaded from final location
Warning: Package 'birta' is deprecated and will be removed from Bioconductor
  version 3.12
** testing if installed package keeps a record of temporary installation path

install for x64

* installing *source* package 'birta' ...
** libs
"C:/rtools40/mingw64/bin/"g++ -std=gnu++11  -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c BayesNetwork.cpp -o BayesNetwork.o
"C:/rtools40/mingw64/bin/"g++ -std=gnu++11  -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c BayesNetworkNC.cpp -o BayesNetworkNC.o
"C:/rtools40/mingw64/bin/"g++ -std=gnu++11  -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c getStates.cpp -o getStates.o
C:/rtools40/mingw64/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o birta.dll tmp.def BayesNetwork.o BayesNetworkNC.o getStates.o -LC:/extsoft/lib/x64 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.11-/R/bin/x64 -lR
installing to C:/Users/biocbuild/bbs-3.11-bioc/meat/birta.buildbin-libdir/birta/libs/x64
** testing if installed package can be loaded
Warning: Package 'birta' is deprecated and will be removed from Bioconductor
  version 3.12
* MD5 sums
packaged installation of 'birta' as birta_1.32.0.zip
* DONE (birta)
* installing to library 'C:/Users/biocbuild/bbs-3.11-bioc/R/library'
package 'birta' successfully unpacked and MD5 sums checked

Tests output


Example timings

birta.Rcheck/examples_i386/birta-Ex.timings

nameusersystemelapsed

birta.Rcheck/examples_x64/birta-Ex.timings

nameusersystemelapsed