Repository 'ecology_stat_presence_abs'
hg clone https://toolshed.g2.bx.psu.edu/repos/ecology/ecology_stat_presence_abs

Changeset 0:e5552099d0e3 (2021-07-27)
Next changeset 1:9a2e0195bb43 (2021-08-13)
Commit message:
"planemo upload for repository https://github.com/Marie59/Data_explo_tools commit 2f883743403105d9cac6d267496d985100da3958"
added:
LICENSE.md
graph_homogeneity_normality.r
graph_link_var.r
graph_pres_abs_abund.r
graph_stat_presence_abs.r
macro.xml
stat_presence_abs.xml
test-data/Data.tabular
test-data/Missing_species.txt
test-data/Reel_life_survey_fish_modif.tabular
test-data/Reel_life_survey_fish_modif2.tabular
test-data/data_frenchbbs.tabular
test-data/levene.txt
test-data/species.txt
test-data/test_bbs2.txt
test-data/test_fish2.tabular
test-data/test_value_fish2.txt
b
diff -r 000000000000 -r e5552099d0e3 LICENSE.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE.md Tue Jul 27 16:57:02 2021 +0000
b
b'@@ -0,0 +1,674 @@\n+                    GNU GENERAL PUBLIC LICENSE\n+                       Version 3, 29 June 2007\n+\n+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n+ Everyone is permitted to copy and distribute verbatim copies\n+ of this license document, but changing it is not allowed.\n+\n+                            Preamble\n+\n+  The GNU General Public License is a free, copyleft license for\n+software and other kinds of works.\n+\n+  The licenses for most software and other practical works are designed\n+to take away your freedom to share and change the works.  By contrast,\n+the GNU General Public License is intended to guarantee your freedom to\n+share and change all versions of a program--to make sure it remains free\n+software for all its users.  We, the Free Software Foundation, use the\n+GNU General Public License for most of our software; it applies also to\n+any other work released this way by its authors.  You can apply it to\n+your programs, too.\n+\n+  When we speak of free software, we are referring to freedom, not\n+price.  Our General Public Licenses are designed to make sure that you\n+have the freedom to distribute copies of free software (and charge for\n+them if you wish), that you receive source code or can get it if you\n+want it, that you can change the software or use pieces of it in new\n+free programs, and that you know you can do these things.\n+\n+  To protect your rights, we need to prevent others from denying you\n+these rights or asking you to surrender the rights.  Therefore, you have\n+certain responsibilities if you distribute copies of the software, or if\n+you modify it: responsibilities to respect the freedom of others.\n+\n+  For example, if you distribute copies of such a program, whether\n+gratis or for a fee, you must pass on to the recipients the same\n+freedoms that you received.  You must make sure that they, too, receive\n+or can get the source code.  And you must show them these terms so they\n+know their rights.\n+\n+  Developers that use the GNU GPL protect your rights with two steps:\n+(1) assert copyright on the software, and (2) offer you this License\n+giving you legal permission to copy, distribute and/or modify it.\n+\n+  For the developers\' and authors\' protection, the GPL clearly explains\n+that there is no warranty for this free software.  For both users\' and\n+authors\' sake, the GPL requires that modified versions be marked as\n+changed, so that their problems will not be attributed erroneously to\n+authors of previous versions.\n+\n+  Some devices are designed to deny users access to install or run\n+modified versions of the software inside them, although the manufacturer\n+can do so.  This is fundamentally incompatible with the aim of\n+protecting users\' freedom to change the software.  The systematic\n+pattern of such abuse occurs in the area of products for individuals to\n+use, which is precisely where it is most unacceptable.  Therefore, we\n+have designed this version of the GPL to prohibit the practice for those\n+products.  If such problems arise substantially in other domains, we\n+stand ready to extend this provision to those domains in future versions\n+of the GPL, as needed to protect the freedom of users.\n+\n+  Finally, every program is threatened constantly by software patents.\n+States should not allow patents to restrict development and use of\n+software on general-purpose computers, but in those that do, we wish to\n+avoid the special danger that patents applied to a free program could\n+make it effectively proprietary.  To prevent this, the GPL assures that\n+patents cannot be used to render the program non-free.\n+\n+  The precise terms and conditions for copying, distribution and\n+modification follow.\n+\n+                       TERMS AND CONDITIONS\n+\n+  0. Definitions.\n+\n+  "This License" refers to version 3 of the GNU General Public License.\n+\n+  "Copyright" also means copyright-like laws that apply to other kinds of\n+works, such as semiconductor masks.\n+\n+  "The Program" refers to '..b'HE PROGRAM\n+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n+\n+  16. Limitation of Liability.\n+\n+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\n+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\n+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\n+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\n+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\n+SUCH DAMAGES.\n+\n+  17. Interpretation of Sections 15 and 16.\n+\n+  If the disclaimer of warranty and limitation of liability provided\n+above cannot be given local legal effect according to their terms,\n+reviewing courts shall apply local law that most closely approximates\n+an absolute waiver of all civil liability in connection with the\n+Program, unless a warranty or assumption of liability accompanies a\n+copy of the Program in return for a fee.\n+\n+                     END OF TERMS AND CONDITIONS\n+\n+            How to Apply These Terms to Your New Programs\n+\n+  If you develop a new program, and you want it to be of the greatest\n+possible use to the public, the best way to achieve this is to make it\n+free software which everyone can redistribute and change under these terms.\n+\n+  To do so, attach the following notices to the program.  It is safest\n+to attach them to the start of each source file to most effectively\n+state the exclusion of warranty; and each file should have at least\n+the "copyright" line and a pointer to where the full notice is found.\n+\n+    <one line to give the program\'s name and a brief idea of what it does.>\n+    Copyright (C) <year>  <name of author>\n+\n+    This program is free software: you can redistribute it and/or modify\n+    it under the terms of the GNU General Public License as published by\n+    the Free Software Foundation, either version 3 of the License, or\n+    (at your option) any later version.\n+\n+    This program is distributed in the hope that it will be useful,\n+    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+    GNU General Public License for more details.\n+\n+    You should have received a copy of the GNU General Public License\n+    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n+\n+Also add information on how to contact you by electronic and paper mail.\n+\n+  If the program does terminal interaction, make it output a short\n+notice like this when it starts in an interactive mode:\n+\n+    <program>  Copyright (C) <year>  <name of author>\n+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w\'.\n+    This is free software, and you are welcome to redistribute it\n+    under certain conditions; type `show c\' for details.\n+\n+The hypothetical commands `show w\' and `show c\' should show the appropriate\n+parts of the General Public License.  Of course, your program\'s commands\n+might be different; for a GUI interface, you would use an "about box".\n+\n+  You should also get your employer (if you work as a programmer) or school,\n+if any, to sign a "copyright disclaimer" for the program, if necessary.\n+For more information on this, and how to apply and follow the GNU GPL, see\n+<https://www.gnu.org/licenses/>.\n+\n+  The GNU General Public License does not permit incorporating your program\n+into proprietary programs.  If your program is a subroutine library, you\n+may consider it more useful to permit linking proprietary applications with\n+the library.  If this is what you want to do, use the GNU Lesser General\n+Public License instead of this License.  But first, please read\n+<https://www.gnu.org/licenses/why-not-lgpl.html>.\n'
b
diff -r 000000000000 -r e5552099d0e3 graph_homogeneity_normality.r
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graph_homogeneity_normality.r Tue Jul 27 16:57:02 2021 +0000
[
@@ -0,0 +1,130 @@
+#Rscript
+
+#######################################
+##     Homogeneity and normality     ##
+#######################################
+
+#####Packages : car
+#               ggplot2
+#               ggpubr
+#               Cowplot
+
+#####Load arguments
+
+args <- commandArgs(trailingOnly = TRUE)
+
+if (length(args) == 0) {
+    stop("This tool needs at least one argument")
+}else{
+    table <- args[1]
+    hr <- args[2]
+    date <- as.numeric(args[3])
+    spe <- as.numeric(args[4])
+    var <- as.numeric(args[5])
+}
+
+if (hr == "false") {
+  hr <- FALSE
+}else{
+  hr <- TRUE
+}
+
+#####Import data
+data <- read.table(table, sep = "\t", dec = ".", header = hr, fill = TRUE, encoding = "UTF-8")
+data <- na.omit(data)
+coldate <- colnames(data)[date]
+colspe <- colnames(data)[spe]
+colvar <- colnames(data)[var]
+
+#####Your analysis
+
+####Homogeneity of the variance####
+
+##Test of Levene##
+testlevene <- function(data, col1, col2) {
+        data[, col1] <- as.numeric(data[, col1])
+        data[, col2] <- as.factor(data[, col2])
+    tb_levene <- car::leveneTest(y = data[, col1], group = data[, col2])
+
+    return(tb_levene)
+    }
+levene <- capture.output(testlevene(data = data, col1 = colvar, col2 = colspe))
+
+cat("\nwrite table with levene test. \n--> \"", paste(levene, "\"\n", sep = ""), file = "levene.txt", sep = "", append = TRUE)
+
+##Two boxplots to visualize it##
+
+homog_var <- function(data, col1, col2, col3, mult) {
+    data[, col1] <- as.factor(data[, col1])
+    if (mult) {
+            for (spe in unique(data[, col2])) {
+             data_cut <- data[data[, col2] == spe, ]
+             graph_2 <- ggplot2::ggplot(data_cut, ggplot2::aes_string(x = col1, y = col3, color = col1)) +
+             ggplot2::geom_boxplot() +
+             ggplot2::theme(legend.position = "none", axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1), panel.background = ggplot2::element_rect(fill = "#d9d4c5", colour = "#d9d4c5", linetype = "solid"),
+              panel.grid.major = ggplot2::element_line(linetype = "solid", colour = "white"),
+              panel.grid.minor = ggplot2::element_line(linetype = "solid", colour = "white"))
+
+            ggplot2::ggsave(paste("Homogeneity_of_", spe, ".png"), graph_2, width = 16, height = 9, units = "cm")
+            }
+        }else{
+        graph_1 <- ggplot2::ggplot(data, ggplot2::aes_string(x = col1, y = col3, color = col1)) +
+          ggplot2::geom_boxplot() +
+          ggplot2::theme(legend.position = "none", axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1))
+
+    #Put multiple panels
+    graph_2 <- graph_1 + ggplot2::facet_grid(rows = ggplot2::vars(data[, col2]), scales = "free") +
+      ggplot2::theme(panel.background = ggplot2::element_rect(fill = "#d9d4c5", colour = "#d9d4c5", linetype = "solid"),
+          panel.grid.major = ggplot2::element_line(linetype = "solid", colour = "white"),
+          panel.grid.minor = ggplot2::element_line(linetype = "solid", colour = "white"))
+
+    ggplot2::ggsave("Homogeneity.png", graph_2, width = 16, height = 9, units = "cm")
+        }
+}
+
+####Normality of the distribution####
+# Kolmogorov-Smirnov test
+
+ks <- capture.output(ks.test(x = data[, var], y = "pnorm", alternative = "two.sided"))
+
+cat("\nwrite table with Kolmogorov-Smirnov test. \n--> \"", paste(ks, "\"\n", sep = ""), file = "ks.txt", sep = "", append = TRUE)
+
+#Histogramm with distribution line
+graph_hist <- function(data, var1) {
+  graph_hist <- ggplot2::ggplot(data) +
+  ggplot2::geom_histogram(ggplot2::aes_string(x = var1), binwidth = 2, color = "black", fill = "white") +
+  ggplot2::geom_density(ggplot2::aes_string(var1), alpha = 0.12, fill = "red") +
+  ggplot2::ggtitle("Distribution histogram")
+
+return(graph_hist)
+}
+
+#Add the mean dashed line
+add_mean <- function(graph, var1) {
+  graph_mean <- graph + ggplot2::geom_vline(xintercept = mean(data[, var1]),
+              color = "midnightblue", linetype = "dashed", size = 1)
+
+return(graph_mean)
+}
+
+#Adding a QQplot
+graph_qqplot <- function(data, var1) {
+  graph2 <- ggpubr::ggqqplot(data, var1, color = "midnightblue") + ggplot2::ggtitle("Q-Q plot")
+
+return(graph2)
+}
+
+#On suppose que les données sont distribuées normalement lorsque les points suivent approximativement la ligne de référence à 45 degrés.
+
+graph_fin <- function(graph1, graph2) {
+  graph <- cowplot::plot_grid(graph1, graph2, ncol = 2, nrow = 1)
+
+  ggplot2::ggsave("Normal_distribution.png", graph, width = 10, height = 7, units = "cm")
+}
+
+mult <- ifelse(length(unique(data[, colspe])) == 2, FALSE, TRUE)
+homog_var(data, col1 = coldate, col2 = colspe, col3 = colvar, mult = mult)
+
+graph_hist1 <- graph_hist(data, var1 = colvar)
+graph_mean <- add_mean(graph = graph_hist1, var1 = colvar)
+graph_fin(graph1 = graph_mean, graph2 = graph_qqplot(data, var1 = colvar))
b
diff -r 000000000000 -r e5552099d0e3 graph_link_var.r
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graph_link_var.r Tue Jul 27 16:57:02 2021 +0000
[
b'@@ -0,0 +1,296 @@\n+#Rscript\r\n+\r\n+################################################\r\n+##    Link between variables and themselves   ##\r\n+################################################\r\n+\r\n+#####Packages : ggplot2\r\n+#               Cowplot\r\n+#               Car\r\n+#               faraway\r\n+#               dplyr\r\n+#               GGally\r\n+#               FactoMiner\r\n+#               factoextra\r\n+#               ggcorrplot\r\n+\r\n+#####Load arguments\r\n+\r\n+args <- commandArgs(trailingOnly = TRUE)\r\n+\r\n+if (length(args) == 0) {\r\n+    stop("This tool needs at least one argument")\r\n+}else{\r\n+    table <- args[1]\r\n+    hr <- args[2]\r\n+    colli <- as.logical(args[3])\r\n+    vif <- as.logical(args[4])\r\n+    pca <- as.logical(args[5])\r\n+    interr <- as.logical(args[6])\r\n+    auto <- as.logical(args[7])\r\n+    spe <- as.numeric(args[8])\r\n+    col <- as.numeric(strsplit(args[9], ",")[[1]])\r\n+    var <- as.numeric(args[10])\r\n+    var2 <- as.numeric(args[11])\r\n+    var4 <- as.numeric(args[12])\r\n+}\r\n+\r\n+if (hr == "false") {\r\n+  hr <- FALSE\r\n+}else{\r\n+  hr <- TRUE\r\n+}\r\n+\r\n+if (length(col) == 1) {\r\n+stop("Please select two or more numerical columns")\r\n+}\r\n+\r\n+#####Import data\r\n+data <- read.table(table, sep = "\\t", dec = ".", header = hr, fill = TRUE, encoding = "UTF-8")\r\n+if (vif | pca) {\r\n+data_active <- data[col]\r\n+#Define the active individuals and the active variables for the PCA\r\n+}\r\n+\r\n+if (colli | interr) {\r\n+colspe <- colnames(data)[spe]\r\n+}\r\n+\r\n+if (colli) {\r\n+data_num <- data[col]\r\n+data_num$species <- data[, spe]\r\n+data_num <- data_num[grep("^$", data_num$spe, invert = TRUE), ]\r\n+}\r\n+\r\n+if (interr | auto) {\r\n+colvar <- colnames(data)[var]\r\n+}\r\n+\r\n+if (interr) {\r\n+colvar2 <- colnames(data)[var2]\r\n+colvar4 <- colnames(data)[var4]\r\n+}\r\n+\r\n+#####Your analysis\r\n+\r\n+####Independence of the observations####\r\n+\r\n+acf_tb <- function(data, var) {\r\n+obj <- acf(data[, var], na.action = na.pass)\r\n+  return(obj)\r\n+}\r\n+\r\n+acf_df <- function(data, var) {\r\n+\r\n+tb <- data.frame(acf = acf_tb(data, var)$acf, lag = acf_tb(data, var)$lag)\r\n+\r\n+  return(tb) # Lag: intervalle temporel entre mesures, fr\xc3\xa9quence \xc3\xa0 laquelle on mesure l\'auto corr\xc3\xa9lation.\r\n+# ACF: ind\xc3\xa9pendance temporelle\r\n+}\r\n+\r\n+autocorr <- function(var1, var2) {\r\n+  cat("\\nACF\\n", var2$acf, file = "acf.txt", fill = 1, append = TRUE)\r\n+  graph <- ggplot2::ggplot() +\r\n+  ggplot2::geom_bar(ggplot2::aes(x = var2$lag, y = var2$acf), stat = "identity", position = "identity", fill = "midnightblue") +\r\n+  ggplot2::geom_hline(mapping = ggplot2::aes(yintercept = qnorm((1 + 0.95) / 2) / sqrt(var1$n.used)),\r\n+             linetype = "dashed") + # calcul interval de confiance \xc3\xa0 95% sans correction du bruit blanc.\r\n+  ggplot2::geom_hline(mapping = ggplot2::aes(yintercept = -qnorm((1 + 0.95) / 2) / sqrt(var1$n.used)), linetype = "dashed") + ggplot2::labs(title = "Autocorrelation") + ggplot2::xlab("lag") + ggplot2::ylab("acf")\r\n+  ggplot2::theme(plot.title = ggplot2::element_text(hjust = 0.5))\r\n+\r\n+  ggplot2::ggsave("autocorrelation.png", graph)\r\n+}\r\n+\r\n+####Interractions####\r\n+\r\n+graph <- function(data, var1, var2, var3) {\r\n+  graph <- ggplot2::ggplot(data, ggplot2::aes_string(x = var1, y = var2, group = var3, color = var3)) +\r\n+  ggplot2::geom_point() +\r\n+  ggplot2::geom_smooth(method = lm, se = FALSE) +\r\n+  ggplot2::theme(plot.title = ggplot2::element_text(color = "black", size = 12, face = "bold"))\r\n+\r\n+return(graph)\r\n+}\r\n+\r\n+# Put multiple panels\r\n+interraction <- function(data, var1, var2, var3, var4) {\r\n+  cat("\\nSpecies\\n", spe, file = "Species.txt", fill = 1, append = TRUE)\r\n+  if (mult1) {\r\n+      for (spe in unique(data[, var3])) {\r\n+      data_cut <- data[data[, var3] == spe, ]\r\n+      mult_graph <- graph(data_cut, var1, var2, var3) + ggplot2::facet_grid(cols = ggplot2::vars(data_cut[, var4]), scales = "free") +\r\n+      cowplot::background_grid(major = "xy", minor = "none") +\r\n+      cowplot::panel_border() + ggplot2::ggtitle("Interactions")\r\n+\r\n+      ggplot2::ggsave(paste("interaction_of_", spe'..b'+}\r\n+\r\n+####PCA method####\r\n+\r\n+plot_pca <- function(data) {\r\n+  #Correlation circle\r\n+  graph_corr <- factoextra::fviz_pca_var(active_data(data), col.var = "cos2",\r\n+                           gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),\r\n+                           repel = TRUE #Avoid text overlap\r\n+                           )\r\n+  ggplot2::ggsave("Pca_circle.png", graph_corr)\r\n+}\r\n+\r\n+plot_qual <- function(data) {\r\n+  #PCA results for variables\r\n+  var <- factoextra::get_pca_var(active_data(data))\r\n+\r\n+  #representation quality\r\n+  graph_quality <- ggcorrplot::ggcorrplot(var$cos2[!apply(var$cos2, 1, anyNA), ], method = "circle",\r\n+  ggtheme = ggplot2::theme_gray,\r\n+  colors = c("#00AFBB", "#E7B800", "#FC4E07"))\r\n+\r\n+  ggplot2::ggsave("Pca_quality.png", graph_quality)\r\n+}\r\n+\r\n+#### Variance inflation factor ####\r\n+\r\n+myvif <- function(mod) {\r\n+  v <- vcov(mod)\r\n+  assign <- attributes(model.matrix(mod))$assign\r\n+  if (names(coefficients(mod)[1]) == "(Intercept)") {\r\n+    v <- v[-1, -1]\r\n+    assign <- assign[-1]\r\n+  } else warning("No intercept: vifs may not be sensible.")\r\n+  terms <- labels(terms(mod))\r\n+  n_terms <- length(terms)\r\n+  if (n_terms < 2) stop("The model contains fewer than 2 terms")\r\n+  if (length(assign) > dim(v)[1]) {\r\n+     diag(tmp_cor) <- 0\r\n+     if (any(tmp_cor == 1.0)) {\r\n+        return("Sample size is too small, 100% collinearity is present")\r\n+     } else {\r\n+        return("Sample size is too small")\r\n+     }\r\n+  }\r\n+  r <- cov2cor(v)\r\n+  detr <- det(r)\r\n+  result <- matrix(0, n_terms, 3)\r\n+  rownames(result) <- terms\r\n+  colnames(result) <- c("GVIF", "Df", "GVIF^(1/2Df)")\r\n+  for (term in 1:n_terms) {\r\n+    subs <- which(assign == term)\r\n+    result[term, 1] <- det(as.matrix(r[subs, subs])) * det(as.matrix(r[-subs, -subs])) / detr\r\n+    result[term, 2] <- length(subs)\r\n+  }\r\n+  if (all(result[, 2] == 1)) {\r\n+    result <- data.frame(GVIF = result[, 1])\r\n+  } else {\r\n+    result[, 3] <- result[, 1] ^ (1 / (2 * result[, 2]))\r\n+  }\r\n+  invisible(result)\r\n+}\r\n+corvif1 <- function(dataz) {\r\n+    dataz <- as.data.frame(dataz)\r\n+    #correlation part\r\n+    tmp_cor <- cor(dataz, use = "complete.obs")\r\n+    return(tmp_cor)\r\n+}\r\n+corvif2 <- function(dataz) {\r\n+    dataz <- as.data.frame(dataz)\r\n+    #vif part\r\n+    form    <- formula(paste("fooy ~ ", paste(strsplit(names(dataz), " "), collapse = " + ")))\r\n+    dataz   <- data.frame(fooy = 1, dataz)\r\n+    lm_mod  <- lm(form, dataz)\r\n+\r\n+    return(myvif(lm_mod))\r\n+}\r\n+\r\n+#Autocorrelation\r\n+if (auto) {\r\n+obj1 <- acf_tb(data, var = colvar)\r\n+obj2 <- acf_df(data, var = colvar)\r\n+autocorr(var1 = obj1, var2 = obj2)\r\n+}\r\n+\r\n+if (interr) {\r\n+#Interractions\r\n+mult1 <- ifelse(length(unique(data[, colspe])) <= 6, FALSE, TRUE)\r\n+interraction(data, var1 = colvar, var2 = colvar2, var3 = colspe, var4 = colvar4)\r\n+}\r\n+\r\n+#Collinearity\r\n+if (colli) {\r\n+mult2 <- ifelse(length(unique(data[, spe])) < 3, FALSE, TRUE)\r\n+coli(data = data_num, var = spe)\r\n+}\r\n+\r\n+#PCA\r\n+if (pca) {\r\n+active_data <- function(data) {\r\n+  #Calcul of PCA for the active data\r\n+  res_pca <- FactoMineR::PCA(data, graph = FALSE)\r\n+\r\n+return(res_pca)\r\n+}\r\n+\r\n+#eigenvalue\r\n+eig_val <- capture.output(factoextra::get_eigenvalue(active_data(data_active)))\r\n+\r\n+cat("\\nwrite table with eigenvalue. \\n--> \\"", paste(eig_val, "\\"\\n", sep = ""), file = "valeurs.txt", sep = "", append = TRUE)\r\n+\r\n+plot_pca(data_active)\r\n+plot_qual(data_active)\r\n+}\r\n+\r\n+#VIF\r\n+if (vif) {\r\n+#Compute 2 tables#\r\n+tb_corr <- as.data.frame(corvif1(dataz = data_active))\r\n+tb_corr <- cbind(x = rownames(tb_corr), tb_corr)\r\n+tb_vif <- corvif2(dataz = data_active)\r\n+\r\n+write.table(tb_corr, "corr.tabular", row.names = FALSE, quote = FALSE, sep = "\\t", dec = ".", fileEncoding = "UTF-8")\r\n+\r\n+if (all(is.na(tb_vif))) {\r\n+  tb_vif <- NULL\r\n+  cat("Vif couldn\'t be calculated, selected data isn\'t correlated")\r\n+}else{\r\n+write.table(tb_vif, "vif.tabular", row.names = FALSE, quote = FALSE, sep = "\\t", dec = ".", fileEncoding = "UTF-8")\r\n+}\r\n+}\r\n'
b
diff -r 000000000000 -r e5552099d0e3 graph_pres_abs_abund.r
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graph_pres_abs_abund.r Tue Jul 27 16:57:02 2021 +0000
[
@@ -0,0 +1,195 @@
+#Rscript
+
+#########################################################
+##    Presence abscence and abundance in environment   ##
+#########################################################
+
+#####Packages : ggplot2
+#               vegan
+
+#####Load arguments
+
+args <- commandArgs(trailingOnly = TRUE)
+
+if (length(args) < 5) {
+    stop("This tool needs at least 5 arguments")
+}else{
+    table <- args[1]
+    hr <- args[2]
+    abundance <- as.logical(args[3])
+    presabs <- as.logical(args[4])
+    rarefaction <- as.logical(args[5])
+    lat <- as.numeric(args[6])
+    long <- as.numeric(args[7])
+    ind <- as.character(args[8])
+    loc <- as.numeric(args[9])
+    num <- as.character(args[10])
+    spe <- as.numeric(args[11])
+    abond <- as.numeric(args[12])
+}
+
+if (hr == "false") {
+  hr <- FALSE
+}else{
+  hr <- TRUE
+}
+
+#####Import data
+data <- read.table(table, sep = "\t", dec = ".", header = hr, fill = TRUE, encoding = "UTF-8")
+
+if (abundance) {
+collat <- colnames(data)[lat]
+collong <- colnames(data)[long]
+}
+
+if (presabs) {
+colloc <- colnames(data)[loc]
+}
+
+if (presabs | rarefaction | abundance) {
+colabond <- colnames(data)[abond]
+colspe <- colnames(data)[spe]
+data <- data[grep("^$", data[, colspe], invert = TRUE), ]
+}
+
+#####Your analysis
+
+####The abundance in the environment####
+
+##Representation of the environment##
+
+## Mapping
+graph_map <- function(data, collong, collat, colabond, ind, colspe) {
+  cat("\nCoordinates range\n\nLatitude from ", min(data[, collat], na.rm = TRUE), " to ", max(data[, collat], na.rm = TRUE), "\nLongitude from ", min(data[, collong], na.rm = TRUE), " to ", max(data[, collong], na.rm = TRUE), file = "Data_abund.txt", fill = 1, append = TRUE)
+  if (mult0) {
+    mappy <- ggplot2::ggplot(data, ggplot2::aes_string(x = collong, y = collat, cex = colabond, color = colspe)) +
+    ggplot2::geom_point() + ggplot2::ggtitle(paste("Abundance of", ind, "in the environment")) + ggplot2::xlab("Longitude") + ggplot2::ylab("Latitude")  + ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1), legend.text = ggplot2::element_text(size = 8)) + ggplot2::guides(cex = ggplot2::guide_legend(reverse = TRUE))
+
+  }else{
+    mappy <- ggplot2::ggplot(data, ggplot2::aes_string(x = collong, y = collat, cex = colabond, color = colabond)) +
+    ggplot2::geom_point() + ggplot2::ggtitle(paste("Abundance of", ind, "in the environment")) + ggplot2::xlab("Longitude") + ggplot2::ylab("Latitude")  + ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1), legend.text = ggplot2::element_text(size = 8)) + ggplot2::guides(cex = ggplot2::guide_legend(reverse = TRUE))
+  }
+  ggplot2::ggsave("mappy.png", mappy, width = 20, height = 9, units = "cm")
+}
+
+####Presence absence abundance####
+
+## Histogram
+graph_hist <- function(data, col1, col2, col3) {
+  cat("\nLocations\n", unique(data[, col1]), file = "Locations.txt", fill = 1, append = TRUE)
+  if (mult1) {
+    for (loc in unique(data[, col1])) {
+      data_cut <- data[data[, col1] == loc, ]
+      data_cut <- data_cut[data_cut[, col3] > 0, ]
+      if (length(unique(data_cut[, col2])) <= 40) {
+        top <- nrow(data_cut)
+        var <- nchar(as.character(round(top * 0.1, digits = 0)))
+        step <- round(top * 0.1, digits = ifelse(var == 1, 1, -var + 1))
+        graph <- ggplot2::ggplot(data_cut) +
+        ggplot2::geom_bar(ggplot2::aes_string(x = col1, fill = col2)) +
+        ggplot2::scale_y_continuous(breaks = seq(from = 0, to = top, by = step)) +
+        ggplot2::theme(plot.title = ggplot2::element_text(color = "black", size = 12, face = "bold")) +
+        ggplot2::ggtitle("Number of presence")
+
+        ggplot2::ggsave(paste("number_in_", loc, ".png"), graph)
+      }else{
+        cat(paste0("\n", loc, " had more than 40 species and plot isn't readable please select a higher taxon level or cut your data"))
+      }
+    }
+  }else{
+  top <- nrow(data)
+  var <- nchar(as.character(round(top * 0.1, digits = 0)))
+  step <- round(top * 0.1, digits = ifelse(var == 1, 1, -var + 1))
+  graph <- ggplot2::ggplot(data) +
+  ggplot2::geom_bar(ggplot2::aes_string(x = col1, fill = col2)) +
+  ggplot2::scale_y_continuous(breaks = seq(from = 0, to = top, by = step)) +
+  ggplot2::theme(plot.title = ggplot2::element_text(color = "black", size = 12, face = "bold")) +
+  ggplot2::ggtitle("Number of individuals")
+
+  ggplot2::ggsave("number.png", graph)
+  }
+}
+
+rare <- function(data, spe, abond, rare, num) {
+# Put the data in form
+  new_data <- as.data.frame(data[, spe])
+  colnames(new_data) <- c("Species")
+  new_data$total <- data[, abond]
+
+  new_data$rarefaction <- as.integer(rare)
+
+  end <- length(unique(new_data$Species))
+  out <- vegan::rarecurve(new_data[, 2:3], step = 10, sample = rarefy_sample, label = FALSE)
+  names(out) <- paste(unique(new_data$Species), sep = "")
+
+# Coerce data into "long" form.
+  protox <- mapply(FUN = function(x, y) {
+    mydf <- as.data.frame(x)
+    colnames(mydf) <- "value"
+    mydf$species <- y
+    mydf$subsample <- attr(x, "Subsample")
+    mydf <- na.omit(mydf)
+    mydf
+  }, x = out, y = as.list(names(out)), SIMPLIFY = FALSE)
+
+  xy <- do.call(rbind, protox)
+  rownames(xy) <- NULL  # pretty
+
+# Plot.
+
+  if (mult2) {
+    for (spe in unique(data[, spe])) {
+      xy_cut <- xy[xy$species == spe, ]
+      top <- max(xy_cut$subsample)
+      var <- nchar(as.character(round(top * 0.1, digits = 0)))
+      step <- round(top * 0.1, digits = ifelse(var == 1, 1, -var + 1))
+      courbe <- ggplot2::ggplot(xy_cut, ggplot2::aes(x = subsample, y = value)) +
+      ggplot2::theme_gray() +
+      ggplot2::geom_line(size = 1) +
+      ggplot2::scale_x_continuous(breaks = seq(from = 0, to = top, by = step)) +
+      ggplot2::xlab("Abundance") + ggplot2::ylab("Value") +
+      ggplot2::ggtitle("rarefaction curve")
+
+      ggplot2::ggsave(paste("rarefaction_of_", spe, ".png"), courbe)
+    }
+  }else{
+    top <- max(xy$subsample)
+    var <- nchar(as.character(round(top * 0.1, digits = 0)))
+    step <- round(top * 0.1, digits = ifelse(var == 1, 1, -var + 1))
+    courbe <- ggplot2::ggplot(xy, ggplot2::aes(x = subsample, y = value, color = species)) +
+    ggplot2::theme_gray() +
+    ggplot2::geom_line(size = 1) +
+    ggplot2::scale_x_continuous(breaks = seq(from = 0, to = top, by = step)) +
+    ggplot2::xlab("Subsample") + ggplot2::ylab("Value") +
+    ggplot2::ggtitle("rarefaction curves")
+
+    ggplot2::ggsave("rarefaction.png", courbe)
+  }
+}
+
+if (abundance) {
+#Maps
+mult0 <- ifelse(length(unique(data[, colspe])) > 10, FALSE, TRUE)
+graph_map(data, collong = collong, collat = collat, colabond = colabond, ind = ind, colspe = colspe)
+}
+
+if (presabs) {
+#Presence absence count
+mult1 <- ifelse(length(unique(data[, colloc])) <= 10, FALSE, TRUE)
+graph_hist(data, col1 = colloc, col2 = colspe, col3 = colabond)
+}
+
+if (rarefaction) {
+#rarefaction
+
+#### rarefaction indice ####
+rarefy_sample <- as.numeric(num)
+
+## Calcul de la rarefaction
+rarefaction <- vegan::rarefy(data[, abond], rarefy_sample)
+
+write.table(rarefaction, "rare.tabular")
+
+mult2 <- ifelse(length(unique(data[, colspe])) <= 30, FALSE, TRUE)
+rare(data, spe = colspe, abond = colabond, rare = rarefaction, num = rarefy_sample)
+}
b
diff -r 000000000000 -r e5552099d0e3 graph_stat_presence_abs.r
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graph_stat_presence_abs.r Tue Jul 27 16:57:02 2021 +0000
[
@@ -0,0 +1,115 @@
+#Rscript
+
+################################
+##    Median and dispersion   ##
+################################
+
+#####Packages : Cowplot
+#               ggplot2
+
+#####Load arguments
+
+args <- commandArgs(trailingOnly = TRUE)
+
+if (length(args) == 0) {
+    stop("This tool needs at least one argument")
+}else{
+    table <- args[1]
+    hr <- args[2]
+    var <- as.numeric(args[3])
+    spe <- as.numeric(args[4])
+    loc <- as.numeric(args[5])
+    time <- as.numeric(args[6])
+}
+
+if (hr == "false") {
+  hr <- FALSE
+}else{
+  hr <- TRUE
+}
+
+#####Import data
+data <- read.table(table, sep = "\t", dec = ".", header = hr, fill = TRUE, encoding = "UTF-8")
+data <- na.omit(data)
+colvar <- colnames(data)[var]
+colspe <- colnames(data)[spe]
+colloc <- colnames(data)[loc]
+coltime <- colnames(data)[time]
+
+data <- data[grep("^$", data[, spe], invert = TRUE), ]
+time <- as.integer(substring(data[, time], first = 1, last = 4))
+
+#####Your analysis
+
+####Median and data dispersion####
+
+#Median
+graph_median <- function(data, var) {
+  graph_median <- ggplot2::ggplot(data, ggplot2::aes_string(y = var)) +
+  ggplot2::geom_boxplot(color = "darkblue") +
+  ggplot2::theme(legend.position = "none") + ggplot2::ggtitle("Median")
+
+return(graph_median)
+
+}
+
+#Dispersion
+dispersion <- function(data, var, var2) {
+  graph_dispersion <- ggplot2::ggplot(data) +
+  ggplot2::geom_point(ggplot2::aes_string(x = var2, y = var, color = var2)) +
+  ggplot2::scale_fill_brewer(palette = "Set3") +
+  ggplot2::theme(legend.position = "none", axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1), plot.title = ggplot2::element_text(color = "black", size = 12, face = "bold")) + ggplot2::ggtitle("Dispersion")
+
+return(graph_dispersion)
+
+}
+
+#The 2 graph
+med_disp <- function(med, disp) {
+  graph <- cowplot::plot_grid(med, disp, ncol = 1, nrow = 2, vjust = -5,  scales = "free")
+
+  ggplot2::ggsave("Med_Disp.png", graph, width = 12, height = 20, units = "cm")
+}
+
+
+#### Zero problem in data ####
+
+#Put data in form
+make_table_analyse <- function(data, var, spe, var2, var3) {
+    tab <- reshape(data
+                  , v.names = var
+                  , idvar = c(var2, var3)
+                  , timevar = spe
+                  , direction = "wide")
+    tab[is.na(tab)] <- 0 ###### remplace les na par des 0 / replace NAs by 0
+
+    colnames(tab) <- sub(var, "", colnames(tab))### remplace le premier pattern "abond." par le second "" / replace the column names "abond." by ""
+    return(tab)
+}
+data_num <- make_table_analyse(data, colvar, colspe, colloc, coltime)
+nb_spe <- length(unique(data[, spe]))
+nb_col <- ncol(data_num) - nb_spe + 1
+data_num <- data_num[, nb_col:ncol(data_num)]
+
+#Presence of zeros in the data
+mat_corr <- function(data) {
+  cor(data)
+}
+p_mat <- function(data) {
+  ggcorrplot::cor_pmat(data)
+} # compute a matrix of correlation p-values
+
+graph_corr <- function(data_num) {
+  graph <- ggcorrplot::ggcorrplot(mat_corr(data_num), method = "circle", p.mat = p_mat(data_num), #barring the no significant coefficient
+  ggtheme = ggplot2::theme_gray, colors = c("#00AFBB", "#E7B800", "#FC4E07"))
+
+  ggplot2::ggsave("0_pb.png", graph)
+}
+
+##Med and disp
+med <- graph_median(data, var = colvar)
+disp <- dispersion(data, var = colvar, var2 = colspe)
+med_disp(med = med, disp = disp)
+
+##O problem
+graph_corr(data_num)
b
diff -r 000000000000 -r e5552099d0e3 macro.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macro.xml Tue Jul 27 16:57:02 2021 +0000
[
@@ -0,0 +1,65 @@
+<macros>
+    <token name="@VERSION@">0.0.0</token>
+    <xml name="Explo_requirements">
+        <requirements>
+           <requirement type="package" version="3.3.3">r-ggplot2</requirement>
+           <yield />
+        </requirements>
+    </xml>
+    <xml name="explo_input">
+       <param name="input" type="data" format="tabular" label="Input table"/>
+       <param name="colnames" type="boolean" label="First line is a header line" checked="true"/>
+    </xml>
+    <xml name="explo_filter_colli">
+        <filter> method['type'] == 'collinearity'</filter>
+    </xml>
+    <xml name="explo_filter_pca">
+        <filter> method['type'] == 'pca'</filter>
+    </xml>
+    <xml name="explo_filter_vif">
+        <filter> method['type'] == 'vif'</filter>
+    </xml>
+    <xml name="explo_filter_interr">
+        <filter> method['type'] == 'interr'</filter>
+    </xml>
+    <xml name="explo_filter_autocorr">
+        <filter> method['type'] == 'autocorr'</filter>
+    </xml>
+    <xml name="explo_filter_abund">
+        <filter> method['type'] == 'abund'</filter>
+    </xml>
+    <xml name="explo_filter_pres_abs">
+        <filter> method['type'] == 'pres_abs'</filter>
+    </xml>
+    <xml name="explo_filter_rare">
+        <filter> method['type'] == 'rare'</filter>
+    </xml>
+    <xml name="explo_bibref">
+       <citations>
+            <citation type="bibtex">
+            @unpublished{
+            title={ A protocol for data exploration to avoid common statistical problems },
+            authors={Alain F. Zuur,  Elena N. Ieno,  Chris S. Elphick},
+            url={https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/j.2041-210X.2009.00001.x}
+            }
+            </citation>
+        </citations>
+    </xml>
+    <xml name="book_bibref">
+        <citations>
+            <citation type="bibtex">
+            @unpublished{
+            title={ Numerical Ecology with R },
+            author={Daniel Borcard, François Gillet, Pierre Legendre},
+            }
+            </citation>
+        </citations>
+    </xml>
+    <xml name="topic">
+        <edam_topics>
+           <edam_topic>topic_0610</edam_topic>
+           <edam_topic>topic_3050</edam_topic>
+        </edam_topics>
+    </xml>
+</macros>
+
b
diff -r 000000000000 -r e5552099d0e3 stat_presence_abs.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stat_presence_abs.xml Tue Jul 27 16:57:02 2021 +0000
[
@@ -0,0 +1,88 @@
+<tool id="ecology_stat_presence_abs" name="Statistics on presence-absence" version="@VERSION@" profile = "20.01">
+    <description>of a numeric variable</description>
+    <macros>
+        <import>macro.xml</import>
+    </macros>
+    <expand macro="Explo_requirements">
+        <requirement type="package" version="1.1.1">r-cowplot</requirement>
+        <requirement type="package" version="0.1.3">r-ggcorrplot</requirement>
+        <requirement type="package" version="1.0.5">r-dplyr</requirement>
+    </expand>
+    <command detect_errors="exit_code"><![CDATA[
+        Rscript
+            '$__tool_directory__/graph_stat_presence_abs.r'
+            '$input'
+            '$colnames'
+            '$variable1'
+            '$species'
+            '$location'
+            '$time'
+            '$output_md'
+        ]]>
+    </command>
+    <inputs>
+        <expand macro="explo_input"/>
+        <param name="variable1" label="Select a column containing numerical values (such as the abundance) " type="data_column" data_ref="input" numerical="true" use_header_names="true"/>
+         <param name="species" label="Select the column of the x-axis : most commonly species" type="data_column" data_ref="input" use_header_names="true" help= "Variable for dispersion plot and to see the correlation between zeros"/>
+        <param name="location" label="Select column containing locations " type="data_column" data_ref="input" use_header_names="true"/>
+        <param name="time" label="Select column containing temporal data (year, date, ...) " type="data_column" data_ref="input" use_header_names="true"/>
+    </inputs>
+    <outputs>
+        <data name="output_md" from_work_dir="Med_Disp.png" format="png" label="Boxplot and dispersion plot"/>
+        <data name="output_0" from_work_dir="0_pb.png" format="png" label="Absence-correlation plot"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="Reel_life_survey_fish_modif.tabular"/>
+            <param name="colnames" value="true"/>
+            <param name="variable1" value="18"/>
+            <param name="variable2" value="15"/>
+            <output name="output_md" ftype="png">
+                <assert_contents>
+                    <has_text text="PNG"/>
+                </assert_contents>
+            </output>
+            <output name="output_0" ftype="png">
+                <assert_contents>
+                    <has_text text="PNG"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <expand macro="topic"/>
+    <help><![CDATA[
+===================================================================================================================
+Create a boxplot, visualize the dispersion of a numeric variable and visualize correlation between species absences
+===================================================================================================================
+
+
+**What it does**
+
+
+This tool creates:
+
+- A boxplot of a numerical value (like the abundance) and a dispersion plot of this value according to a variable such as species.
+
+- A correlation plot using the presence of zeros in the numerical value. Handy to see if there is a correlation between the absence of two species and suggest a co-dependency.
+
+Don't use datasets with too much species, it won't be readable.
+
+**Input description**
+
+A tabular file with observation data. Must at least contain four columns a numerical value (ex: abundance), a temporal referential (year, date, ...), locations and species.
+
++-------------+------------+---------------+-------------+
+|   number    |    time    | species.code  |   location  |
++=============+============+===============+=============+
+|      2      |    date    |   speciesID   |     site    |
++-------------+------------+---------------+-------------+
+|     ...     |     ...    |      ...      |     ...     |
++-------------+------------+---------------+-------------+
+
+**Output**
+
+Two png files containing the three plots.
+    ]]>    </help>
+    <expand macro="explo_bibref"/>
+
+</tool>
b
diff -r 000000000000 -r e5552099d0e3 test-data/Data.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Data.tabular Tue Jul 27 16:57:02 2021 +0000
b
@@ -0,0 +1,2 @@
+"x"
+"1" 29
b
diff -r 000000000000 -r e5552099d0e3 test-data/Missing_species.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Missing_species.txt Tue Jul 27 16:57:02 2021 +0000
b
@@ -0,0 +1,6 @@
+
+There is not enough data on these species they appear too few times in the tabular-file
+
+Scorpaenidae
+Plesiopidae
+Serranidae
b
diff -r 000000000000 -r e5552099d0e3 test-data/Reel_life_survey_fish_modif.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Reel_life_survey_fish_modif.tabular Tue Jul 27 16:57:02 2021 +0000
[
b'@@ -0,0 +1,290 @@\n+FID\tKey\tSurveyID\tCountry\tEcoregion\tRealm\tSiteCode\tSite\tSiteLat\tSiteLong\tSurveyDate\tDepth\tPhylum\tClass\tFamily\tTaxon\tBlock\tTotal\tDiver\tgeom\n+M2_FISH_DATA.1\t1\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tBlenniidae\tEcsenius mandibularis\t2\t2\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.2\t2\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tBlenniidae\tEcsenius stictus\t1\t5\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.3\t3\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tBlenniidae\tEcsenius stictus\t2\t8\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.4\t4\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tGobiidae\tEviota guttata\t1\t6\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.5\t5\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tGobiidae\tEviota guttata\t2\t9\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.6\t6\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tGobiidae\tEviota hoesei\t1\t3\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.7\t7\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tGobiidae\tEviota hoesei\t2\t19\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.8\t8\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tGobiidae\tGobiodon histrio\t1\t1\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.9\t9\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tGobiidae\tGobiodon histrio\t2\t3\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.10\t10\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tGobiidae\tGobiodon sp. [3 GA]\t1\t12\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.11\t11\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tGobiidae\tGobiodon spp.\t2\t5\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.12\t12\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tScorpaenidae\tParascorpaena aurita\t2\t1\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.13\t13\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tTripterygiidae\tUcla xenogrammus\t1\t1\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.14\t14\t912347736\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6\tChordata\tActinopterygii\tTripterygiidae\tUcla xenogrammus\t2\t1\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.15\t15\t912347737\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T13:00:00Z\t6.1\tChordata\tActinopterygii\tPlesiopidae\tAssessor macneilli\t2\t20\tLVS\tPOINT (151.92 -23.18)\n+M2_FISH_DATA.16\t16\t912347737\tAustralia\tCentral and Southern Great Barrier Reef\tCentral Indo-Pacific\tAIMS12\tNorth Island Site 3\t-23.18\t151.92\t2017-02-13T1'..b'te Northern Atlantic\tAND8\tAlmeria puerto\t36.83\t-2.46\t2013-11-27T13:00:00Z\t1.8\tChordata\tActinopterygii\tBlenniidae\tParablennius pilicornis\t2\t5\tJASF\tPOINT (-2.46 36.83)\n+M2_FISH_DATA.272\t272\t912349134\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND8\tAlmeria puerto\t36.83\t-2.46\t2013-11-27T13:00:00Z\t1.8\tChordata\tActinopterygii\tScorpaenidae\tScorpaena porcus\t1\t1\tJASF\tPOINT (-2.46 36.83)\n+M2_FISH_DATA.273\t273\t912349134\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND8\tAlmeria puerto\t36.83\t-2.46\t2013-11-27T13:00:00Z\t1.8\tChordata\tActinopterygii\tScorpaenidae\tScorpaena porcus\t2\t1\tJASF\tPOINT (-2.46 36.83)\n+M2_FISH_DATA.274\t274\t912344582\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2014-07-14T14:00:00Z\t3\tChordata\tActinopterygii\tGobiidae\tGobius bucchichi\t1\t27\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.275\t275\t912344582\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2014-07-14T14:00:00Z\t3\tChordata\tActinopterygii\tGobiidae\tGobius bucchichi\t2\t27\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.276\t276\t912344582\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2014-07-14T14:00:00Z\t3\tChordata\tActinopterygii\tGobiesocidae\tLepadogaster candolii\t1\t1\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.277\t277\t912344582\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2014-07-14T14:00:00Z\t3\tChordata\tActinopterygii\tBlenniidae\tParablennius pilicornis\t1\t6\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.278\t278\t912344582\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2014-07-14T14:00:00Z\t3\tChordata\tActinopterygii\tBlenniidae\tParablennius pilicornis\t2\t14\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.279\t279\t912344582\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2014-07-14T14:00:00Z\t3\tChordata\tActinopterygii\tScorpaenidae\tScorpaena porcus\t1\t1\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.280\t280\t912344582\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2014-07-14T14:00:00Z\t3\tChordata\tActinopterygii\tTripterygiidae\tTripterygion delaisi\t1\t1\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.281\t281\t912349135\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2013-11-27T13:00:00Z\t2.4\tChordata\tActinopterygii\tGobiidae\tGobius bucchichi\t1\t3\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.282\t282\t912349135\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2013-11-27T13:00:00Z\t2.4\tChordata\tActinopterygii\tGobiidae\tGobius bucchichi\t2\t2\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.283\t283\t912349135\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2013-11-27T13:00:00Z\t2.4\tChordata\tActinopterygii\tBlenniidae\tParablennius pilicornis\t1\t4\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.284\t284\t912349135\tSpain\tAlboran Sea\tTemperate Northern Atlantic\tAND9\tCamping\t36.82\t-2.51\t2013-11-27T13:00:00Z\t2.4\tChordata\tActinopterygii\tBlenniidae\tParablennius pilicornis\t2\t6\tJASF\tPOINT (-2.51 36.82)\n+M2_FISH_DATA.285\t285\t912345928\tAntarctica\tAntarctic Peninsula\tSouthern Ocean\tANT4\tEnd Runway\t-67.57\t-68.13\t2016-01-05T13:00:00Z\t9\tChordata\tActinopterygii\tNototheniidae\tTrematomus hansoni\t1\t1\tSM\tPOINT (-68.13 -67.57)\n+M2_FISH_DATA.286\t286\t912346517\tAntarctica\tAntarctic Peninsula\tSouthern Ocean\tANT5\tWharf\t-67.57\t-68.13\t2016-01-06T13:00:00Z\t9\tChordata\tActinopterygii\tNototheniidae\tNotothenia coriiceps\t2\t1\tSM\tPOINT (-68.13 -67.57)\n+M2_FISH_DATA.287\t287\t912346517\tAntarctica\tAntarctic Peninsula\tSouthern Ocean\tANT5\tWharf\t-67.57\t-68.13\t2016-01-06T13:00:00Z\t9\tChordata\tActinopterygii\tNototheniidae\tTrematomus newnesi\t1\t1\tSM\tPOINT (-68.13 -67.57)\n+M2_FISH_DATA.288\t288\t912346518\tAntarctica\tAntarctic Peninsula\tSouthern Ocean\tANT7\tTrovall\t-67.6\t-68.21\t2016-02-11T13:00:00Z\t12\tChordata\tActinopterygii\tHarpagiferidae\tHarpagifer antarcticus\t1\t1\tSM\tPOINT (-68.21 -67.6)\n+M2_FISH_DATA.289\t289\t912346518\tAntarctica\tAntarctic Peninsula\tSouthern Ocean\tANT7\tTrovall\t-67.6\t-68.21\t2016-02-11T13:00:00Z\t12\tChordata\tActinopterygii\tNototheniidae\tNototheniid spp.\t2\t1\tSM\tPOINT (-68.21 -67.6)\n'
b
diff -r 000000000000 -r e5552099d0e3 test-data/Reel_life_survey_fish_modif2.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Reel_life_survey_fish_modif2.tabular Tue Jul 27 16:57:02 2021 +0000
[
@@ -0,0 +1,30 @@
+FID Key SurveyID Country Ecoregion Realm SiteCode Site SiteLat SiteLong SurveyDate Depth Phylum Class Family Taxon Block Total Diver geom
+M2_FISH_DATA.1 1 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Blenniidae Ecsenius mandibularis 2 2 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.2 2 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Blenniidae Ecsenius stictus 1 5 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.3 3 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Blenniidae Ecsenius stictus 2 8 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.4 4 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Gobiidae Eviota guttata 1 6 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.5 5 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Gobiidae Eviota guttata 2 9 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.6 6 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Gobiidae Eviota hoesei 1 3 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.7 7 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Gobiidae Eviota hoesei 2 19 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.8 8 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Gobiidae Gobiodon histrio 1 1 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.9 9 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Gobiidae Gobiodon histrio 2 3 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.10 10 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Gobiidae Gobiodon sp. [3 GA] 1 12 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.11 11 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Gobiidae Gobiodon spp. 2 5 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.12 12 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Scorpaenidae Parascorpaena aurita 2 1 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.13 13 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Tripterygiidae Ucla xenogrammus 1 1 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.14 14 912347736 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6 Chordata Actinopterygii Tripterygiidae Ucla xenogrammus 2 1 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.15 15 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Plesiopidae Assessor macneilli 2 20 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.16 16 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Blenniidae Ecsenius bicolor 1 4 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.17 17 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Blenniidae Ecsenius bicolor 2 1 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.18 18 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Blenniidae Ecsenius mandibularis 1 5 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.19 19 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Blenniidae Ecsenius mandibularis 2 6 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.20 20 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Blenniidae Ecsenius stictus 1 1 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.21 21 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Blenniidae Ecsenius stictus 2 3 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.22 22 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Tripterygiidae Enneapterygius similis 1 3 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.23 23 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Serranidae Epinephelus fasciatus 2 1 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.24 24 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Gobiidae Eviota guttata 1 6 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.25 25 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Gobiidae Eviota guttata 2 8 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.26 26 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Gobiidae Eviota hoesei 1 7 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.27 27 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Gobiidae Eviota hoesei 2 12 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.28 28 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Gobiidae Gobiodon sp. [3 GA] 2 16 LVS POINT (151.92 -23.18)
+M2_FISH_DATA.29 29 912347737 Australia Central and Southern Great Barrier Reef Central Indo-Pacific AIMS12 North Island Site 3 -23.18 151.92 2017-02-13T13:00:00Z 6.1 Chordata Actinopterygii Gobiidae Gobiodon spp. 2 7 LVS POINT (151.92 -23.18)
b
diff -r 000000000000 -r e5552099d0e3 test-data/data_frenchbbs.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/data_frenchbbs.tabular Tue Jul 27 16:57:02 2021 +0000
b
b'@@ -0,0 +1,851 @@\n+"carre"\t"annee"\t"espece"\t"abond"\r\n+"440072"\t2014\t"ALAARV"\t4\r\n+"440072"\t2014\t"PARCAE"\t5\r\n+"440168"\t2014\t"ALAARV"\t1\r\n+"440168"\t2014\t"PARCAE"\t10\r\n+"440168"\t2017\t"ALAARV"\t2\r\n+"440168"\t2017\t"PARCAE"\t12\r\n+"440168"\t2018\t"ALAARV"\t2\r\n+"440168"\t2018\t"PARCAE"\t20\r\n+"440211"\t2014\t"ALAARV"\t10\r\n+"440211"\t2014\t"PARCAE"\t5\r\n+"440211"\t2015\t"ALAARV"\t11\r\n+"440211"\t2015\t"PARCAE"\t6\r\n+"440211"\t2016\t"ALAARV"\t11\r\n+"440211"\t2016\t"PARCAE"\t2\r\n+"440211"\t2017\t"ALAARV"\t9\r\n+"440211"\t2017\t"PARCAE"\t2\r\n+"440211"\t2018\t"ALAARV"\t10\r\n+"440211"\t2018\t"PARCAE"\t8\r\n+"440235"\t2005\t"ALAARV"\t3\r\n+"440235"\t2005\t"PARCAE"\t15\r\n+"440235"\t2006\t"ALAARV"\t6\r\n+"440235"\t2006\t"PARCAE"\t12\r\n+"440235"\t2007\t"ALAARV"\t1\r\n+"440235"\t2007\t"PARCAE"\t10\r\n+"440235"\t2008\t"ALAARV"\t1\r\n+"440235"\t2008\t"PARCAE"\t12\r\n+"440235"\t2009\t"ALAARV"\t0\r\n+"440235"\t2009\t"PARCAE"\t13\r\n+"440278"\t2008\t"ALAARV"\t7\r\n+"440278"\t2008\t"PARCAE"\t7\r\n+"440278"\t2009\t"ALAARV"\t8\r\n+"440278"\t2009\t"PARCAE"\t14\r\n+"440278"\t2010\t"ALAARV"\t7\r\n+"440278"\t2010\t"PARCAE"\t5\r\n+"440278"\t2011\t"ALAARV"\t8\r\n+"440278"\t2011\t"PARCAE"\t7\r\n+"440278"\t2012\t"ALAARV"\t7\r\n+"440278"\t2012\t"PARCAE"\t8\r\n+"440278"\t2013\t"ALAARV"\t10\r\n+"440278"\t2013\t"PARCAE"\t8\r\n+"440278"\t2014\t"ALAARV"\t6\r\n+"440278"\t2014\t"PARCAE"\t7\r\n+"440278"\t2015\t"ALAARV"\t7\r\n+"440278"\t2015\t"PARCAE"\t7\r\n+"440278"\t2016\t"ALAARV"\t7\r\n+"440278"\t2016\t"PARCAE"\t7\r\n+"440278"\t2017\t"ALAARV"\t6\r\n+"440278"\t2017\t"PARCAE"\t2\r\n+"440278"\t2018\t"ALAARV"\t7\r\n+"440278"\t2018\t"PARCAE"\t7\r\n+"440310"\t2011\t"ALAARV"\t12\r\n+"440310"\t2011\t"PARCAE"\t5\r\n+"440310"\t2012\t"ALAARV"\t15\r\n+"440310"\t2012\t"PARCAE"\t13\r\n+"440310"\t2013\t"ALAARV"\t26\r\n+"440310"\t2013\t"PARCAE"\t12\r\n+"440310"\t2014\t"ALAARV"\t14\r\n+"440310"\t2014\t"PARCAE"\t8\r\n+"440310"\t2015\t"ALAARV"\t11\r\n+"440310"\t2015\t"PARCAE"\t8\r\n+"440310"\t2016\t"ALAARV"\t14\r\n+"440310"\t2016\t"PARCAE"\t10\r\n+"440310"\t2017\t"ALAARV"\t13\r\n+"440310"\t2017\t"PARCAE"\t12\r\n+"440310"\t2018\t"ALAARV"\t12\r\n+"440310"\t2018\t"PARCAE"\t11\r\n+"440398"\t2012\t"ALAARV"\t2\r\n+"440398"\t2012\t"PARCAE"\t2\r\n+"440398"\t2013\t"ALAARV"\t2\r\n+"440398"\t2013\t"PARCAE"\t2\r\n+"440398"\t2014\t"ALAARV"\t4\r\n+"440398"\t2014\t"PARCAE"\t6\r\n+"440411"\t2004\t"ALAARV"\t16\r\n+"440411"\t2004\t"PARCAE"\t5\r\n+"440411"\t2005\t"ALAARV"\t14\r\n+"440411"\t2005\t"PARCAE"\t8\r\n+"440411"\t2006\t"ALAARV"\t18\r\n+"440411"\t2006\t"PARCAE"\t10\r\n+"440411"\t2007\t"ALAARV"\t15\r\n+"440411"\t2007\t"PARCAE"\t7\r\n+"440411"\t2008\t"ALAARV"\t12\r\n+"440411"\t2008\t"PARCAE"\t9\r\n+"440411"\t2009\t"ALAARV"\t11\r\n+"440411"\t2009\t"PARCAE"\t5\r\n+"440411"\t2010\t"ALAARV"\t11\r\n+"440411"\t2010\t"PARCAE"\t2\r\n+"440411"\t2011\t"ALAARV"\t16\r\n+"440411"\t2011\t"PARCAE"\t5\r\n+"440411"\t2012\t"ALAARV"\t18\r\n+"440411"\t2012\t"PARCAE"\t2\r\n+"440411"\t2013\t"ALAARV"\t14\r\n+"440411"\t2013\t"PARCAE"\t11\r\n+"440411"\t2014\t"ALAARV"\t15\r\n+"440411"\t2014\t"PARCAE"\t9\r\n+"440411"\t2015\t"ALAARV"\t16\r\n+"440411"\t2015\t"PARCAE"\t3\r\n+"440411"\t2016\t"ALAARV"\t9\r\n+"440411"\t2016\t"PARCAE"\t3\r\n+"440411"\t2017\t"ALAARV"\t14\r\n+"440411"\t2017\t"PARCAE"\t13\r\n+"440411"\t2018\t"ALAARV"\t12\r\n+"440411"\t2018\t"PARCAE"\t6\r\n+"440430"\t2006\t"ALAARV"\t0\r\n+"440430"\t2006\t"PARCAE"\t5\r\n+"440430"\t2007\t"ALAARV"\t0\r\n+"440430"\t2007\t"PARCAE"\t4\r\n+"440430"\t2008\t"ALAARV"\t0\r\n+"440430"\t2008\t"PARCAE"\t7\r\n+"440430"\t2010\t"ALAARV"\t0\r\n+"440430"\t2010\t"PARCAE"\t3\r\n+"440430"\t2012\t"ALAARV"\t0\r\n+"440430"\t2012\t"PARCAE"\t2\r\n+"440430"\t2014\t"ALAARV"\t0\r\n+"440430"\t2014\t"PARCAE"\t3\r\n+"440456"\t2001\t"ALAARV"\t3\r\n+"440456"\t2001\t"PARCAE"\t10\r\n+"440456"\t2002\t"ALAARV"\t4\r\n+"440456"\t2002\t"PARCAE"\t11\r\n+"440456"\t2003\t"ALAARV"\t4\r\n+"440456"\t2003\t"PARCAE"\t14\r\n+"440456"\t2004\t"ALAARV"\t6\r\n+"440456"\t2004\t"PARCAE"\t16\r\n+"440456"\t2005\t"ALAARV"\t6\r\n+"440456"\t2005\t"PARCAE"\t13\r\n+"440456"\t2006\t"ALAARV"\t4\r\n+"440456"\t2006\t"PARCAE"\t9\r\n+"440456"\t2007\t"ALAARV"\t5\r\n+"440456"\t2007\t"PARCAE"\t11\r\n+"440456"\t2008\t"ALAARV"\t2\r\n+"440456"\t2008\t"PARCAE"\t8\r\n+"440456"\t2009\t"ALAARV"\t4\r\n+"440456"\t2009\t"PARCAE"\t10\r\n+"440456"\t2010\t"ALAARV"\t2\r\n+"440456"\t2010\t"PARCAE"\t15\r\n+"440456"\t2011\t"ALAARV"\t4\r\n+"440456"\t2011\t"PARCAE"\t14\r\n+"440456"\t2012\t"ALAARV"\t0\r\n+"440456"\t2012\t"PARCAE"\t11\r\n+"440456"\t2014\t"ALAARV"\t2\r\n+"440456"\t2014\t"PARCAE"\t12\r\n+"440462"\t2001\t"ALAARV"\t3\r\n+"440462"\t2001\t"PARCAE"\t3\r\n+"440462"\t2002\t"ALAARV"\t6\r\n+"440462"\t2002\t"PARCAE"\t5\r\n+"4'..b'07\t"PARCAE"\t6\r\n+"441242"\t2008\t"ALAARV"\t0\r\n+"441242"\t2008\t"PARCAE"\t8\r\n+"441242"\t2009\t"ALAARV"\t0\r\n+"441242"\t2009\t"PARCAE"\t7\r\n+"441242"\t2010\t"ALAARV"\t0\r\n+"441242"\t2010\t"PARCAE"\t3\r\n+"441242"\t2011\t"ALAARV"\t0\r\n+"441242"\t2011\t"PARCAE"\t6\r\n+"441242"\t2012\t"ALAARV"\t0\r\n+"441242"\t2012\t"PARCAE"\t9\r\n+"441242"\t2013\t"ALAARV"\t0\r\n+"441242"\t2013\t"PARCAE"\t9\r\n+"441242"\t2014\t"ALAARV"\t0\r\n+"441242"\t2014\t"PARCAE"\t10\r\n+"441242"\t2015\t"ALAARV"\t0\r\n+"441242"\t2015\t"PARCAE"\t9\r\n+"441242"\t2016\t"ALAARV"\t0\r\n+"441242"\t2016\t"PARCAE"\t5\r\n+"441242"\t2017\t"ALAARV"\t0\r\n+"441242"\t2017\t"PARCAE"\t5\r\n+"441242"\t2018\t"ALAARV"\t0\r\n+"441242"\t2018\t"PARCAE"\t4\r\n+"441259"\t2018\t"ALAARV"\t2\r\n+"441259"\t2018\t"PARCAE"\t14\r\n+"441265"\t2004\t"ALAARV"\t2\r\n+"441265"\t2004\t"PARCAE"\t6\r\n+"441265"\t2005\t"ALAARV"\t2\r\n+"441265"\t2005\t"PARCAE"\t3\r\n+"441265"\t2006\t"ALAARV"\t2\r\n+"441265"\t2006\t"PARCAE"\t0\r\n+"441265"\t2007\t"ALAARV"\t0\r\n+"441265"\t2007\t"PARCAE"\t4\r\n+"441265"\t2008\t"ALAARV"\t1\r\n+"441265"\t2008\t"PARCAE"\t7\r\n+"441265"\t2009\t"ALAARV"\t1\r\n+"441265"\t2009\t"PARCAE"\t4\r\n+"441265"\t2010\t"ALAARV"\t1\r\n+"441265"\t2010\t"PARCAE"\t2\r\n+"441265"\t2011\t"ALAARV"\t2\r\n+"441265"\t2011\t"PARCAE"\t13\r\n+"441265"\t2012\t"ALAARV"\t0\r\n+"441265"\t2012\t"PARCAE"\t5\r\n+"441265"\t2013\t"ALAARV"\t1\r\n+"441265"\t2013\t"PARCAE"\t4\r\n+"441307"\t2016\t"ALAARV"\t2\r\n+"441307"\t2016\t"PARCAE"\t10\r\n+"441307"\t2017\t"ALAARV"\t2\r\n+"441307"\t2017\t"PARCAE"\t3\r\n+"441307"\t2018\t"ALAARV"\t1\r\n+"441307"\t2018\t"PARCAE"\t6\r\n+"441311"\t2015\t"ALAARV"\t0\r\n+"441311"\t2015\t"PARCAE"\t12\r\n+"441311"\t2016\t"ALAARV"\t0\r\n+"441311"\t2016\t"PARCAE"\t6\r\n+"441311"\t2017\t"ALAARV"\t0\r\n+"441311"\t2017\t"PARCAE"\t6\r\n+"441311"\t2018\t"ALAARV"\t0\r\n+"441311"\t2018\t"PARCAE"\t15\r\n+"441340"\t2004\t"ALAARV"\t0\r\n+"441340"\t2004\t"PARCAE"\t10\r\n+"441340"\t2005\t"ALAARV"\t0\r\n+"441340"\t2005\t"PARCAE"\t10\r\n+"441340"\t2006\t"ALAARV"\t0\r\n+"441340"\t2006\t"PARCAE"\t8\r\n+"441340"\t2007\t"ALAARV"\t0\r\n+"441340"\t2007\t"PARCAE"\t7\r\n+"441340"\t2008\t"ALAARV"\t0\r\n+"441340"\t2008\t"PARCAE"\t6\r\n+"441340"\t2009\t"ALAARV"\t0\r\n+"441340"\t2009\t"PARCAE"\t7\r\n+"441340"\t2010\t"ALAARV"\t0\r\n+"441340"\t2010\t"PARCAE"\t2\r\n+"441340"\t2011\t"ALAARV"\t0\r\n+"441340"\t2011\t"PARCAE"\t6\r\n+"441340"\t2012\t"ALAARV"\t0\r\n+"441340"\t2012\t"PARCAE"\t6\r\n+"441340"\t2013\t"ALAARV"\t0\r\n+"441340"\t2013\t"PARCAE"\t7\r\n+"441340"\t2014\t"ALAARV"\t0\r\n+"441340"\t2014\t"PARCAE"\t6\r\n+"441340"\t2015\t"ALAARV"\t0\r\n+"441340"\t2015\t"PARCAE"\t5\r\n+"441376"\t2014\t"ALAARV"\t0\r\n+"441376"\t2014\t"PARCAE"\t15\r\n+"441376"\t2015\t"ALAARV"\t0\r\n+"441376"\t2015\t"PARCAE"\t10\r\n+"441376"\t2016\t"ALAARV"\t0\r\n+"441376"\t2016\t"PARCAE"\t7\r\n+"441376"\t2017\t"ALAARV"\t0\r\n+"441376"\t2017\t"PARCAE"\t13\r\n+"441376"\t2018\t"ALAARV"\t0\r\n+"441376"\t2018\t"PARCAE"\t18\r\n+"441558"\t2001\t"ALAARV"\t2\r\n+"441558"\t2001\t"PARCAE"\t6\r\n+"441558"\t2002\t"ALAARV"\t1\r\n+"441558"\t2002\t"PARCAE"\t0\r\n+"441558"\t2003\t"ALAARV"\t1\r\n+"441558"\t2003\t"PARCAE"\t0\r\n+"441558"\t2004\t"ALAARV"\t2\r\n+"441558"\t2004\t"PARCAE"\t3\r\n+"441558"\t2005\t"ALAARV"\t1\r\n+"441558"\t2005\t"PARCAE"\t1\r\n+"441558"\t2006\t"ALAARV"\t1\r\n+"441558"\t2006\t"PARCAE"\t3\r\n+"441558"\t2007\t"ALAARV"\t2\r\n+"441558"\t2007\t"PARCAE"\t4\r\n+"441558"\t2008\t"ALAARV"\t1\r\n+"441558"\t2008\t"PARCAE"\t4\r\n+"441558"\t2009\t"ALAARV"\t1\r\n+"441558"\t2009\t"PARCAE"\t5\r\n+"441558"\t2011\t"ALAARV"\t1\r\n+"441558"\t2011\t"PARCAE"\t0\r\n+"441558"\t2012\t"ALAARV"\t0\r\n+"441558"\t2012\t"PARCAE"\t1\r\n+"441594"\t2004\t"ALAARV"\t12\r\n+"441594"\t2004\t"PARCAE"\t3\r\n+"441594"\t2005\t"ALAARV"\t9\r\n+"441594"\t2005\t"PARCAE"\t3\r\n+"441594"\t2006\t"ALAARV"\t10\r\n+"441594"\t2006\t"PARCAE"\t1\r\n+"441594"\t2007\t"ALAARV"\t5\r\n+"441594"\t2007\t"PARCAE"\t3\r\n+"441594"\t2008\t"ALAARV"\t6\r\n+"441594"\t2008\t"PARCAE"\t6\r\n+"441594"\t2009\t"ALAARV"\t1\r\n+"441594"\t2009\t"PARCAE"\t5\r\n+"441640"\t2012\t"ALAARV"\t12\r\n+"441640"\t2012\t"PARCAE"\t4\r\n+"441680"\t2012\t"ALAARV"\t2\r\n+"441680"\t2012\t"PARCAE"\t4\r\n+"441680"\t2013\t"ALAARV"\t1\r\n+"441680"\t2013\t"PARCAE"\t7\r\n+"441680"\t2014\t"ALAARV"\t0\r\n+"441680"\t2014\t"PARCAE"\t7\r\n+"441680"\t2015\t"ALAARV"\t1\r\n+"441680"\t2015\t"PARCAE"\t5\r\n+"441680"\t2016\t"ALAARV"\t0\r\n+"441680"\t2016\t"PARCAE"\t2\r\n+"441680"\t2017\t"ALAARV"\t0\r\n+"441680"\t2017\t"PARCAE"\t5\r\n+"441680"\t2018\t"ALAARV"\t0\r\n+"441680"\t2018\t"PARCAE"\t7\r\n+"Ile de"\t2018\t"ALAARV"\t3\r\n+"Ile de"\t2018\t"PARCAE"\t7\r\n+"Le Mas"\t2018\t"ALAARV"\t0\r\n+"Le Mas"\t2018\t"PARCAE"\t7\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r e5552099d0e3 test-data/levene.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/levene.txt Tue Jul 27 16:57:02 2021 +0000
b
@@ -0,0 +1,8 @@
+
+write table with levene test. 
+--> "Levene's Test for Homogeneity of Variance (center = median)"
+       Df F value    Pr(>F)    "
+group   1   22.02 3.145e-06 ***"
+      848                      "
+---"
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"
b
diff -r 000000000000 -r e5552099d0e3 test-data/species.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/species.txt Tue Jul 27 16:57:02 2021 +0000
b
@@ -0,0 +1,6 @@
+Blenniidae
+Gobiidae
+Scorpaenidae
+Tripterygiidae
+Plesiopidae
+Serranidae
b
diff -r 000000000000 -r e5552099d0e3 test-data/test_bbs2.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_bbs2.txt Tue Jul 27 16:57:02 2021 +0000
b
@@ -0,0 +1,8 @@
+
+write table with levene test. 
+--> "Levene's Test for Homogeneity of Variance (center = median)"
+       Df F value    Pr(>F)    "
+group   1   22.02 3.145e-06 ***"
+      848                      "
+---"
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"
b
diff -r 000000000000 -r e5552099d0e3 test-data/test_fish2.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_fish2.tabular Tue Jul 27 16:57:02 2021 +0000
b
@@ -0,0 +1,2 @@
+"x"
+"1" 6
b
diff -r 000000000000 -r e5552099d0e3 test-data/test_value_fish2.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_value_fish2.txt Tue Jul 27 16:57:02 2021 +0000
b
@@ -0,0 +1,10 @@
+
+write table with eigenvalue. 
+--> "        eigenvalue variance.percent cumulative.variance.percent"
+Dim.1 2.849961e+00     5.699922e+01                    56.99922"
+Dim.2 1.229238e+00     2.458475e+01                    81.58397"
+Dim.3 7.482796e-01     1.496559e+01                    96.54956"
+Dim.4 1.725220e-01     3.450440e+00                   100.00000"
+Dim.5 1.948918e-14     3.897836e-13                   100.00000"
+Dim.6 9.545002e-34     1.909000e-32                   100.00000"
+Dim.7 2.137718e-35     4.275436e-34                   100.00000"