# HG changeset patch # User iuc # Date 1610446324 0 # Node ID 067d45e6caa9cb1cb3aa5c6ce93f5a9eebf1ffb1 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rgcca commit 00f9e92845737e05a4afb1c93043f35b7e4ea771" diff -r 000000000000 -r 067d45e6caa9 launcher.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/launcher.R Tue Jan 12 10:12:04 2021 +0000 @@ -0,0 +1,528 @@ +# Author: Etienne CAMENEN +# Date: 2020 +# Contact: arthur.tenenhaus@centralesupelec.fr +# Key-words: omics, RGCCA, multi-block +# EDAM operation: analysis, correlation, visualisation +# +# Abstract: Performs multi-variate analysis (PCA, CCA, PLS, R/SGCCA, etc.) +# and produces textual and graphical outputs (e.g. variables and individuals +# plots). + +rm(list = ls()) +graphics.off() +separator <- NULL + +########## Arguments ########## + +# Parse the arguments from a command line launch +get_args <- function() { + option_list <- list( + # File parameters + make_option( + opt_str = c("-d", "--datasets"), + type = "character", + metavar = "path list", + help = "List of comma-separated file paths corresponding to the + blocks to be analyzed (one per block and without spaces between + them; e.g., path/file1.txt,path/file2.txt) [required]" + ), + make_option( + opt_str = c("-c", "--connection"), + type = "character", + metavar = "path", + help = "Path of the file defining the connections between the blocks + [if not used, activates the superblock mode]" + ), + make_option( + opt_str = "--group", + type = "character", + metavar = "path", + help = "Path of the file coloring the individuals in the ad hoc + plot" + ), + make_option( + opt_str = c("-r", "--response"), + type = "integer", + metavar = "integer", + help = "Position of the response file for the supervised mode within + the block path list [actives the supervised mode]" + ), + make_option( + opt_str = "--names", + type = "character", + metavar = "character list", + help = "List of comma-separated block names to rename them (one per + block; without spaces between them) [default: the block file names]" + ), + make_option( + opt_str = c("-H", "--header"), + type = "logical", + action = "store_false", + help = "DO NOT consider the first row as the column header" + ), + make_option( + opt_str = "--separator", + type = "integer", + metavar = "integer", + default = opt[1], + help = "Character used to separate columns (1: tabulation, + 2: semicolon, 3: comma) [default: %default]" + ), + # Analysis parameter + make_option( + opt_str = "--type", + type = "character", + metavar = "character", + default = opt[2], + help = "Type of analysis [default: %default] (among: rgcca, pca, + cca, gcca, cpca-w, hpca, maxbet-b, maxbet, maxdiff-b, maxdiff, + maxvar-a, maxvar-b, maxvar, niles, r-maxvar, rcon-pca, ridge-gca, + sabscor, ssqcor, ssqcor, ssqcov-1, ssqcov-2, ssqcov, sum-pca, + sumcor, sumcov-1, sumcov-2, sumcov)" + ), + make_option( + opt_str = "--ncomp", + type = "character", + metavar = "integer list", + default = opt[3], + help = "Number of components in the analysis for each block + [default: %default]. The number should be higher than 1 and lower + than the minimum number of variables among the blocks. It can be a + single values or a comma-separated list (e.g 2,2,3,2)." + ), + make_option( + opt_str = "--penalty", + type = "character", + metavar = "float list", + default = opt[4], + help = "For RGCCA, a regularization parameter for each block (i.e., tau) + [default: %default]. Tau varies from 0 (maximizing the correlation) + to 1 (maximizing the covariance). For SGCCA, tau is automatically + set to 1 and shrinkage parameter can be defined instead for + automatic variable selection, varying from the square root of the + variable number (the fewest selected variables) to 1 (all the + variables are included). It can be a single value or a + comma-separated list (e.g. 0,1,0.75,1)." + ), + make_option( + opt_str = "--scheme", + type = "integer", + metavar = "integer", + default = opt[5], + help = "Link (i.e. scheme) function for covariance maximization + (1: x, 2: x^2, 3: |x|, 4: x^4) [default: %default]. Onnly, the x + function ('horst scheme') penalizes structural negative correlation. + The x^2 function ('factorial scheme') discriminates more strongly + the blocks than the |x| ('centroid scheme') one." + ), + make_option( + opt_str = "--scale", + type = "logical", + action = "store_false", + help = "DO NOT scale the blocks (i.e., a data centering step is + always performed). Otherwise, each block is normalised and divided + by the squareroot of its number of variables." + ), + make_option( + opt_str = "--superblock", + type = "logical", + action = "store_false", + help = "DO NOT use a superblock (i.e. a concatenation of all the + blocks to visualize them all together in a consensus space). In + this case, all blocks are assumed to be connected or a connection + file could be used." + ), + # Graphical parameters + make_option( + opt_str = "--text", + type = "logical", + action = "store_false", + help = "DO NOT display the name of the points instead of shapes when + plotting" + ), + make_option( + opt_str = "--block", + type = "integer", + metavar = "integer", + default = opt[6], + help = "Position in the path list of the plotted block (0: the + superblock or, if not activated, the last one, 1: the fist one, + 2: the 2nd, etc.)[default: the last one]" + ), + make_option( + opt_str = "--block_y", + type = "integer", + metavar = "integer", + help = "Position in the path list of the plotted block for the + Y-axis in the individual plot (0: the superblock or, if not + activated, the last one, 1: the fist one, 2: the 2nd, etc.) + [default: the last one]" + ), + make_option( + opt_str = "--compx", + type = "integer", + metavar = "integer", + default = opt[7], + help = "Component used in the X-axis for biplots and the only + component used for histograms [default: %default] (should not be + higher than the number of components of the analysis)" + ), + make_option( + opt_str = "--compy", + type = "integer", + metavar = "integer", + default = opt[8], + help = "Component used in the Y-axis for biplots + [default: %default] (should not be higher than the number of + components of the analysis)" + ), + make_option( + opt_str = "--nmark", + type = "integer", + metavar = "integer", + default = opt[9], + help = "Number maximum of top variables in ad hoc plot + [default: %default]" + ), + # output parameters + make_option( + opt_str = "--o1", + type = "character", + metavar = "path", + default = opt[10], + help = "Path for the individual plot [default: %default]" + ), + make_option( + opt_str = "--o2", + type = "character", + metavar = "path", + default = opt[11], + help = "Path for the variable plot [default: %default]" + ), + make_option( + opt_str = "--o3", + type = "character", + metavar = "path", + default = opt[12], + help = "Path for the top variables plot [default: %default]" + ), + make_option( + opt_str = "--o4", + type = "character", + metavar = "path", + default = opt[13], + help = "Path for the explained variance plot [default: %default]" + ), + make_option( + opt_str = "--o5", + type = "character", + metavar = "path", + default = opt[14], + help = "Path for the design plot [default: %default]" + ), + make_option( + opt_str = "--o6", + type = "character", + metavar = "path", + default = opt[15], + help = "Path for the individual table [default: %default]" + ), + make_option( + opt_str = "--o7", + type = "character", + metavar = "path", + default = opt[16], + help = "Path for the variable table [default: %default]" + ), + make_option( + opt_str = "--o8", + type = "character", + metavar = "path", + default = opt[17], + help = "Path for the analysis results in RData [default: %default]" + ) + ) + return(optparse::OptionParser(option_list = option_list)) +} + +char_to_list <- function(x) { + strsplit(gsub(" ", "", as.character(x)), ",")[[1]] +} + +check_arg <- function(opt) { + # Check the validity of the arguments opt : an optionParser object + + if (is.null(opt$datasets)) + stop_rgcca(paste0("datasets is required."), exit_code = 121) + + if (is.null(opt$scheme)) + opt$scheme <- "factorial" + else if (!opt$scheme %in% seq(4)) { + stop_rgcca( + paste0( + "scheme should be comprise between 1 and 4 [by default: 2], not be equal to ", + opt$scheme, + "." + ), + exit_code = 122 + ) + } else { + schemes <- c("horst", "factorial", "centroid") + if (opt$scheme == 4) + opt$scheme <- function(x) x ^ 4 + else + opt$scheme <- schemes[opt$scheme] + } + + if (!opt$separator %in% seq(3)) { + stop_rgcca( + paste0( + "separator should be comprise between 1 and 3 (1: Tabulation, 2: Semicolon, 3: Comma) [by default: 2], not be equal to ", + opt$separator, + "." + ), + exit_code = 123 + ) + } else { + separators <- c("\t", ";", ",") + opt$separator <- separators[opt$separator] + } + + nmark <- NULL + RGCCA:::check_integer("nmark", opt$nmark, min = 2) + + for (x in c("ncomp", "penalty")) + opt[[x]] <- char_to_list(opt[[x]]) + + return(opt) +} + +post_check_arg <- function(opt, rgcca) { +# Check the validity of the arguments after loading the blocks opt : an +# optionParser object blocks : a list of matrix + blocks <- NULL + for (x in c("block", "block_y")) { + if (!is.null(opt[[x]])) { + if (opt[[x]] == 0) + opt[[x]] <- length(rgcca$call$blocks) + opt[[x]] <- RGCCA:::check_blockx(x, opt[[x]], rgcca$call$blocks) + } + } + + if (any(opt$ncomp == 1)) + opt$compy <- 1 + + for (x in c("compx", "compy")) + opt[[x]] <- check_compx(x, opt[[x]], rgcca$call$ncomp, opt$block) + + return(opt) +} + +check_integer <- function(x, y = x, type = "scalar", float = FALSE, min = 1) { + + if (is.null(y)) + y <- x + + if (type %in% c("matrix", "data.frame")) + y_temp <- y + + y <- suppressWarnings(as.double(as.matrix(y))) + + if (any(is.na(y))) + stop_rgcca(paste(x, "should not be NA.")) + + if (!is(y, "numeric")) + stop_rgcca(paste(x, "should be numeric.")) + + if (type == "scalar" && length(y) != 1) + stop_rgcca(paste(x, "should be of length 1.")) + + if (!float) + y <- as.integer(y) + + if (all(y < min)) + stop_rgcca(paste0(x, " should be higher than or equal to ", min, ".")) + + if (type %in% c("matrix", "data.frame")) + y <- matrix( + y, + dim(y_temp)[1], + dim(y_temp)[2], + dimnames = dimnames(y_temp) + ) + + if (type == "data.frame") + as.data.frame(y) + + return(y) +} + +load_libraries <- function(librairies) { + for (l in librairies) { + if (!(l %in% installed.packages()[, "Package"])) + utils::install.packages(l, repos = "cran.us.r-project.org") + suppressPackageStartupMessages( + library( + l, + character.only = TRUE, + warn.conflicts = FALSE, + quietly = TRUE + )) + } +} + +stop_rgcca <- function( + message, + exit_code = "1", + call = NULL) { + + base::stop( + structure( + class = c(exit_code, "simpleError", "error", "condition"), + list(message = message, call. = NULL) + )) + } + +########## Main ########## + +# Get arguments : R packaging install, need an opt variable with associated +# arguments +opt <- list( + separator = 1, + type = "rgcca", + ncomp = 2, + penalty = 1, + scheme = 2, + block = 0, + compx = 1, + compy = 2, + nmark = 100, + o1 = "individuals.pdf", + o2 = "corcircle.pdf", + o3 = "top_variables.pdf", + o4 = "ave.pdf", + o5 = "design.pdf", + o6 = "individuals.tsv", + o7 = "variables.tsv", + o8 = "rgcca_result.RData", + datasets = paste0("inst/extdata/", + c("agriculture", "industry", "politic"), + ".tsv", + collapse = ",") +) + +load_libraries(c("ggplot2", "optparse", "scales", "igraph", "MASS", "rlang", "Deriv")) +try(load_libraries("ggrepel"), silent = TRUE) + +tryCatch( + opt <- check_arg(optparse::parse_args(get_args())), + error = function(e) { + if (length(grep("nextArg", e[[1]])) != 1) + stop_rgcca(e[[1]], exit_code = 140) + }, warning = function(w) + stop_rgcca(w[[1]], exit_code = 141) +) + +# Load functions +all_funcs <- unclass(lsf.str(envir = asNamespace("RGCCA"), all = T)) +for (i in all_funcs) + eval(parse(text = paste0(i, "<-RGCCA:::", i))) + +# Set missing parameters by default +opt$header <- !("header" %in% names(opt)) +opt$superblock <- !("superblock" %in% names(opt)) +opt$scale <- !("scale" %in% names(opt)) +opt$text <- !("text" %in% names(opt)) + +status <- 0 +tryCatch({ + + blocks <- load_blocks(opt$datasets, opt$names, opt$separator) + group <- load_response(blocks, opt$group, opt$separator, opt$header) + connection <- load_connection(file = opt$connection, separator = opt$separator) + + func <- quote( + rgcca( + blocks = blocks, + connection = connection, + response = opt$response, + superblock = opt$superblock, + ncomp = opt$ncomp, + scheme = opt$scheme, + scale = opt$scale, + type = opt$type + ) + ) + if (tolower(opt$type) %in% c("sgcca", "spca", "spls")) { + func[["sparsity"]] <- opt$penalty + }else { + func[["tau"]] <- opt$penalty + } + + rgcca_out <- eval(as.call(func)) + + opt <- post_check_arg(opt, rgcca_out) + + ########## Plot ########## + + if (rgcca_out$call$ncomp[opt$block] == 1 && is.null(opt$block_y)) { + warning("With a number of component of 1, a second block should be chosen to perform an individual plot") + } else { + ( + individual_plot <- plot_ind( + rgcca_out, + group, + opt$compx, + opt$compy, + opt$block, + opt$text, + opt$block_y, + "Response" + ) + ) + save_plot(opt$o1, individual_plot) + } + + if (rgcca_out$call$ncomp[opt$block] > 1) { + ( + corcircle <- plot_var_2D( + rgcca_out, + opt$compx, + opt$compy, + opt$block, + opt$text, + n_mark = opt$nmark + ) + ) + save_plot(opt$o2, corcircle) + } + + top_variables <- plot_var_1D( + rgcca_out, + opt$compx, + opt$nmark, + opt$block, + type = "cor" + ) + save_plot(opt$o3, top_variables) + + # Average Variance Explained + (ave <- plot_ave(rgcca_out)) + save_plot(opt$o4, ave) + + # Creates design scheme + design <- function() plot_network(rgcca_out) + save_plot(opt$o5, design) + + save_ind(rgcca_out, opt$compx, opt$compy, opt$o6) + save_var(rgcca_out, opt$compx, opt$compy, opt$o7) + save(rgcca_out, file = opt$o8) + + }, error = function(e) { + if (class(e)[1] %in% c("simpleError", "error", "condition")) + status <<- 1 + else + status <<- class(e)[1] + message(e$message) +}) +quit(status = status) diff -r 000000000000 -r 067d45e6caa9 macro.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macro.xml Tue Jan 12 10:12:04 2021 +0000 @@ -0,0 +1,44 @@ + + + 3.0.0 + + 1 corresponds to the first block, 2 corresponds to the second one, etc. This number should not be greater than the number of blocks selected. + + This number should not be greater than the selected number of component (2, by default). + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+ +
+ diff -r 000000000000 -r 067d45e6caa9 rgcca.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rgcca.xml Tue Jan 12 10:12:04 2021 +0000 @@ -0,0 +1,359 @@ + + + performs multiblock data analysis of several sets of variables (blocks) observed on the same group of individuals. + + + macro.xml + + + + topic_2269 + + + + operation_2945 + operation_3465 + operation_0337 + + + + rgccacmd + + + + + + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + + + + + + + + + + +
+ + + + "individuals" in output_selector + + + "corcircle" in output_selector + + + "top_variables" in output_selector + + + "ave" in output_selector + + + "design" in output_selector + + + "individual_table" in output_selector + + + "variable_table" in output_selector + + + "rdata" in output_selector + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + + + + + + +
+ + + + +
+ + + +
+ + + + +
+ + + + + + + + + + + +
+
+ + + + + + + +
+ + + + +
+ +
+ + +================================== +ABOUT +================================== + + +**Author:** +Etienne CAMENEN + + +**Contact:** +arthur.tenenhaus@centralesupelec.fr + + +**R package:** +The RGCCA package is available from the CRAN repository (https://cran.r-project.org/web/packages/RGCCA). + +--------------------------------------------------- + +================================== +R/SGCCA +================================== + +A user-friendly multi-blocks analysis (Regularized Generalized Canonical Correlation Analysis, RGCCA) as described in [1] and [2] with all default settings predefined. The software produces figures to explore the analysis' results: individuals and variables projected on two components of the multi-block analysis, list of top variables and explained variance in the model. + +**Working example** + + | From Russett data (RGCCA package): https://github.com/rgcca-factory/RGCCA/tree/master/inst/extdata + | Use *agriculture.tsv* as a block. Add *industry.tsv* and *politic.tsv* as new blocks. *connection.tsv* could be used as a design matrix and *political_system.tsv* as a response variable respectively in analysis and graphic settings. + +**Documentation** + +- RGCCA: https://cran.r-project.org/web/packages/RGCCA/vignettes/vignette_RGCCA.pdf +- accepted input / output formats: https://github.com/rgcca-factory/RGCCA#input-files + + + + + + 10.1007/s11336-017-9573-x + 10.1007/s11336-011-9206-8 + + +
diff -r 000000000000 -r 067d45e6caa9 test-data/1block/ave.pdf Binary file test-data/1block/ave.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/1block/corcircle.pdf Binary file test-data/1block/corcircle.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/1block/design.pdf Binary file test-data/1block/design.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/1block/individuals.pdf Binary file test-data/1block/individuals.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/1block/rgcca.result.RData Binary file test-data/1block/rgcca.result.RData has changed diff -r 000000000000 -r 067d45e6caa9 test-data/1block/top_variables.pdf Binary file test-data/1block/top_variables.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/2blocks/ave.pdf Binary file test-data/2blocks/ave.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/2blocks/corcircle.pdf Binary file test-data/2blocks/corcircle.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/2blocks/design.pdf Binary file test-data/2blocks/design.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/2blocks/individuals.pdf Binary file test-data/2blocks/individuals.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/2blocks/rgcca.result.RData Binary file test-data/2blocks/rgcca.result.RData has changed diff -r 000000000000 -r 067d45e6caa9 test-data/2blocks/top_variables.pdf Binary file test-data/2blocks/top_variables.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks/ave.pdf Binary file test-data/3blocks/ave.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks/corcircle.pdf Binary file test-data/3blocks/corcircle.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks/design.pdf Binary file test-data/3blocks/design.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks/individuals.pdf Binary file test-data/3blocks/individuals.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks/rgcca.result.RData Binary file test-data/3blocks/rgcca.result.RData has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks/top_variables.pdf Binary file test-data/3blocks/top_variables.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_connection/ave.pdf Binary file test-data/3blocks_connection/ave.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_connection/corcircle.pdf Binary file test-data/3blocks_connection/corcircle.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_connection/design.pdf Binary file test-data/3blocks_connection/design.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_connection/individuals.pdf Binary file test-data/3blocks_connection/individuals.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_connection/rgcca.result.RData Binary file test-data/3blocks_connection/rgcca.result.RData has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_connection/top_variables.pdf Binary file test-data/3blocks_connection/top_variables.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_sgcca/ave.pdf Binary file test-data/3blocks_sgcca/ave.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_sgcca/corcircle.pdf Binary file test-data/3blocks_sgcca/corcircle.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_sgcca/design.pdf Binary file test-data/3blocks_sgcca/design.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_sgcca/individuals.pdf Binary file test-data/3blocks_sgcca/individuals.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_sgcca/rgcca.result.RData Binary file test-data/3blocks_sgcca/rgcca.result.RData has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_sgcca/top_variables.pdf Binary file test-data/3blocks_sgcca/top_variables.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_supervised/ave.pdf Binary file test-data/3blocks_supervised/ave.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_supervised/corcircle.pdf Binary file test-data/3blocks_supervised/corcircle.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_supervised/design.pdf Binary file test-data/3blocks_supervised/design.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_supervised/individuals.pdf Binary file test-data/3blocks_supervised/individuals.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_supervised/rgcca.result.RData Binary file test-data/3blocks_supervised/rgcca.result.RData has changed diff -r 000000000000 -r 067d45e6caa9 test-data/3blocks_supervised/top_variables.pdf Binary file test-data/3blocks_supervised/top_variables.pdf has changed diff -r 000000000000 -r 067d45e6caa9 test-data/agriculture.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/agriculture.tsv Tue Jan 12 10:12:04 2021 +0000 @@ -0,0 +1,48 @@ + gini farm rent +Argentina 86.3 98.2 3.52 +Australia 92.9 99.6 3.27 +Austria 74 97.4 2.46 +Belgium 58.7 85.8 4.15 +Bolivia 93.8 97.7 3.04 +Brasil 83.7 98.5 2.31 +Canada 49.7 82.9 2.1 +Chile 93.8 99.7 2.67 +Colombia 84.9 98.1 2.57 +CostaRica 88.1 99.1 1.86 +Cuba 79.2 97.8 4 +Denmark 45.8 79.3 1.5 +DominicanRepublic 79.5 98.5 3.08 +Ecuador 86.4 99.3 2.75 +Egypt 74 98.1 2.53 +Salvador 82.8 98.8 2.78 +Finland 59.9 86.3 1.22 +France 58.3 86.1 3.3 +Guatemala 86 99.7 2.89 +Greece 74.7 99.4 2.93 +Honduras 75.7 97.4 2.87 +India 52.2 86.9 3.99 +Irak 88.1 99.3 4.33 +Irland 59.8 85.9 1.25 +Italy 80.3 98 3.21 +Japan 47 81.5 1.36 +Libia 70 93 2.25 +Luxemburg 63.8 87.7 2.99 +TheNetherlands 60.5 86.2 3.99 +NewZealand 77.3 95.5 3.15 +Nicaragua 75.7 96.4 2.39 +Norway 66.9 87.5 2.14 +Panama 73.7 95 2.59 +Peru 87.5 96.9 2.61 +Philippine 56.4 88.2 3.65 +Poland 45 77.7 0 +SouthVietnam 67.1 94.6 3.04 +Spain 78 99.5 3.8 +Sweden 57.7 87.2 2.99 +Switzerland 49.8 81.5 2.99 +Taiwan 65.2 94.1 3.71 +UK 71 93.4 3.82 +USA 70.5 95.4 3.06 +Uruguay 81.7 96.6 3.58 +Venezuela 90.9 99.3 3.07 +WestGermany 67.4 93 1.9 +Yugoslavia 43.7 79.8 0 diff -r 000000000000 -r 067d45e6caa9 test-data/connection.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/connection.tsv Tue Jan 12 10:12:04 2021 +0000 @@ -0,0 +1,3 @@ +0 1 1 +1 0 1 +1 1 0 diff -r 000000000000 -r 067d45e6caa9 test-data/industry.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/industry.tsv Tue Jan 12 10:12:04 2021 +0000 @@ -0,0 +1,48 @@ + gnpr labo +Argentina 5.92 3.22 +Australia 7.1 2.64 +Austria 6.28 3.47 +Belgium 6.92 2.3 +Bolivia 4.19 4.28 +Brasil 5.57 4.11 +Canada 7.42 2.48 +Chile 5.19 3.4 +Colombia 5.8 4.01 +CostaRica 5.73 4.01 +Cuba 5.89 3.74 +Denmark 6.82 3.14 +DominicanRepublic 5.32 4.03 +Ecuador 5.32 3.97 +Egypt 4.89 4.16 +Salvador 5.5 4.14 +Finland 6.85 3.83 +France 6.95 3.26 +Guatemala 5.19 4.22 +Greece 5.48 3.87 +Honduras 4.92 4.19 +India 4.28 4.26 +Irak 5.27 4.39 +Irland 6.23 3.69 +Italy 6.09 3.37 +Japan 5.48 3.69 +Libia 4.5 4.32 +Luxemburg 7.09 3.14 +TheNetherlands 6.56 2.4 +NewZealand 7.14 2.77 +Nicaragua 5.54 4.22 +Norway 6.88 3.26 +Panama 5.86 3.99 +Peru 4.94 4.09 +Philippine 5.3 4.08 +Poland 6.15 4.04 +SouthVietnam 4.89 4.17 +Spain 5.54 3.91 +Sweden 7.06 2.56 +Switzerland 7.11 2.3 +Taiwan 4.88 3.91 +UK 6.91 1.61 +USA 7.76 2.3 +Uruguay 6.34 3.61 +Venezuela 6.64 3.74 +WestGermany 6.64 2.64 +Yugoslavia 5.69 4.2 diff -r 000000000000 -r 067d45e6caa9 test-data/politic.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/politic.tsv Tue Jan 12 10:12:04 2021 +0000 @@ -0,0 +1,48 @@ + inst ecks death demostab demoinst dictator +Argentina 0.07 4.06 5.38 0 1 0 +Australia 0.01 0 0 1 0 0 +Austria 0.03 1.61 0 0 1 0 +Belgium 0.45 2.2 0.69 1 0 0 +Bolivia 0.37 3.99 6.5 0 0 1 +Brasil 0.45 3.91 0.69 0 1 0 +Canada 0.01 3.14 0 1 0 0 +Chile 0.12 3.09 1.1 0 1 0 +Colombia 0.18 3.87 5.76 0 1 0 +CostaRica 0.18 3 3.22 0 1 0 +Cuba 0.07 4.62 7.97 0 0 1 +Denmark 0.18 0 0 1 0 0 +DominicanRepublic 0.01 1.95 3.47 0 0 1 +Ecuador 0.3 3.74 2.94 0 0 1 +Egypt 0.61 3.83 1.1 0 0 1 +Salvador 0.3 2.3 1.1 0 0 1 +Finland 0.5 1.61 0 0 1 0 +France 1 3.85 0.69 0 1 0 +Guatemala 0.25 3.83 4.06 0 0 1 +Greece 0.61 2.3 1.1 0 1 0 +Honduras 0.07 3.83 4.72 0 0 1 +India 0 4.43 2.71 1 0 0 +Irak 0.9 3.22 5.84 0 0 1 +Irland 0.12 2.3 0 1 0 0 +Italy 0.45 3.95 0.69 0 1 0 +Japan 0.55 3.14 0.69 0 1 0 +Libia 0.22 2.2 0 0 0 1 +Luxemburg 0.03 0 0 1 0 0 +TheNetherlands 0.07 1.1 0 1 0 0 +NewZealand 0.03 0 0 1 0 0 +Nicaragua 0.03 2.83 2.83 0 0 1 +Norway 0.03 0.69 0 1 0 0 +Panama 0.5 3.4 3.26 0 0 1 +Peru 0.18 3.18 3.3 0 0 1 +Philippine 0.1 2.77 5.68 0 0 1 +Poland 0 3 1.79 0 0 1 +SouthVietnam 0 3.93 6.91 0 0 1 +Spain 0 3.14 0.69 0 0 1 +Sweden 0 0 0 1 0 0 +Switzerland 0 0 0 1 0 0 +Taiwan 0 1.39 0 0 0 1 +UK 0.07 2.56 0 1 0 0 +USA 0.03 3.14 0 1 0 0 +Uruguay 0.18 0.69 0.69 1 0 0 +Venezuela 0.25 3.61 4.72 0 0 1 +WestGermany 0 1.61 0 0 1 0 +Yugoslavia 0 2.3 0 0 0 1 diff -r 000000000000 -r 067d45e6caa9 test-data/political_system.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/political_system.tsv Tue Jan 12 10:12:04 2021 +0000 @@ -0,0 +1,48 @@ + demostab demoinst dictator +Argentina 0 1 0 +Australia 1 0 0 +Austria 0 1 0 +Belgium 1 0 0 +Bolivia 0 0 1 +Brasil 0 1 0 +Canada 1 0 0 +Chile 0 1 0 +Colombia 0 1 0 +CostaRica 0 1 0 +Cuba 0 0 1 +Denmark 1 0 0 +DominicanRepublic 0 0 1 +Ecuador 0 0 1 +Egypt 0 0 1 +Salvador 0 0 1 +Finland 0 1 0 +France 0 1 0 +Guatemala 0 0 1 +Greece 0 1 0 +Honduras 0 0 1 +India 1 0 0 +Irak 0 0 1 +Irland 1 0 0 +Italy 0 1 0 +Japan 0 1 0 +Libia 0 0 1 +Luxemburg 1 0 0 +TheNetherlands 1 0 0 +NewZealand 1 0 0 +Nicaragua 0 0 1 +Norway 1 0 0 +Panama 0 0 1 +Peru 0 0 1 +Philippine 0 0 1 +Poland 0 0 1 +SouthVietnam 0 0 1 +Spain 0 0 1 +Sweden 1 0 0 +Switzerland 1 0 0 +Taiwan 0 0 1 +UK 1 0 0 +USA 1 0 0 +Uruguay 1 0 0 +Venezuela 0 0 1 +WestGermany 0 1 0 +Yugoslavia 0 0 1