changeset 0:2e45ae3b297a draft

"planemo upload for repository https://github.com/Alanamosse/Galaxy-E/tree/stoctool/tools/stoc commit f82f897ab22464de40c878e17616333855814e25"
author ecology
date Thu, 02 Apr 2020 03:34:37 -0400
parents
children fd0687e91bf6
files ExeFilteringRareLowabundSPGalaxy.r FunctTrendSTOCGalaxy.r filteringSp.xml stoceps_macros.xml test-data/Datafilteredfortrendanalysis.tabular test-data/Datatransformedforfiltering_trendanalysis.tabular
diffstat 6 files changed, 2247 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ExeFilteringRareLowabundSPGalaxy.r	Thu Apr 02 03:34:37 2020 -0400
@@ -0,0 +1,50 @@
+#!/usr/bin/env Rscript
+
+#####################################################################################################################
+############## FILTERING RARE AND LOW-ABUNDANCE SPECIES   function:filtreEspeceRare    ##############################
+#####################################################################################################################
+
+#### Based on Romain Lorrillière R script
+#### Modified by Alan Amosse and Benjamin Yguel for integrating within Galaxy-E
+
+
+suppressMessages(library(reshape2))
+
+
+###########
+#delcaration des arguments et variables/ declaring some variables and load arguments
+
+args = commandArgs(trailingOnly=TRUE)
+
+if (length(args)==0) {
+    stop("At least one argument must be supplied, dataset transformed by make table function (.tabular).", call.=FALSE) #si pas d'arguments -> affiche erreur et quitte / if no args -> error and exit1
+} else {
+    Datatransformedforfiltering_trendanalysis<-args[1] ###### Nom du fichier peut provenir de la fonction "MakeTableAnalyse" / file name , may result from the function "MakeTableAnalys"    
+    source(args[2])### chargement des fonctions / load the functions
+}
+
+##### Le tableau de données doit posséder 3 variables en colonne minimum avec 1 seule espèce et autant de colonne en plus que d'espèces en plus: les carrés ou sont réalisés les observatiosn ("carre"), la ou les années des observations ("annee"), 1 colonne par espèce renseignée avec les abondances correspondantes
+##### Data must be a dataframe with 3 variables in column: plots where observation where made ("carre"), year(s) of the different sampling ("annee"), and one column per species with its abundance
+
+
+#Import des données / Import data 
+tab <- read.table(Datatransformedforfiltering_trendanalysis,sep="\t",dec=".",header=TRUE) #  
+
+err_msg_tab="\nThe input dataset doesn't have the right format. It need to have the following 2 variables : \"carre\" and \"annee\" followed by at least one species"
+if(ncol(tab)<3 || !("carre" %in% names(tab)) || !("annee" %in% names(tab))){
+    stop(err_msg_tab,call.=FALSE)
+}
+
+
+
+
+#Do your analysis
+tab_filtred1<-filter_absent_species(tab)
+tab_filtred2<-filter_rare_species(tab) 
+
+#save the data in a output file in a tabular format
+filename <- "Datafilteredfortrendanalysis.tabular"
+write.table(tab_filtred2, filename,row.names=FALSE,sep="\t",dec=".")
+cat(paste("\nWrite table with data filtered for trend analysis. \n--> \"",filename,"\"\n")) 
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FunctTrendSTOCGalaxy.r	Thu Apr 02 03:34:37 2020 -0400
@@ -0,0 +1,776 @@
+#!/usr/bin/env Rscript
+
+
+##################################################################################################################################
+############## FUNCTION TO CALCULATE AND PLOT EVOLUTION OF SPECIES POPULATION  function:main.glm    ##############################
+##################################################################################################################################
+
+#### Based on Romain Lorrillière R script
+#### Modified by Alan Amosse and Benjamin Yguel for integrating within Galaxy-E
+
+##### workes with the R version 3.5.1 (2018-07-02)
+##### Package used with the version:
+#suppressMessages(library(lme4))  version 1.1.18.1
+#suppressMessages(library(ggplot2))  version 3.0.0
+#suppressMessages(library(speedglm))  version 0.3.2
+#suppressMessages(library(arm))  version 1.10.1
+#suppressMessages(library(reshape))  version 0.8.8
+#suppressMessages(library(data.table))  version 1.12.0
+#suppressMessages(library(reshape2))   version 1.4.3
+
+
+
+######################################### debut de la fonction makeTableAnalyse / stard of the function makeTableAnalyse
+## mise en colonne des especes  et rajout de zero mais sur la base des carrés selectionné sans l'import  /  Species are placed in separated columns and addition of zero on plots where at least one selected species is present 
+
+makeTableAnalyse <- function(data) {
+    tab <- reshape(data
+                  ,v.names="abond"
+                  ,idvar=c("carre","annee")      
+                  ,timevar="espece"
+                  ,direction="wide")
+    tab[is.na(tab)] <- 0               ###### remplace les na par des 0 / replace NAs by 0 
+
+    colnames(tab) <- sub("abond.","",colnames(tab))### remplace le premier pattern "abond." par le second "" / replace the column names "abond." by ""
+    return(tab)
+}
+
+######################################### fin de la fonction makeTableAnalyse / end of the function makeTableAnalyse
+
+
+
+
+
+############################################# les fonctions qui filtrent les données pas suffisantes pour analyses fiables / The filtering functions removing species with not enough data to perform accurate analyses
+
+filter_absent_species<-function(tab){
+##################### Filtre les espèces jamais présentes (abondance=0) / Filter of species with 0 abundance
+#################################################################################  PARTIE POTENTIELLEMENT ISOLABLE ET INSERABLE AVANT LA BOUCLE = permet de gagner du temps sur la boucle car supprime sps pas vu, donc pas repris par la boucle
+    
+    ## Fait la somme des abondances totales par espèce / calculate the sum of all abundance per species
+    if(ncol(tab)==3) {
+	tabSum <- sum(tab[,3])## cas d'une seule especes (problème de format et manip un peu differente)  / when selecting only one species, use a different method
+	names(tabSum) <- colnames(tab)[3]
+    } else {  ## cas de plusieurs espèce/ when selecting more than one species
+        tabSum <- colSums(tab[,-(1:2)])
+    }
+    ## colNull= espece(s) toujours absente /species with 0 total abundance
+    colNull <- names(which(tabSum==0))
+    ## colconserve= espece(s) au moins presente 1 fois/ species at least with 1 presence
+    colConserve <- names(which(tabSum>0))
+    ## Affichage des espèces rejetees  / show species eliminated for the analyses
+    if(length(colNull)>0){
+        cat("\n",length(colNull)," Species removed from the analysis, abundance is always 0.\n\n",sep="")  #Espèces enlevées de l'analyse car abondance toujours égale a 0\n\n",sep="")
+        #tabNull <- data.frame(Code_espece = colNull, nom_espece = tabsp[colNull,"nom"])
+        #cat("\n\n",sep="")
+        tab <- tab[,c("carre","annee",colConserve)]
+    }
+################################################################################ FIN DE LA PARTIE ISOLABLE
+    return(tab)  
+}
+
+
+
+
+###################### Filtre les especes trop rare pour avoir des analyses robustes i.e. espèce non presente la 1ère année, avec plus de 3 ans consecutif sans données et moins de 3 ans consécutif avec données 
+######################  Filter too rare species for accurate analysis i.e.  species absent the first year, with more than 3 consecutive years with 0 abundance, or with less than 3 consecutive years with presence
+
+###
+filter_rare_species<-function(tab){ 
+    exclude_threshold <- NULL
+    ## calcul et filtre pour chaque (colonne) espece / measure and filter for each species
+    for(i in 3:ncol(tab)) {
+        ## v =abondance par annee / v= abundance per year
+        v <- tapply(tab[,i],tab$annee,sum)  ####################    
+        ## v0 =presence(1) abscence(0) per year 
+        v0 <- ifelse(v>0,1,0)  ##### 
+        tx <- paste(v0,collapse="") #### colle les 0 et 1 / stick the 0 and 1 
+        
+        p <- unlist(strsplit(tx,"0"))#### Enleve les 0, ce qui séparent les sequences de "1", les sequences de "1" = nbre d'années consécutives avec data / remove 0, splitting sequences of "1" which correspond to consecutve year with data (e.g. 111 = 3 years consecutive years with data)
+        p <- p[p!=""] #### ne garde pas les partie sans 1 ou 0 dans les sequences
+        ## gsSup0 = plus grande serie temporelle de presence =calcul du nbre de 1 consécutif max / calcul of the biggest temporal series which corresponds to the maximum number of consecutive "1"
+        gsSup0 <- max(nchar(p))#### 
+        ## gsInf0 plus grande serie temporelle d'absccence ou sans données = enlève les 1 séparant sequence de 0 qui correspondent au nbre d'année consecutive sans données / calcul of the biggest temporal series without data which corresponds to max numbzer fo consecutive "0" 
+        gsInf0 <- max(nchar(unlist(strsplit(tx,"1")))) ####  
+        ## y0is0 absence la premiere annee
+        y0is0 <- v0[1]==0  #### True ou false pour presence de "0"(=pas de données) dans la 1ère année / look if the first year of the time sequence analyzed has no data 
+        ## seuil d'exclusion / exclusion threshold  
+        exclude_threshold <- c(exclude_threshold,as.vector(ifelse( y0is0 | gsInf0 > 3 | gsSup0 < 3 ,"exclu","bon")))  ############## exclu sps absente la 1ère année, avec plus de 3 ans consécutifs sans données, et avec moins de 3 années consécutives sans données / indicate if the max consecutive year with data and without data, as well as whether the first year of the time sequence analyzed has data 
+    }
+    names(exclude_threshold) <- colnames(tab)[3:ncol(tab)]
+
+    ## colonnes conservees avec assez de données / Column with enough data
+    colConserve <- names(exclude_threshold)[exclude_threshold=="bon"]
+    
+  
+    ## colonnes supprimees / Column that will conserved 
+    colSupr <- names(exclude_threshold)[exclude_threshold=="exclu"]
+    tabCLEAN <- tab[,c("carre","annee",colConserve)] #### Garde les sps à conserver / select only species with enough data 
+    lfiltre <- list(tabCLEAN=tabCLEAN,colConserve=colConserve,colSupr=colSupr)
+     
+################################################################################# 
+
+    ## colConserve espece conservees / extract species that will be kept to print them
+    colConserve <- lfiltre$colConserve
+    ## colsupr espece trop rare et donc supprimée de l'analyse / extract species that will be deleted to print them
+    colSupr <- lfiltre$colSupr
+    ## affichage des especes retirer de l'analyse / print species that will be deleted
+    if(length(colSupr)>0){
+        cat("\n",length(colSupr)," Rare species removed from the analysis.\n\n",sep="")
+        #tabSupr <- subset(tabsp,espece %in% colSupr ,select=c("espece","nom"))
+        #tabSupr <- tabSupr[order(tabSupr$espece),]
+        #cat("\n\n",sep="")
+        
+    }
+    if(length(colConserve)==0) {
+        mess <- "No species available to calculate abundance variation in this dataset."
+        stop(mess)
+    }
+	
+    tabCLEAN <- lfiltre$tabCLEAN
+
+                                        #### MARCHE PAS NE SAIT PAS PQUOI
+    tabCLEAN <- melt(tabCLEAN, id.vars=c("carre", "annee"))  #### remet le format de base :le nom d'espèce et abondance dans des colonnes séparées / back to the first format of the file: species name and abundance in separated column
+    
+    colnames(tabCLEAN)[3:4] <- c("espece","abond")
+    tabCLEAN$annee <- as.numeric(as.character(tabCLEAN$annee))
+################################################################################ 
+    return(tabCLEAN)
+}
+
+####################################################################################################################### fin des 2 fonctions de filtre des données / end of the two function to filter the data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+############################################################################################ debut de la Function main.glm / start of the function main.glm
+
+main.glm <- function(id="france",donneesAll=dataCLEAN,assessIC= TRUE,tabsp=tabsp,annees=annees,figure=TRUE,description=TRUE,tendanceSurFigure=TRUE, ###### declaration des arguments  listSp=sp était avant declaré avant la fonction mais il me semble que ca marche aussi comme cela
+                     seuilOccu=14,seuilAbond=NA) {
+
+    
+
+    filesaveAn <-  paste("Output/",id,"/variationsAnnuellesEspece_",id,".tabular",  ##### Nom du dossier ET fichier de sortie des resultats par année / name of the output file with results for each years
+                         sep = "")
+    filesaveTrend <-  paste("Output/",id,"/tendanceGlobalEspece_",id,".tabular",   ##### Nom du dossier ET fichier de sortie des resultats pour la période "annee" complete / name of the output file with the results for the period
+                            sep = "")
+    fileSaveGLMs <-  paste("Output/",id,"/listGLM_",id,sep = "")  #####  Nom du dossier ET fichier de sortie des modèles lineaire generalisés / name of the output file of the generlized linear models
+
+
+    
+     
+    seuilSignif <- 0.05  ## seuil de significativite / significancy threshold
+    
+    
+   rownames(tabsp) <- tabsp$espece  ## change nom des lignes de tabsp (table de reference des especes) 
+    
+    
+    ##vpan vecteur des panels de la figure  ###### POUR FAIRE LES GRAPHIQUES
+    vpan <- c("Variation abondance")
+    if(description) vpan <- c(vpan,"Occurrences","Abondances brutes")
+                                        
+
+    ## specifications des variables temporelles necesaires pour les analyses / specification of temporal variable necessary for the analyses
+    annee <- sort(unique(donneesAll$annee))
+    nbans <- length(annee)
+    pasdetemps <- nbans-1
+    firstY <- min(annee)
+    lastY <- max(annee)
+	
+	
+	
+	
+
+    ## Ordre de traitement des especes ### order of species to be analyzed
+    spOrdre <- aggregate(abond~espece,data=donneesAll,sum)  #### calcul les sommes des abondances pour ordonner / calculate the sum for the ordination
+    spOrdre <- merge(spOrdre,tabsp,by="espece") #### rajoute la colonne avec les abondances totales par espece / add a new column with the sum
+    
+    spOrdre <- spOrdre[order(as.numeric(spOrdre$indicateur),spOrdre$abond,decreasing = TRUE),] #### mets les especes plus abondantes en premiers (plus long pour faire tourner le modèle) / order the species by abundance, the most abundant species being the less fast analysis
+    
+    
+    listSp <- spOrdre$espece
+    i <- 0
+    nbSp <- length(listSp)
+                                        #	browser()
+    ## analyse par espece
+### browser()
+    ## affichage des especes conservees pour l'analyse  ### PAS SUR QUE CE SOIT ENCORE UTILE
+    cat("\n",nbSp," Espèces conservées pour l'analyse\n\n",sep="")
+    rownames(tabsp) <- tabsp$espece
+    print(tabsp[,1:2])
+    #tabCons <- data.frame(Code_espece = listSp, nom_espece = tabsp[as.character(listSp),"nom"])
+    #print(tabCons)  
+    cat("\n\n",sep="")
+    flush.console()
+
+
+    ## initialisation de la liste de sauvegarde
+
+
+##browser()
+    
+    for (sp in listSp) {  ######## Boucle pour analyse par espèce / loop for the analysis by species
+
+
+        i <- i + 1
+          
+        d <- subset(donneesAll,espece==sp)  ## d data pour l'espece en court  / cut the data keeping only the i species
+        
+        #nomSp <- as.character(tabsp[sp,"nom"])  ## info sp
+        nomSp <- tabsp$nom[which(tabsp$espece==sp)]  ## info sp
+        cat("\n(",i,"/",nbSp,") ",sp," | ", nomSp,"\n",sep="")
+        flush.console()
+
+        #indic <- tabsp[sp,"indicateur"] ## indic :espece utilisee pour le calcul des indicateurs par groupe de specialisation / list the species used as species indicators by trophic specialization
+        indic <- tabsp$indicateur[which(tabsp$espece==sp)] ## indic :espece utilisee pour le calcul des indicateurs par groupe de specialisation / list the species used as species indicators by trophic specialization
+        nb_carre = tapply(rep(1,nrow(d)),d$annee,sum) ## nb_carre nombre de carre suivie par annee / number of plots per year
+        
+        nb_carre_presence = tapply(ifelse(d$abond>0,1,0),d$annee,sum) ## nb_carre_presence nombre de carre de presence par annee / number the plots where the species were observed
+        
+        tab2 <- data.frame(annee=rep(annee,2),val=c(nb_carre,nb_carre_presence),LL = NA,UL=NA, ## tab2 table de resultat d'analyse / data.frame of the analyses results
+                           catPoint=NA,pval=NA,
+                           courbe=rep(c("carre","presence"),each=length(annee)),panel=vpan[2])
+        tab2$catPoint <- ifelse(tab2$val == 0,"0",ifelse(tab2$val < seuilOccu,"infSeuil",NA))
+        
+        abond <- tapply(d$abond,d$annee,sum) ## abond abondance par annee / abundance per year
+        
+        tab3 <- data.frame(annee=annee,val=abond,LL = NA,UL=NA,catPoint=NA,pval=NA,courbe=vpan[3],panel=vpan[3]) ## table pour la figure / data.frame made to realize the graphical outputs
+        tab3$catPoint <- ifelse(tab3$val == 0,"0",ifelse(tab3$val < seuilAbond,"infSeuil",NA))
+
+        ## GLM pour calcul des tendances annuelles de l'evolution des populations / GLM to measure annual tendency of population evolution 
+       formule <- as.formula("abond~as.factor(carre)+as.factor(annee)") #### specification du modèle = log lineaire / specifying the model = log linear
+       if(assessIC) {##### OPTION A RENTRER AU DEBUT PEUT ËTRE A METTRE DANS LES ARGUMENTS SI LAISSE LE CHOIX SINON L ARG PAR DEFAUT LORS DE LA DECLARATION DE LA FONCTION
+           glm1 <- glm(formule,data=d,family=quasipoisson)  ##### fit model lineaire general avec intervalle de confiance disponible / fit linear and generalized model with confidence intervalle available
+       } else {
+           glm1 <- try(speedglm(formule,data=d,family=quasipoisson())) ##### fit modele lineaire et generaux pour les gros jeux de données / fit of linear and generalized model for large-medium dataset
+           if(class(glm1)[1]=="try-error")
+               glm1 <- glm(formule,data=d,family=quasipoisson) ##### comprends pas mais je pense que c'est speedglm qui marche pas avec toutes les données
+       }
+       sglm1 <- summary(glm1)  #### sortie du modele / output of the model
+       sglm1 <- coefficients(sglm1) ### coefficient regression de chaque variable avec les résultats des tests statistiques / regression coefficient of each predictive variables with results of the statistical tests
+       sglm1 <- tail(sglm1,pasdetemps) #### recupére les derniers elements du modèle avec la taille de l'objet "pasdetemps" car le nombre de coef = nbre d'année et pas les coefficient de regression de la variable carre / retrieve only the coefficient regression of the variable year
+       coefan <- as.numeric(as.character(sglm1[,1]))#### coefficient de regression de la variable année (1 pour chaque année)
+        
+        coefannee <- c(1,exp(coefan))## coefannee vecteur des variation d'abondance par annee avec transformation inverse du log :exp() / regression coefficient of the year back transformed from log(abundance) : exp()
+        
+		erreuran <- as.numeric(as.character(sglm1[,2])) #### erreur standard sur le coefficient de regression de la variable annee  / standard error on the regression coefficient of the year 
+        erreurannee1 <- c(0,erreuran*exp(coefan))## erreur standard par année / the standard error per year  ###### LA J AI UN DOUTE NORMALEMENT INTERVAL DE CONF C CI_lower <- coefficients(lin_mod)[2] - 1.96*summary(lin_mod)$coefficients[2,2]
+                                                                                                               ####CI_upper <- coefficients(lin_mod)[2] + 1.96*summary(lin_mod)$coefficients[2,2]
+		
+        pval <- c(1,as.numeric(as.character(sglm1[,4])))###### p value
+        
+        ## calcul des intervalle de confiance avec methode de bootstrap pour simuler des coef de regress sur lequel intervalle de conf sont mesurés/ calcul of the confidence interval using bootstrap method to simulate set regression coefficients and s.e.with uncertainty   POURQUOI PAS UTILISE confint.glm() ou boot() ou ci.boot()
+        
+        if(assessIC) {
+        glm1.sim <- sim(glm1)
+        ic_inf_sim <- c(1,exp(tail(apply(coef(glm1.sim), 2, quantile,.025),pasdetemps)))
+        ic_sup_sim <- c(1,exp(tail(apply(coef(glm1.sim), 2, quantile,.975),pasdetemps)))
+        } else {
+            ic_inf_sim <- NA
+            ic_sup_sim <- NA
+ 
+        }
+        
+        
+        
+        tab1 <- data.frame(annee,val=coefannee,  ## tab1 table pour la realisation des figures / table for the graphical outputs  ### 2EME POUR GRAPH ici ce sont le coef de regress annee en fonction des annéés alors que tab3 c'est les abondance en fct des années et tab2 nombre de carré total et avec presence
+                           LL=ic_inf_sim,UL=ic_sup_sim,
+                           catPoint=ifelse(pval<seuilSignif,"significatif",NA),pval,
+                           courbe=vpan[1],
+                           panel=vpan[1])
+        ## netoyage des intervalle de confiance mal estimés et qd donnees pas suffisantes pour calcul d'IC /cleaning of wrong or biaised measures of the confidence interval
+        if(assessIC) {
+        tab1$UL <- ifelse( nb_carre_presence==0,NA,tab1$UL)
+        tab1$UL <-  ifelse(tab1$UL == Inf, NA,tab1$UL)
+        tab1$UL <-  ifelse(tab1$UL > 1.000000e+20, NA,tab1$UL)
+        tab1$UL[1] <- 1
+        tab1$val <-  ifelse(tab1$val > 1.000000e+20,1.000000e+20,tab1$val)
+        }
+        ## indice de surdispersion  / overdispersion index
+       ## browser()
+        if(assessIC) dispAn <- glm1$deviance/glm1$null.deviance else dispAn <- glm1$deviance/glm1$nulldev
+
+
+        ## tabAn table de sauvegarde des resultats par année / table of the results per year ######  reprends bcp de tabl DIFFERENCE AVEC tab2  c les abondances relatives, alors que nb de carre, nb de carre presnce, p val sont aussi ds tab2
+        tabAn <- data.frame(id,code_espece=sp, nom_espece = nomSp,indicateur = indic,annee = tab1$annee,
+                            abondance_relative=round(tab1$val,3),
+                            IC_inferieur = round(tab1$LL,3), IC_superieur = round(tab1$UL,3),
+                            erreur_standard = round(erreurannee1,4),
+                            p_value = round(tab1$pval,3),significatif = !is.na(tab1$catPoint),
+                            nb_carre,nb_carre_presence,abondance=abond)
+        
+        ## GLM pour calcul des tendance generale sur la periode avec modele log lineaire / GLM to measure the tendency of population evolution on the studied period with log linear model
+        formule <- as.formula(paste("abond~ as.factor(carre) + annee",sep="")) ### 
+          #  browser()
+    
+       
+         if(assessIC) {
+             md2 <- glm(formule,data=d,family=quasipoisson) }
+        else {
+                md2 <- try(speedglm(formule,data=d,family=quasipoisson()),silent=TRUE)
+
+                if(class(md2)[1]=="try-error")
+                    md2 <- glm(formule,data=d,family=quasipoisson)
+            }
+
+        
+       smd2 <- summary(md2)       #### sortie du modele / output of the model
+       smd2 <- coefficients(smd2) ### coefficient regression de chaque variable avec les résultats des tests statistiques / regression coefficient of each predictive variables with results of the statistical tests
+       smd2 <- tail(smd2,1)       ### coefficient regression de variable annee avec les résultats des tests statistiques / regression coefficient of the variable year with results of the statistical tests
+       
+        
+        coefan <- as.numeric(as.character(smd2[,1])) ## tendences sur la periode = coefficient regression de variable annee  / tendency of population evolution on the studied period = regression coefficient of the variable year 
+        trend <- round(exp(coefan),3)
+        
+        pourcentage <- round((exp(coefan*pasdetemps)-1)*100,2) ## pourcentage de variation sur la periode / percentage of population variation on the studied period 
+        pval <- as.numeric(as.character(smd2[,4]))
+        
+        erreuran <- as.numeric(as.character(smd2[,2])) #### récuperer l'erreur standard / retrieve the error 
+        ## erreur standard 
+        erreurannee2 <- erreuran*exp(coefan)
+        
+        
+        ## calcul des intervalle de confiance avec methode de bootstrap pour simuler des coef de regress sur lequel intervalle de conf sont mesurés/ calculating the confidence interval based on bootstrap method to simulate set regression coefficients and s.e.with uncertainty 
+        LL <- NA
+        UL <- NA
+        if(assessIC) {
+            md2.sim <- sim(md2)
+            LL <- round(exp(tail(apply(coef(md2.sim), 2, quantile,.025),1)),3)
+            UL <- round(exp(tail(apply(coef(md2.sim), 2, quantile,.975),1)),3)
+        } else {
+            LL <- NA
+            UL <- NA
+        }
+        
+        ## tab1t table utile pour la realisation des figures  / table used for the figures
+        tab1t <- data.frame(Est=trend,
+                            LL , UL,
+                            pourcent=pourcentage,signif=pval<seuilSignif,pval)
+        
+        
+        trendsignif <- tab1t$signif
+        pourcent <- round((exp(coefan*pasdetemps)-1)*100,3)
+        ## mesure de la surdispersion / overdispersion measurment
+
+          if(assessIC) dispTrend <- md2$deviance/md2$null.deviance else dispTrend <- md2$deviance/md2$nulldev
+
+
+        
+        ## classement en categorie incertain /classifying wrong or not reliable results 
+       # browser()
+        if(assessIC) {
+        if(dispTrend > 2 | dispAn > 2 | median( nb_carre_presence)<seuilOccu) catIncert <- "Incertain" else catIncert <-"bon"  ##### en fonction de l'indice de surdispersion et presence < à seuil occurence / based on the overdispersion index and the presence on a minimum number of plots
+        vecLib <-  NULL
+        if(dispTrend > 2 | dispAn > 2 | median( nb_carre_presence)<seuilOccu) {
+            if(median( nb_carre_presence)<seuilOccu) {
+                vecLib <- c(vecLib,"espece trop rare")
+            }
+            if(dispTrend > 2 | dispAn > 2) {
+                vecLib <- c(vecLib,"deviance")
+            }
+        }
+        raisonIncert <-  paste(vecLib,collapse=" et ")
+        } else {
+            catIncert <- NA
+            raisonIncert <- NA
+        }
+        
+        
+        
+        ## affectation des tendence EBCC  / retrieve the trend of population evolution on the studied period
+        catEBCC <- NA
+        if(assessIC)  catEBCC <- affectCatEBCC(trend = as.vector(trend),pVal = pval,ICinf=as.vector(LL),ICsup=as.vector(UL)) else catEBCC <- NA
+        ## table complete de resultats  pour la periode etudiée / complete table with results for the studied period
+     #   browser()
+        tabTrend <- data.frame(
+            id,code_espece=sp,nom_espece = nomSp,indicateur = indic,
+            nombre_annees = pasdetemps,premiere_annee = firstY,derniere_annee = lastY,
+            tendance = as.vector(trend) ,  IC_inferieur=as.vector(LL) , IC_superieur = as.vector(UL),pourcentage_variation=as.vector(pourcent),
+            erreur_standard = as.vector(round(erreurannee2,4)), p_value = round(pval,3),
+            significatif = trendsignif,categorie_tendance_EBCC=catEBCC,mediane_occurrence=median( nb_carre_presence) ,
+            valide = catIncert,raison_incertitude = raisonIncert)
+
+
+        if(assessIC)  listGLMsp <- list(list(glm1,glm1.sim,md2,md2.sim)) else  listGLMsp <- list(list(glm1,md2))
+        names(listGLMsp)[[1]] <-sp 
+        fileSaveGLMsp <- paste(fileSaveGLMs,"_",sp,".Rdata",sep="")
+        
+        save(listGLMsp,file=fileSaveGLMsp)
+        cat("--->",fileSaveGLMsp,"\n")
+        flush.console()
+
+        if(sp==listSp[1]) {
+            glmAn <- tabAn
+            glmTrend <- tabTrend
+        } else  {
+            glmAn <- rbind(glmAn,tabAn)
+            glmTrend <- rbind(glmTrend,tabTrend)
+        }
+	## les figures     
+        if(figure) {
+            ## table complete pour la figure en panel par ggplot2
+            ## table pour graphe en panel par ggplot2
+            if(description)	dgg <- rbind(tab1,tab2,tab3) else dgg <- tab1
+            ## les figures     
+            
+            ggplot.espece(dgg,tab1t,id,serie=NULL,sp,valide=catIncert,nomSp,description,tendanceSurFigure,seuilOccu=14,vpan = vpan,assessIC=assessIC)
+            
+        }
+        
+        
+        
+        
+    }
+    
+    write.table(glmAn,filesaveAn,row.names=FALSE,quote=FALSE,sep="\t",dec=".",fileEncoding="UTF-8")
+    cat("--->",filesaveAn,"\n")
+    write.table(glmTrend,filesaveTrend,row.names=FALSE,quote=FALSE,sep="\t",dec=".",fileEncoding="UTF-8")
+    cat("--->",filesaveTrend,"\n")
+    
+    
+    flush.console()
+    
+    
+    
+}
+########################################################################################################## Fin de la fonction main.glm / end of the function main.glm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###########################################################################################################  fonction appelée par main.glm renvoyant la categorie European Bird Census Council en fonction des resultats des modèles  / function called by main.glm to classify results depending on the quality of the data and analyses
+## renvoie la categorie EBCC de la tendance en fonction
+## trend l'estimateur de la tendance / estimation of the trends
+## pVal la p value
+## ICinf ICsup l intervalle de confiance a 95 pourcent
+affectCatEBCC <- function(trend,pVal,ICinf,ICsup){
+  catEBCC <- ifelse(pVal>0.05,
+                    ifelse(ICinf < 0.95 | ICsup > 1.05,"Incertain","Stable"),
+                    ifelse(trend<1,
+                           ifelse(ICsup<0.95,"Fort declin","Declin moderee"),
+                           ifelse(ICinf>1.05,"Forte augmentation","Augmentation modere")))
+  return(catEBCC)
+}
+
+############################################################################################################ fin de la fonction renvoyant la categorie EBCC / end of the function main.glm
+
+
+
+
+
+
+
+
+############################################################################################################ fonction graphique appelée par main.glm / function called by main.glm for graphical output
+ggplot.espece <- function(dgg,tab1t,id,serie=NULL,sp,valide,nomSp=NULL,description=TRUE,
+                          tendanceSurFigure=TRUE,seuilOccu=14, vpan,assessIC=TRUE) {
+  
+  #  serie=NULL;nomSp=NULL;description=TRUE;valide=catIncert
+  #  tendanceSurFigure=TRUE;seuilOccu=14
+  require(ggplot2)
+  
+  figname<- paste("Output/",id,"/",ifelse(valide=="Incertain","Incertain/",""),
+                  sp,"_",id,serie, ".png",
+                  sep = "")
+  ## coordonnee des ligne horizontal de seuil pour les abondances et les occurences
+  hline.data1 <- data.frame(z = c(1), panel = c(vpan[1]),couleur = "variation abondance",type="variation abondance")
+  hline.data2 <- data.frame(z = c(0,seuilOccu), panel = c(vpan[2],vpan[2]),couleur = "seuil",type="seuil")
+  hline.data3 <- data.frame(z = 0, panel = vpan[3] ,couleur = "seuil",type="seuil")  
+  hline.data <- rbind(hline.data1,hline.data2,hline.data3)
+  titre <- paste(nomSp)#,"\n",min(annee)," - ",max(annee),sep="")
+  
+  ## texte de la tendance / text for the population evolution trend
+  tab1 <- subset(dgg,panel =="Variation abondance")
+  pasdetemps <- max(dgg$annee) - min(dgg$annee) + 1
+  if(assessIC){
+      txtPente1 <- paste(tab1t$Est,
+                     ifelse(tab1t$signif," *",""),"  [",tab1t$LL," , ",tab1t$UL,"]",
+                     ifelse(tab1t$signif,paste("\n",ifelse(tab1t$pourcent>0,"+ ","- "),
+                                               abs(tab1t$pourcent)," % en ",pasdetemps," ans",sep=""),""),sep="")
+  }else{
+       txtPente1 <- ifelse(tab1t$signif,paste("\n",ifelse(tab1t$pourcent>0,"+ ","- "),
+                                               abs(tab1t$pourcent)," % en ",pasdetemps," ans",sep=""),"")
+ 
+  }
+  ## table du texte de la tendance / table of the text for the population evolution trend
+  tabTextPent <- data.frame(y=c(max(c(tab1$val,tab1$UL),na.rm=TRUE)*.9),
+                            x=median(tab1$annee),
+                            txt=ifelse(tendanceSurFigure,c(txtPente1),""),
+                            courbe=c(vpan[1]),panel=c(vpan[1]))
+  ## les couleurs / the colors
+  vecColPoint <- c("#ffffff","#eeb40f","#ee0f59")
+  names(vecColPoint) <- c("significatif","infSeuil","0")
+  vecColCourbe <- c("#3c47e0","#5b754d","#55bb1d","#973ce0")
+  names(vecColCourbe) <- c(vpan[1],"carre","presence",vpan[3])
+  vecColHline <- c("#ffffff","#e76060")
+  names(vecColHline) <- c("variation abondance","seuil")
+  
+  col <- c(vecColPoint,vecColCourbe,vecColHline)
+  names(col) <- c(names(vecColPoint),names(vecColCourbe),names(vecColHline))
+  
+  ## si description graphique en 3 panels
+  if(description) {
+    p <- ggplot(data = dgg, mapping = aes(x = annee, y = val))
+    ## Titre, axes ...
+    p <- p + facet_grid(panel ~ ., scale = "free") +
+      theme(legend.position="none",
+            panel.grid.minor=element_blank(),
+            panel.grid.major.y=element_blank())  +
+      ylab("") + xlab("Annee")+ ggtitle(titre) +
+      scale_colour_manual(values=col, name = "" ,
+                          breaks = names(col))+
+      scale_x_continuous(breaks=min(dgg$annee):max(dgg$annee))
+    p <- p + geom_hline(data =hline.data,mapping = aes(yintercept=z, colour = couleur,linetype=type ),
+                        alpha=1,size=1.2)
+   if(assessIC){ ############# ONLY FOR THE CONFIDENCE INTERVAL
+    p <- p + geom_ribbon(mapping=aes(ymin=LL,ymax=UL),fill=col[vpan[1]],alpha=.2) 
+    p <- p + geom_pointrange(mapping= aes(y=val,ymin=LL,ymax=UL),fill=col[vpan[1]],alpha=.2)
+	}
+    p <- p + geom_line(mapping=aes(colour=courbe),size = 1.5)
+    p <- p + geom_point(mapping=aes(colour=courbe),size = 3)
+    p <- p + geom_point(mapping=aes(colour=catPoint,alpha=ifelse(!is.na(catPoint),1,0)),size = 2)
+    p <-  p + geom_text(data=tabTextPent, mapping=aes(x,y,label=txt),parse=FALSE,color=col[vpan[1]],fontface=2, size=4)
+    ggsave(figname, p,width=16,height=21, units="cm")
+	print (figname)  ##### CAN BE REMOVED IF YOU DO NOT WANT THE GRAPH TO BE PLOTTED
+  } else {
+    
+    p <- ggplot(data = subset(dgg,panel=="Variation abondance"), mapping = aes(x = annee, y = val))
+    ## Titre, axes ...
+    p <- p + facet_grid(panel ~ ., scale = "free") +
+      theme(legend.position="none",
+            panel.grid.minor=element_blank(),
+            panel.grid.major.y=element_blank())  +
+      ylab("") + xlab("Annee")+ ggtitle(titre) +
+      scale_colour_manual(values=col, name = "" ,
+                          breaks = names(col))+
+      scale_x_continuous(breaks=min(dgg$annee):max(dgg$annee))
+    p <- p + geom_hline(data =subset(hline.data,panel=="Variation abondance"),mapping = aes(yintercept=z, colour = couleur,linetype=type ),
+                        alpha=1,size=1.2)
+    
+   if(assessIC){ ############# ONLY FOR THE CONFIDENCE INTERVAL
+    p <- p + geom_ribbon(mapping=aes(ymin=LL,ymax=UL),fill=col[vpan[1]],alpha=.2) 
+    p <- p + geom_pointrange(mapping= aes(y=val,ymin=LL,ymax=UL),fill=col[vpan[1]],alpha=.2)
+	}
+    p <- p + geom_line(mapping=aes(colour=courbe),size = 1.5)
+    p <- p + geom_point(mapping=aes(colour=courbe),size = 3)
+    p <- p + geom_point(mapping=aes(colour=catPoint,alpha=ifelse(!is.na(catPoint),1,0)),size = 2)
+    p <-  p + geom_text(data=tabTextPent, mapping=aes(x,y,label=txt),parse=FALSE,color=col[vpan[1]],fontface=2, size=4)
+    ggsave(figname, p,width=15,height=9,units="cm")
+  print (figname) ##### CAN BE REMOVED IF YOU DO NOT WANT THE GRAPH TO BE PLOTTED
+  }
+}
+############################################################################################################ fin fonction graphique / end of function for graphical output
+
+
+
+
+#################################################################################################################### debut de la fonction de moyenne geometrique pondere / start of the geometric weighted mean function 
+geometriqueWeighted <- function(x,w=1) exp(sum(w*log(x))/sum(w))
+#################################################################################################################### fin de la fonction de moyenne geometrique pondere / end of the geometric weighted mean function 
+
+
+
+##################################################################################################################### debut de la fonction analyseGroupe / start of the function analyseGroupe
+## Analyse par groupe de specialisation a partir des resulats de variation d'abondance par especes / analysis by specialization group based on results of the analysis of population evolution trend
+#
+
+
+analyseGroupe <- function(id="france",tabsp=tabsp,donnees=donnees,donneesTrend=donneesTrend,ICfigureGroupeSp=TRUE,powerWeight=2,
+                          correctionAbondanceNull = 0.000001,
+                          groupeNom = c("generaliste","milieux batis","milieux forestiers","milieux agricoles"),
+                          groupeCouleur = c("black","firebrick3","chartreuse4","orange")) {
+    
+    
+
+
+
+    ## donnees tendances globales / results of the global trends
+    donneesTrend <- subset(donneesTrend, select = c(code_espece,valide,mediane_occurrence))
+	
+    ## table de reference espece  / reference table for species
+    tabsp <- subset(tabsp, select= c(sp,nom,indicateur, specialisation))
+    donnees <- merge(donnees,donneesTrend,by="code_espece")
+    donnees <- merge(donnees,tabsp,by.x="code_espece",by.y="sp")
+    ## table de correspondance de biais en fonction des medianes des occuerences
+	
+    
+    nameFileSpe <-  paste("Output/",id,"/variationsAnnuellesGroupes_",id, ############# Declare le fichier de sortie des variations annuelles par groupe / declare the name of the outputfile for annual population evolution trend by group 
+                          ".tabular",sep="" )
+    nameFileSpepng <-  paste("Output/",id,"/variationsAnnuellesGroupes_",id, ############# Declare le fichier de sortie graphique des variations annuelles par groupe / declare the name of the graphical output file for annual population evolution trend by group
+                             ".png",sep="" )
+    
+    grpe <- donnees$specialisation
+    
+    ####### valeur seuil sont obtenues à partir de simulations / threshold values are obtained from simulations
+    ff <- function(x,y) max(which(y<=x)) ## fonction pour recherche le poid associé à valeur max parmi valeur seuil d'occurence inferieur ou egale à occurence mediane obs / function to retrieve the weight associated with the max occurence threshold equal or smaller than the occurence mediane observed
+     
+    IncertW <- ifelse(donnees$valide=="Incertain",tBiais$biais[sapply(as.vector(donnees$mediane_occurrence),ff,y=tBiais$occurrenceMed)],1) ## pr verifier poids de l'espèce dans analyse, récupére seuil occurence minimum pour lequel tendance pas bonne, et compare avec mediane occurence des données  / to check the weight of species in the analysis, this retrieve occurence threshold with wich real occurence measured on data are compared in order to verify the accuracy of the trend measurment
+    ## poids du a la qualite de l'estimation
+                                        #   erreur_stW <- 1/((donnees$erreur_st+1)^powerWeight)
+                                        #	erreur_stW <- ifelse( is.na(donnees$IC_superieur),0,erreur_stW)
+    erreur_stW <- ifelse(is.na(donnees$IC_superieur),0,1)#####  si pas d'interval de confiance met 0 et donne un poid de 0 à l'esps (voir ci dessous) /  if no confidence interval calculated give a weight of 0 for the sps 
+    ## calcul du poids total de chaque espèce / calcul of the weight of each species 
+    W <- IncertW * erreur_stW
+    
+    ## variable de regroupement pour les calculs par groupe de specialisation et par an / variables gathered to identify group for the calculation (per specialization and per year)
+    grAn <- paste(donnees$specialisation,donnees$annee,sep="_")
+    ## data frame pour le calcul / dataframe made for the calcul
+    dd <- data.frame(grAn,annee = donnees$annee, grpe,W,ab=donnees$abondance_relative,ICinf= donnees$IC_inferieur, ICsup= ifelse(is.na(donnees$IC_superieur),10000,donnees$IC_superieur)) 
+    ## table resumer de tous les poids / table to sum up the weights of each species depending on the incertainty in the calcul of the poulation evolution trends
+    ddd <- data.frame(code_espece = donnees$code_espece,nom_espece = donnees$nom_espece,annee = donnees$annee, 
+                      groupe_indicateur = grpe,
+                      poids_erreur_standard = round(erreur_stW,3), poids_incertitude = round(IncertW,3),poids_final = round(W,3),
+                      abondance_relative=donnees$abondance_relative,
+                      IC_inferieur= donnees$IC_inferieur, 
+                      IC_superieur= ifelse(is.na(donnees$IC_superieur),10000,donnees$IC_superieur),
+                      valide = donnees$valide, mediane_occurrence = donnees$mediane_occurrence) 
+
+    nomFileResum <- paste("Output/",id,"/donneesGroupes_",id, ###### declaration du nom du repertoire et des fichiers de sortie / declaring the name of the output folder and files  
+                          ".tabular",sep="" )
+    write.table(ddd,nomFileResum,row.names=FALSE,sep="\t",dec=".",fileEncoding="UTF-8")
+    cat("-->",nomFileResum,"\n")
+    
+    ## calcul des moyennes ponderees par groupe par an et pour les abondance et les IC	/ calcul of weighted means per specialization group and per year for the abundance and confidence interval
+    for(j in 5:7) dd[,j] <- ifelse(dd[,j]==0,correctionAbondanceNull,dd[,j])	
+    ag <- apply(dd[,5:7], 2,  ######## sur les abondances relatives, les ICinf et ICsup
+                function(x) {
+                    sapply(split(data.frame(dd[,1:4], x), dd$grAn),  ###### fait les moyennes pondérés par groupe grAn / calculate the weighted mean by group grAn
+                           function(y) round(geometriqueWeighted(y[,5], w = y$W),3))
+                })
+    ##	gg <- subset(dd,as.character(dd$grAn)=="milieux forestier_2014")  #############################################################
+
+    ag <- ifelse(is.na(ag),1,ag)
+    ag <- as.data.frame(ag)
+    ag$grAn <-  rownames(ag)
+    dbon <- subset(donnees,valide=="bon")
+    dIncert <- subset(donnees,valide=="Incertain")
+    ## calcul nombre d'espece "bonne" pour le calcul / calculating the number of species with low level of incertainty, "good" species 
+    bon <- tapply(dbon$nom,dbon$specialisation,FUN=function(X)length(unique(X)) )
+    bon <- ifelse(is.na(bon),0,bon)
+    tbon <- data.frame(groupe=names(bon),bon)
+    ## calcul nombre d'especes "incertaines" pour le calcul / calculating the number of species with high level of incertainty, "bad" species
+    Incert <- tapply(dIncert$nom,dIncert$specialisation,FUN=function(X)length(unique(X)) )
+    Incert <- ifelse(is.na(Incert),0,Incert)
+    tIncert <- data.frame(groupe=names(Incert),Incertain=Incert)
+
+    tIncert <- merge(tIncert,tbon,by="groupe")
+    
+    ## table de données avec les moyennes ponderees par groupe / table of the data with the weighted mean by group 
+    da <- merge(unique(dd[,1:3]),ag,by="grAn")[,-1]
+    colnames(da) <- c("annee","groupe","abondance_relative","IC_inferieur","IC_superieur")
+
+    da$annee <- as.numeric(da$annee)
+    da <-  merge(da,tIncert,by="groupe") #### ajoute le nombre d'espece "incertaines" et "bonne" aux resultats  / add the number of "good" and "bad" species to the overall resutls
+    da <- subset(da, groupe != "non")
+    colnames(da)[6:7] <-  c("nombre_especes_incertaines","nombre_espece_bonnes")
+    a <- data.frame(id,da)
+    write.table(da,file=nameFileSpe,row.names=FALSE,quote=FALSE,sep="\t",dec=".",fileEncoding="UTF-8")
+
+    cat("-->",nameFileSpe,"\n")
+    yearsrange <- c(min(da$annee),max(da$annee))
+    
+    ## figure par ggplot2  / plots with ggplot2
+    titre <- paste("Variation de l'indicateur groupe de specialisation",sep="")
+
+    vecCouleur <- setNames(groupeCouleur,groupeNom)
+                                        #browser()
+    p <- ggplot(data = da, mapping = aes(x = annee, y = abondance_relative, colour=groupe,fill=groupe))
+    p <- p + geom_hline(aes(yintercept = 1), colour="white", alpha=1,size=1.2) 
+    if(ICfigureGroupeSp)
+        p <- p + geom_ribbon(mapping=aes(ymin=IC_inferieur,ymax=IC_superieur),linetype=2,alpha=.1,size=0.1) 
+    p <- p + geom_line(size=1.5)
+    p <- p +  ylab("") + xlab("Annee")+ ggtitle(titre) 
+    if(!is.null(groupeNom)) p <- p + scale_colour_manual(values=vecCouleur, name = "" )+
+                                scale_x_continuous(breaks=unique(da$annee))
+    if(!is.null(groupeNom)) p <- p +  scale_fill_manual(values=vecCouleur, name="")
+    p <- p +  theme(panel.grid.minor=element_blank(), panel.grid.major.y=element_blank()) 
+    ggsave(nameFileSpepng, p,width=17,height=10,units="cm")
+
+                                        #   cat(" <==",nameFileSpepng,"\n")
+    
+    ## calul pour chaque groupe une pente de regression d'evolution des abondances sur la periode étudiée / calculating for each group the regression slope for the abundance evolution on the studied period
+    vecSpe <- unique(da$groupe)
+    datasum <- data.frame(groupe=NULL,tendance=NULL,pourcentage_variation=NULL)
+    for(spe in 1:4){
+        # print(spe)
+        subtab <- subset(da,groupe==vecSpe[spe])
+        if(nrow(subtab)>1) {
+            sumlm <- summary(lm(abondance_relative~annee,data=subtab)) ##### recupère les resultats du modèle linéaire / retrieve the results of the linear model
+            subdatasum <- data.frame(groupe=vecSpe[spe],
+                                     tendance=round(sumlm$coefficients[2,1],3),
+                                     pourcentage_variation=round(sumlm$coefficients[2,1]*(nrow(subtab)-1)*100,3)) #### assemble les resultats pour en faire une sortie  /  bring together the results for an output file
+            datasum <- rbind(datasum,subdatasum)
+            
+        }
+        
+    }
+    datasum <- merge(datasum,tIncert,by="groupe") #### 
+    datasum <- data.frame(id,datasum)
+                                        #datasum$cat_tendance_EBCC <- affectCatEBCC(trend,pVal,ICinf,ICsup
+    namefilesum <- paste("Output/",id,"/tendancesGlobalesGroupes_",id,
+                         ".tabular",sep="" )
+    write.table(datasum,file=namefilesum,row.names=FALSE,quote=FALSE,sep="\t",dec=".",fileEncoding="UTF-8")
+    cat("-->",namefilesum,"\n")
+}
+
+################################################################################################################## fin de la fonction analyseGroupe / end of the function analyseGroupe
+
+
+
+
+
+
+
+################################################################################################################### debut de la fonction check_file / start of the function check_file
+# Fonction pour verifier les données d'entrée / General function to check integrity of input file. Will check numbers and contents of variables(colnames). 
+#return an error message and exit if mismatch detected
+#Faut rentrer le nom du jeu de données, le nbre et le nom des variables / Enter dataset name,  expected number and names of variables. + an exit error message to guide user.
+
+check_file<-function(dataset,err_msg,vars,nb_vars){
+    if(ncol(dataset)!=nb_vars){ #Verifiction de la présence du bon nb de colonnes, si c'est pas le cas= message d'erreur / checking for right number of columns in the file if not = error message
+        cat("\nerr nb var\n") 
+        stop(err_msg, call.=FALSE)
+    }
+
+    for(i in vars){
+        if(!(i %in% names(dataset))){
+            stop(err_msg,call.=FALSE)
+        }
+    }
+}
+
+#####################################################################################################################
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/filteringSp.xml	Thu Apr 02 03:34:37 2020 -0400
@@ -0,0 +1,71 @@
+<tool id="stoceps_filteringsp" name="Filter species" version="@VERSION@">
+    <description>with rare and low abundances</description>
+    <macros>
+        <import>stoceps_macros.xml</import>
+    </macros>
+    <expand macro="reshape2_requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+        Rscript 
+         '$__tool_directory__/ExeFilteringRareLowabundSPGalaxy.r' 
+         '$input'
+         '$__tool_directory__/FunctTrendSTOCGalaxy.r' 
+         '$output'
+    ]]>
+    </command>
+    <inputs>
+        <param name="input" type="data" format="tabular" label="Preprocessed Stoc input file" help="Output file from the 'Preprocess population data tool'"/>
+    </inputs>
+    <outputs>
+        <data name="output" from_work_dir="Datafilteredfortrendanalysis.tabular" format="tabular"/>
+    </outputs>
+    <tests>
+        <test> 
+            <param name="input" value="Datatransformedforfiltering_trendanalysis.tabular"/>
+            <output name="output" file="Datafilteredfortrendanalysis.tabular"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+=================================================
+STOC Filter species with rare and low abundances
+=================================================
+
+**What it does**
+
+Reshape the data for the next steps of STOC analyzes by removing species with not enough data to perform the analysis i.e. with low abundance or not observed at all.
+
+The format of the file from the STOC data can be obtained after running the tool "Preprocess population data".
+
+|
+
+**Input description**
+
+A tabular file with each species abundance in different column, and one column to indicate the year, and another one indicating the site. This file may come from the tools preprocess population data that use the function MakeTableAnalysis .
+
+The table needs the following structure (at least these 4 four columns, if one species, and as much additional columns as there are additional species) :
+
++-----------+---------+--------------+--------------+--------------+
+|   carre   |  annee  |  speciesId1  |  speciesId2  |  speciesIdN  |
++===========+=========+==============+==============+==============+
+| carreId1  |   2019  |     abund    |    abund     |    abund     |
++-----------+---------+--------------+--------------+--------------+
+|    ...    |   ...   |     ...      |     ...      |     ...      | 
++-----------+---------+--------------+--------------+--------------+
+
+|
+
+**Output**
+
+A tabular file transformed, with only one column for the abundance, one column indicating the species, one indicating the site and one indicating the year.
+
+This file is ready for its analysis with "Estimate temporal population evolution"
+
+|
+
+**Source**
+
+UnPublished script available at http://www.vigienature.fr/sites/vigienature/files/atoms/files/analysestoceps_0.zip
+
+First version written by romain.lorrilliere@mnhn.fr
+  ]]></help>
+  <expand macro="stoceps_bibref" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stoceps_macros.xml	Thu Apr 02 03:34:37 2020 -0400
@@ -0,0 +1,73 @@
+<macros>
+    <token name="@VERSION@">0.0.1</token>
+    <xml name="reshape_requirements">
+        <requirements>
+            <requirement type="package" version="0.8.8">r-reshape</requirement>
+            <requirement type="package" version="1.12.0">r-data.table</requirement>
+        </requirements>    
+    </xml>
+    <xml name="reshape2_requirements">
+        <requirements>
+            <requirement type="package" version="1.4.3">r-reshape2</requirement>
+        </requirements>    
+    </xml>
+    <xml name="mainglm_requirements">
+        <requirements>
+            <requirement type="package" version="3.0.0">r-ggplot2</requirement>
+            <requirement type="package" version="0.3_2">r-speedglm</requirement>
+            <requirement type="package" version="1.10_1">r-arm</requirement>
+            <requirement type="package" version="1.12.0">r-data.table</requirement>
+            <requirement type="package" version="1.4.3">r-reshape2</requirement>
+        </requirements>
+    </xml>
+    <xml name="temp_indic_requirements">
+        <requirements>
+            <requirement type="package" version="1.3_15">r-rodbc</requirement>
+            <requirement type="package" version="0.8.8">r-reshape</requirement>
+            <requirement type="package" version="1.12.0">r-data.table</requirement>
+            <requirement type="package" version="1.4_3">r-rgdal</requirement>
+            <requirement type="package" version="1.7.4">r-lubridate</requirement>
+            <requirement type="package" version="4.6_2">r-doby</requirement>
+            <requirement type="package" version="1.10_1">r-arm</requirement>
+            <requirement type="package" version="3.1.0">r-ggplot2</requirement>
+            <requirement type="package" version="1.0.0">r-scales</requirement>
+            <requirement type="package" version="1.8_24">r-mgcv</requirement>
+            <requirement type="package" version="1.8.4">r-plyr</requirement>
+            <requirement type="package" version="0.3_2">r-speedglm</requirement>
+            <requirement type="package" version="3.1_0">r-lmertest</requirement>
+            <requirement type="package" version="0.2.3">r-glmmtmb</requirement>
+        </requirements>
+    </xml>
+    <xml name="stoceps_input_filtered">
+        <param name="input" type="data" format="tabular" label="Stoc filtered input" help="Input Stoc count file, shaped and filtered with the 'preprocess population data' and 'filter species' tools." />
+    </xml>
+    <xml name="stoceps_advanced_params_select">
+        <param name="advanced" type="select" label="Specify advanced parameters">
+            <option value="simple" selected="true">No, use program defaults.</option>
+            <option value="advanced">Yes, see full parameter list.</option>
+        </param>        
+        <when value="simple">
+        </when>        
+    </xml>
+    <xml name="stoceps_compute_ic">
+        <param name="compute_ic" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="yes" label="Compute confidence intervals"/>
+    </xml>
+    <xml name="stoceps_filter_glmmtmb">
+        <filter> settings['advanced'] == 'advanced'</filter>
+        <filter> settings['method'] == 'glmmtmb'</filter>
+    </xml>
+    <xml name="stoceps_filter_gam">
+        <filter> settings['method'] == 'gam'</filter>
+    </xml>
+    <xml name="stoceps_bibref">
+        <citations>
+            <citation type="bibtex">
+	    @unpublished{stocepsromain,
+	    title={Vigie-Nature STOC unpublished scripts},
+            author={Lorrilliere, R},
+            url={http://www.vigienature.fr/sites/vigienature/files/atoms/files/analysestoceps_0.zip}
+            }
+            </citation>
+        </citations>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Datafilteredfortrendanalysis.tabular	Thu Apr 02 03:34:37 2020 -0400
@@ -0,0 +1,851 @@
+"carre"	"annee"	"espece"	"abond"
+"440072"	2014	"ALAARV"	4
+"440168"	2014	"ALAARV"	1
+"440168"	2017	"ALAARV"	2
+"440168"	2018	"ALAARV"	2
+"440211"	2014	"ALAARV"	10
+"440211"	2015	"ALAARV"	11
+"440211"	2016	"ALAARV"	11
+"440211"	2017	"ALAARV"	9
+"440211"	2018	"ALAARV"	10
+"440235"	2005	"ALAARV"	3
+"440235"	2006	"ALAARV"	6
+"440235"	2007	"ALAARV"	1
+"440235"	2008	"ALAARV"	1
+"440235"	2009	"ALAARV"	0
+"440278"	2008	"ALAARV"	7
+"440278"	2009	"ALAARV"	8
+"440278"	2010	"ALAARV"	7
+"440278"	2011	"ALAARV"	8
+"440278"	2012	"ALAARV"	7
+"440278"	2013	"ALAARV"	10
+"440278"	2014	"ALAARV"	6
+"440278"	2015	"ALAARV"	7
+"440278"	2016	"ALAARV"	7
+"440278"	2017	"ALAARV"	6
+"440278"	2018	"ALAARV"	7
+"440310"	2011	"ALAARV"	12
+"440310"	2012	"ALAARV"	15
+"440310"	2013	"ALAARV"	26
+"440310"	2014	"ALAARV"	14
+"440310"	2015	"ALAARV"	11
+"440310"	2016	"ALAARV"	14
+"440310"	2017	"ALAARV"	13
+"440310"	2018	"ALAARV"	12
+"440398"	2012	"ALAARV"	2
+"440398"	2013	"ALAARV"	2
+"440398"	2014	"ALAARV"	4
+"440411"	2004	"ALAARV"	16
+"440411"	2005	"ALAARV"	14
+"440411"	2006	"ALAARV"	18
+"440411"	2007	"ALAARV"	15
+"440411"	2008	"ALAARV"	12
+"440411"	2009	"ALAARV"	11
+"440411"	2010	"ALAARV"	11
+"440411"	2011	"ALAARV"	16
+"440411"	2012	"ALAARV"	18
+"440411"	2013	"ALAARV"	14
+"440411"	2014	"ALAARV"	15
+"440411"	2015	"ALAARV"	16
+"440411"	2016	"ALAARV"	9
+"440411"	2017	"ALAARV"	14
+"440411"	2018	"ALAARV"	12
+"440430"	2006	"ALAARV"	0
+"440430"	2007	"ALAARV"	0
+"440430"	2008	"ALAARV"	0
+"440430"	2010	"ALAARV"	0
+"440430"	2012	"ALAARV"	0
+"440430"	2014	"ALAARV"	0
+"440456"	2001	"ALAARV"	3
+"440456"	2002	"ALAARV"	4
+"440456"	2003	"ALAARV"	4
+"440456"	2004	"ALAARV"	6
+"440456"	2005	"ALAARV"	6
+"440456"	2006	"ALAARV"	4
+"440456"	2007	"ALAARV"	5
+"440456"	2008	"ALAARV"	2
+"440456"	2009	"ALAARV"	4
+"440456"	2010	"ALAARV"	2
+"440456"	2011	"ALAARV"	4
+"440456"	2012	"ALAARV"	0
+"440456"	2014	"ALAARV"	2
+"440462"	2001	"ALAARV"	3
+"440462"	2002	"ALAARV"	6
+"440462"	2003	"ALAARV"	5
+"440462"	2004	"ALAARV"	2
+"440462"	2005	"ALAARV"	0
+"440462"	2006	"ALAARV"	8
+"440462"	2007	"ALAARV"	0
+"440462"	2008	"ALAARV"	0
+"440462"	2009	"ALAARV"	4
+"440462"	2010	"ALAARV"	2
+"440462"	2011	"ALAARV"	2
+"440462"	2012	"ALAARV"	0
+"440462"	2013	"ALAARV"	3
+"440462"	2014	"ALAARV"	0
+"440480"	2001	"ALAARV"	14
+"440480"	2002	"ALAARV"	6
+"440480"	2003	"ALAARV"	5
+"440480"	2004	"ALAARV"	5
+"440480"	2005	"ALAARV"	7
+"440480"	2006	"ALAARV"	6
+"440480"	2007	"ALAARV"	7
+"440480"	2008	"ALAARV"	3
+"440480"	2009	"ALAARV"	3
+"440480"	2010	"ALAARV"	6
+"440480"	2011	"ALAARV"	5
+"440480"	2012	"ALAARV"	7
+"440480"	2013	"ALAARV"	1
+"440480"	2014	"ALAARV"	4
+"440480"	2015	"ALAARV"	0
+"440480"	2016	"ALAARV"	4
+"440480"	2017	"ALAARV"	3
+"440637"	2015	"ALAARV"	1
+"440637"	2016	"ALAARV"	2
+"440637"	2017	"ALAARV"	1
+"440637"	2018	"ALAARV"	2
+"440660"	2001	"ALAARV"	7
+"440660"	2002	"ALAARV"	9
+"440660"	2003	"ALAARV"	10
+"440660"	2004	"ALAARV"	6
+"440660"	2005	"ALAARV"	9
+"440660"	2006	"ALAARV"	8
+"440660"	2007	"ALAARV"	6
+"440660"	2008	"ALAARV"	9
+"440660"	2009	"ALAARV"	5
+"440660"	2010	"ALAARV"	10
+"440660"	2011	"ALAARV"	11
+"440660"	2012	"ALAARV"	10
+"440660"	2013	"ALAARV"	9
+"440660"	2014	"ALAARV"	6
+"440665"	2016	"ALAARV"	0
+"440665"	2017	"ALAARV"	0
+"440665"	2018	"ALAARV"	0
+"440817"	2001	"ALAARV"	1
+"440817"	2002	"ALAARV"	2
+"440817"	2003	"ALAARV"	1
+"440817"	2004	"ALAARV"	2
+"440817"	2005	"ALAARV"	0
+"440817"	2006	"ALAARV"	0
+"440817"	2007	"ALAARV"	1
+"440817"	2008	"ALAARV"	0
+"440817"	2009	"ALAARV"	1
+"440817"	2010	"ALAARV"	0
+"440817"	2011	"ALAARV"	0
+"440817"	2012	"ALAARV"	0
+"440817"	2013	"ALAARV"	0
+"440841"	2016	"ALAARV"	2
+"440841"	2017	"ALAARV"	8
+"440877"	2006	"ALAARV"	1
+"440877"	2007	"ALAARV"	0
+"440877"	2008	"ALAARV"	1
+"440877"	2009	"ALAARV"	0
+"440877"	2010	"ALAARV"	0
+"440877"	2011	"ALAARV"	0
+"440877"	2012	"ALAARV"	1
+"440877"	2013	"ALAARV"	0
+"440877"	2014	"ALAARV"	0
+"440877"	2015	"ALAARV"	0
+"440877"	2016	"ALAARV"	0
+"440877"	2017	"ALAARV"	1
+"440877"	2018	"ALAARV"	0
+"440891"	2002	"ALAARV"	12
+"440891"	2003	"ALAARV"	21
+"440891"	2004	"ALAARV"	14
+"440891"	2005	"ALAARV"	16
+"440891"	2006	"ALAARV"	7
+"440891"	2008	"ALAARV"	10
+"440891"	2009	"ALAARV"	10
+"440891"	2011	"ALAARV"	8
+"440891"	2013	"ALAARV"	5
+"440891"	2014	"ALAARV"	7
+"440891"	2015	"ALAARV"	6
+"440891"	2016	"ALAARV"	7
+"440891"	2017	"ALAARV"	4
+"440891"	2018	"ALAARV"	4
+"440932"	2015	"ALAARV"	3
+"440932"	2016	"ALAARV"	3
+"440932"	2017	"ALAARV"	1
+"440932"	2018	"ALAARV"	2
+"440989"	2018	"ALAARV"	0
+"440990"	2010	"ALAARV"	1
+"440990"	2011	"ALAARV"	2
+"440990"	2012	"ALAARV"	5
+"440990"	2013	"ALAARV"	2
+"440990"	2014	"ALAARV"	1
+"440990"	2015	"ALAARV"	7
+"440990"	2016	"ALAARV"	2
+"440990"	2017	"ALAARV"	4
+"440990"	2018	"ALAARV"	5
+"440993"	2001	"ALAARV"	0
+"440993"	2002	"ALAARV"	1
+"440993"	2003	"ALAARV"	1
+"440993"	2004	"ALAARV"	0
+"440993"	2005	"ALAARV"	2
+"440993"	2006	"ALAARV"	0
+"440993"	2007	"ALAARV"	2
+"440993"	2008	"ALAARV"	0
+"440993"	2009	"ALAARV"	0
+"440993"	2010	"ALAARV"	0
+"440993"	2011	"ALAARV"	1
+"440993"	2012	"ALAARV"	0
+"441008"	2002	"ALAARV"	12
+"441008"	2003	"ALAARV"	14
+"441008"	2004	"ALAARV"	11
+"441008"	2005	"ALAARV"	12
+"441008"	2014	"ALAARV"	7
+"441008"	2015	"ALAARV"	8
+"441008"	2016	"ALAARV"	3
+"441008"	2017	"ALAARV"	7
+"441008"	2018	"ALAARV"	9
+"441032"	2016	"ALAARV"	0
+"441032"	2017	"ALAARV"	0
+"441048"	2002	"ALAARV"	0
+"441048"	2003	"ALAARV"	0
+"441051"	2016	"ALAARV"	0
+"441051"	2017	"ALAARV"	2
+"441053"	2001	"ALAARV"	0
+"441053"	2002	"ALAARV"	0
+"441053"	2003	"ALAARV"	0
+"441053"	2004	"ALAARV"	0
+"441053"	2005	"ALAARV"	1
+"441053"	2006	"ALAARV"	0
+"441053"	2007	"ALAARV"	0
+"441053"	2008	"ALAARV"	0
+"441053"	2009	"ALAARV"	0
+"441053"	2010	"ALAARV"	0
+"441053"	2011	"ALAARV"	2
+"441053"	2012	"ALAARV"	0
+"441053"	2013	"ALAARV"	0
+"441053"	2014	"ALAARV"	0
+"441053"	2015	"ALAARV"	0
+"441053"	2016	"ALAARV"	0
+"441053"	2017	"ALAARV"	0
+"441053"	2018	"ALAARV"	0
+"441061"	2001	"ALAARV"	2
+"441061"	2002	"ALAARV"	0
+"441061"	2003	"ALAARV"	0
+"441061"	2004	"ALAARV"	0
+"441061"	2005	"ALAARV"	0
+"441061"	2006	"ALAARV"	0
+"441061"	2007	"ALAARV"	0
+"441061"	2008	"ALAARV"	0
+"441061"	2009	"ALAARV"	0
+"441061"	2010	"ALAARV"	0
+"441061"	2011	"ALAARV"	0
+"441061"	2012	"ALAARV"	0
+"441077"	2004	"ALAARV"	2
+"441077"	2005	"ALAARV"	2
+"441077"	2006	"ALAARV"	1
+"441077"	2007	"ALAARV"	1
+"441077"	2008	"ALAARV"	3
+"441077"	2009	"ALAARV"	1
+"441077"	2010	"ALAARV"	1
+"441077"	2011	"ALAARV"	0
+"441077"	2012	"ALAARV"	0
+"441077"	2013	"ALAARV"	0
+"441077"	2015	"ALAARV"	0
+"441077"	2016	"ALAARV"	1
+"441077"	2017	"ALAARV"	0
+"441077"	2018	"ALAARV"	0
+"441082"	2001	"ALAARV"	2
+"441082"	2002	"ALAARV"	5
+"441082"	2003	"ALAARV"	0
+"441082"	2004	"ALAARV"	1
+"441082"	2005	"ALAARV"	2
+"441082"	2006	"ALAARV"	0
+"441082"	2007	"ALAARV"	1
+"441082"	2008	"ALAARV"	0
+"441082"	2009	"ALAARV"	0
+"441082"	2010	"ALAARV"	0
+"441082"	2012	"ALAARV"	0
+"441082"	2013	"ALAARV"	0
+"441082"	2014	"ALAARV"	0
+"441082"	2015	"ALAARV"	0
+"441109"	2002	"ALAARV"	0
+"441109"	2003	"ALAARV"	0
+"441109"	2004	"ALAARV"	0
+"441109"	2005	"ALAARV"	1
+"441109"	2006	"ALAARV"	0
+"441109"	2007	"ALAARV"	0
+"441109"	2008	"ALAARV"	0
+"441109"	2009	"ALAARV"	0
+"441109"	2010	"ALAARV"	0
+"441109"	2011	"ALAARV"	0
+"441109"	2012	"ALAARV"	0
+"441109"	2013	"ALAARV"	0
+"441109"	2014	"ALAARV"	0
+"441109"	2016	"ALAARV"	1
+"441109"	2017	"ALAARV"	0
+"441109"	2018	"ALAARV"	0
+"441132"	2002	"ALAARV"	3
+"441132"	2003	"ALAARV"	3
+"441132"	2004	"ALAARV"	3
+"441132"	2005	"ALAARV"	6
+"441132"	2006	"ALAARV"	6
+"441132"	2007	"ALAARV"	3
+"441132"	2008	"ALAARV"	1
+"441132"	2009	"ALAARV"	1
+"441132"	2010	"ALAARV"	0
+"441132"	2011	"ALAARV"	2
+"441132"	2012	"ALAARV"	0
+"441132"	2013	"ALAARV"	0
+"441132"	2014	"ALAARV"	0
+"441132"	2016	"ALAARV"	2
+"441132"	2017	"ALAARV"	2
+"441132"	2018	"ALAARV"	0
+"441153"	2009	"ALAARV"	0
+"441153"	2010	"ALAARV"	0
+"441153"	2011	"ALAARV"	0
+"441153"	2012	"ALAARV"	0
+"441178"	2001	"ALAARV"	4
+"441178"	2002	"ALAARV"	0
+"441178"	2003	"ALAARV"	5
+"441178"	2004	"ALAARV"	0
+"441178"	2005	"ALAARV"	1
+"441178"	2006	"ALAARV"	0
+"441178"	2007	"ALAARV"	2
+"441178"	2008	"ALAARV"	1
+"441178"	2009	"ALAARV"	0
+"441178"	2010	"ALAARV"	1
+"441178"	2011	"ALAARV"	0
+"441178"	2012	"ALAARV"	2
+"441178"	2013	"ALAARV"	0
+"441178"	2014	"ALAARV"	0
+"441178"	2015	"ALAARV"	1
+"441178"	2016	"ALAARV"	0
+"441178"	2017	"ALAARV"	0
+"441178"	2018	"ALAARV"	1
+"441217"	2003	"ALAARV"	4
+"441217"	2004	"ALAARV"	5
+"441217"	2005	"ALAARV"	2
+"441217"	2006	"ALAARV"	3
+"441217"	2007	"ALAARV"	3
+"441217"	2008	"ALAARV"	5
+"441217"	2011	"ALAARV"	6
+"441217"	2014	"ALAARV"	2
+"441217"	2016	"ALAARV"	5
+"441217"	2018	"ALAARV"	4
+"441233"	2001	"ALAARV"	2
+"441233"	2002	"ALAARV"	1
+"441233"	2003	"ALAARV"	1
+"441233"	2004	"ALAARV"	0
+"441233"	2005	"ALAARV"	1
+"441233"	2006	"ALAARV"	0
+"441233"	2007	"ALAARV"	0
+"441233"	2008	"ALAARV"	1
+"441233"	2009	"ALAARV"	0
+"441236"	2004	"ALAARV"	0
+"441236"	2005	"ALAARV"	0
+"441236"	2006	"ALAARV"	0
+"441236"	2007	"ALAARV"	0
+"441236"	2008	"ALAARV"	0
+"441236"	2009	"ALAARV"	0
+"441236"	2010	"ALAARV"	0
+"441236"	2011	"ALAARV"	0
+"441236"	2012	"ALAARV"	0
+"441236"	2013	"ALAARV"	0
+"441242"	2002	"ALAARV"	0
+"441242"	2003	"ALAARV"	0
+"441242"	2004	"ALAARV"	0
+"441242"	2005	"ALAARV"	0
+"441242"	2006	"ALAARV"	0
+"441242"	2007	"ALAARV"	0
+"441242"	2008	"ALAARV"	0
+"441242"	2009	"ALAARV"	0
+"441242"	2010	"ALAARV"	0
+"441242"	2011	"ALAARV"	0
+"441242"	2012	"ALAARV"	0
+"441242"	2013	"ALAARV"	0
+"441242"	2014	"ALAARV"	0
+"441242"	2015	"ALAARV"	0
+"441242"	2016	"ALAARV"	0
+"441242"	2017	"ALAARV"	0
+"441242"	2018	"ALAARV"	0
+"441259"	2018	"ALAARV"	2
+"441265"	2004	"ALAARV"	2
+"441265"	2005	"ALAARV"	2
+"441265"	2006	"ALAARV"	2
+"441265"	2007	"ALAARV"	0
+"441265"	2008	"ALAARV"	1
+"441265"	2009	"ALAARV"	1
+"441265"	2010	"ALAARV"	1
+"441265"	2011	"ALAARV"	2
+"441265"	2012	"ALAARV"	0
+"441265"	2013	"ALAARV"	1
+"441307"	2016	"ALAARV"	2
+"441307"	2017	"ALAARV"	2
+"441307"	2018	"ALAARV"	1
+"441311"	2015	"ALAARV"	0
+"441311"	2016	"ALAARV"	0
+"441311"	2017	"ALAARV"	0
+"441311"	2018	"ALAARV"	0
+"441340"	2004	"ALAARV"	0
+"441340"	2005	"ALAARV"	0
+"441340"	2006	"ALAARV"	0
+"441340"	2007	"ALAARV"	0
+"441340"	2008	"ALAARV"	0
+"441340"	2009	"ALAARV"	0
+"441340"	2010	"ALAARV"	0
+"441340"	2011	"ALAARV"	0
+"441340"	2012	"ALAARV"	0
+"441340"	2013	"ALAARV"	0
+"441340"	2014	"ALAARV"	0
+"441340"	2015	"ALAARV"	0
+"441376"	2014	"ALAARV"	0
+"441376"	2015	"ALAARV"	0
+"441376"	2016	"ALAARV"	0
+"441376"	2017	"ALAARV"	0
+"441376"	2018	"ALAARV"	0
+"441558"	2001	"ALAARV"	2
+"441558"	2002	"ALAARV"	1
+"441558"	2003	"ALAARV"	1
+"441558"	2004	"ALAARV"	2
+"441558"	2005	"ALAARV"	1
+"441558"	2006	"ALAARV"	1
+"441558"	2007	"ALAARV"	2
+"441558"	2008	"ALAARV"	1
+"441558"	2009	"ALAARV"	1
+"441558"	2011	"ALAARV"	1
+"441558"	2012	"ALAARV"	0
+"441594"	2004	"ALAARV"	12
+"441594"	2005	"ALAARV"	9
+"441594"	2006	"ALAARV"	10
+"441594"	2007	"ALAARV"	5
+"441594"	2008	"ALAARV"	6
+"441594"	2009	"ALAARV"	1
+"441640"	2012	"ALAARV"	12
+"441680"	2012	"ALAARV"	2
+"441680"	2013	"ALAARV"	1
+"441680"	2014	"ALAARV"	0
+"441680"	2015	"ALAARV"	1
+"441680"	2016	"ALAARV"	0
+"441680"	2017	"ALAARV"	0
+"441680"	2018	"ALAARV"	0
+"Ile de"	2018	"ALAARV"	3
+"Le Mas"	2018	"ALAARV"	0
+"440072"	2014	"PARCAE"	5
+"440168"	2014	"PARCAE"	10
+"440168"	2017	"PARCAE"	12
+"440168"	2018	"PARCAE"	20
+"440211"	2014	"PARCAE"	5
+"440211"	2015	"PARCAE"	6
+"440211"	2016	"PARCAE"	2
+"440211"	2017	"PARCAE"	2
+"440211"	2018	"PARCAE"	8
+"440235"	2005	"PARCAE"	15
+"440235"	2006	"PARCAE"	12
+"440235"	2007	"PARCAE"	10
+"440235"	2008	"PARCAE"	12
+"440235"	2009	"PARCAE"	13
+"440278"	2008	"PARCAE"	7
+"440278"	2009	"PARCAE"	14
+"440278"	2010	"PARCAE"	5
+"440278"	2011	"PARCAE"	7
+"440278"	2012	"PARCAE"	8
+"440278"	2013	"PARCAE"	8
+"440278"	2014	"PARCAE"	7
+"440278"	2015	"PARCAE"	7
+"440278"	2016	"PARCAE"	7
+"440278"	2017	"PARCAE"	2
+"440278"	2018	"PARCAE"	7
+"440310"	2011	"PARCAE"	5
+"440310"	2012	"PARCAE"	13
+"440310"	2013	"PARCAE"	12
+"440310"	2014	"PARCAE"	8
+"440310"	2015	"PARCAE"	8
+"440310"	2016	"PARCAE"	10
+"440310"	2017	"PARCAE"	12
+"440310"	2018	"PARCAE"	11
+"440398"	2012	"PARCAE"	2
+"440398"	2013	"PARCAE"	2
+"440398"	2014	"PARCAE"	6
+"440411"	2004	"PARCAE"	5
+"440411"	2005	"PARCAE"	8
+"440411"	2006	"PARCAE"	10
+"440411"	2007	"PARCAE"	7
+"440411"	2008	"PARCAE"	9
+"440411"	2009	"PARCAE"	5
+"440411"	2010	"PARCAE"	2
+"440411"	2011	"PARCAE"	5
+"440411"	2012	"PARCAE"	2
+"440411"	2013	"PARCAE"	11
+"440411"	2014	"PARCAE"	9
+"440411"	2015	"PARCAE"	3
+"440411"	2016	"PARCAE"	3
+"440411"	2017	"PARCAE"	13
+"440411"	2018	"PARCAE"	6
+"440430"	2006	"PARCAE"	5
+"440430"	2007	"PARCAE"	4
+"440430"	2008	"PARCAE"	7
+"440430"	2010	"PARCAE"	3
+"440430"	2012	"PARCAE"	2
+"440430"	2014	"PARCAE"	3
+"440456"	2001	"PARCAE"	10
+"440456"	2002	"PARCAE"	11
+"440456"	2003	"PARCAE"	14
+"440456"	2004	"PARCAE"	16
+"440456"	2005	"PARCAE"	13
+"440456"	2006	"PARCAE"	9
+"440456"	2007	"PARCAE"	11
+"440456"	2008	"PARCAE"	8
+"440456"	2009	"PARCAE"	10
+"440456"	2010	"PARCAE"	15
+"440456"	2011	"PARCAE"	14
+"440456"	2012	"PARCAE"	11
+"440456"	2014	"PARCAE"	12
+"440462"	2001	"PARCAE"	3
+"440462"	2002	"PARCAE"	5
+"440462"	2003	"PARCAE"	8
+"440462"	2004	"PARCAE"	6
+"440462"	2005	"PARCAE"	13
+"440462"	2006	"PARCAE"	11
+"440462"	2007	"PARCAE"	13
+"440462"	2008	"PARCAE"	12
+"440462"	2009	"PARCAE"	11
+"440462"	2010	"PARCAE"	18
+"440462"	2011	"PARCAE"	7
+"440462"	2012	"PARCAE"	14
+"440462"	2013	"PARCAE"	9
+"440462"	2014	"PARCAE"	11
+"440480"	2001	"PARCAE"	3
+"440480"	2002	"PARCAE"	7
+"440480"	2003	"PARCAE"	4
+"440480"	2004	"PARCAE"	3
+"440480"	2005	"PARCAE"	8
+"440480"	2006	"PARCAE"	1
+"440480"	2007	"PARCAE"	2
+"440480"	2008	"PARCAE"	8
+"440480"	2009	"PARCAE"	2
+"440480"	2010	"PARCAE"	8
+"440480"	2011	"PARCAE"	1
+"440480"	2012	"PARCAE"	10
+"440480"	2013	"PARCAE"	5
+"440480"	2014	"PARCAE"	5
+"440480"	2015	"PARCAE"	11
+"440480"	2016	"PARCAE"	5
+"440480"	2017	"PARCAE"	6
+"440637"	2015	"PARCAE"	15
+"440637"	2016	"PARCAE"	15
+"440637"	2017	"PARCAE"	7
+"440637"	2018	"PARCAE"	6
+"440660"	2001	"PARCAE"	10
+"440660"	2002	"PARCAE"	8
+"440660"	2003	"PARCAE"	5
+"440660"	2004	"PARCAE"	3
+"440660"	2005	"PARCAE"	11
+"440660"	2006	"PARCAE"	9
+"440660"	2007	"PARCAE"	4
+"440660"	2008	"PARCAE"	15
+"440660"	2009	"PARCAE"	3
+"440660"	2010	"PARCAE"	4
+"440660"	2011	"PARCAE"	4
+"440660"	2012	"PARCAE"	2
+"440660"	2013	"PARCAE"	7
+"440660"	2014	"PARCAE"	10
+"440665"	2016	"PARCAE"	14
+"440665"	2017	"PARCAE"	12
+"440665"	2018	"PARCAE"	7
+"440817"	2001	"PARCAE"	10
+"440817"	2002	"PARCAE"	15
+"440817"	2003	"PARCAE"	14
+"440817"	2004	"PARCAE"	24
+"440817"	2005	"PARCAE"	12
+"440817"	2006	"PARCAE"	6
+"440817"	2007	"PARCAE"	5
+"440817"	2008	"PARCAE"	11
+"440817"	2009	"PARCAE"	13
+"440817"	2010	"PARCAE"	8
+"440817"	2011	"PARCAE"	6
+"440817"	2012	"PARCAE"	4
+"440817"	2013	"PARCAE"	4
+"440841"	2016	"PARCAE"	13
+"440841"	2017	"PARCAE"	20
+"440877"	2006	"PARCAE"	4
+"440877"	2007	"PARCAE"	8
+"440877"	2008	"PARCAE"	8
+"440877"	2009	"PARCAE"	6
+"440877"	2010	"PARCAE"	3
+"440877"	2011	"PARCAE"	3
+"440877"	2012	"PARCAE"	8
+"440877"	2013	"PARCAE"	1
+"440877"	2014	"PARCAE"	3
+"440877"	2015	"PARCAE"	4
+"440877"	2016	"PARCAE"	4
+"440877"	2017	"PARCAE"	5
+"440877"	2018	"PARCAE"	10
+"440891"	2002	"PARCAE"	1
+"440891"	2003	"PARCAE"	2
+"440891"	2004	"PARCAE"	5
+"440891"	2005	"PARCAE"	4
+"440891"	2006	"PARCAE"	1
+"440891"	2008	"PARCAE"	4
+"440891"	2009	"PARCAE"	4
+"440891"	2011	"PARCAE"	11
+"440891"	2013	"PARCAE"	5
+"440891"	2014	"PARCAE"	8
+"440891"	2015	"PARCAE"	2
+"440891"	2016	"PARCAE"	4
+"440891"	2017	"PARCAE"	3
+"440891"	2018	"PARCAE"	5
+"440932"	2015	"PARCAE"	11
+"440932"	2016	"PARCAE"	14
+"440932"	2017	"PARCAE"	16
+"440932"	2018	"PARCAE"	15
+"440989"	2018	"PARCAE"	8
+"440990"	2010	"PARCAE"	1
+"440990"	2011	"PARCAE"	15
+"440990"	2012	"PARCAE"	7
+"440990"	2013	"PARCAE"	10
+"440990"	2014	"PARCAE"	26
+"440990"	2015	"PARCAE"	12
+"440990"	2016	"PARCAE"	9
+"440990"	2017	"PARCAE"	7
+"440990"	2018	"PARCAE"	7
+"440993"	2001	"PARCAE"	6
+"440993"	2002	"PARCAE"	5
+"440993"	2003	"PARCAE"	7
+"440993"	2004	"PARCAE"	7
+"440993"	2005	"PARCAE"	10
+"440993"	2006	"PARCAE"	10
+"440993"	2007	"PARCAE"	8
+"440993"	2008	"PARCAE"	8
+"440993"	2009	"PARCAE"	8
+"440993"	2010	"PARCAE"	16
+"440993"	2011	"PARCAE"	6
+"440993"	2012	"PARCAE"	2
+"441008"	2002	"PARCAE"	0
+"441008"	2003	"PARCAE"	0
+"441008"	2004	"PARCAE"	0
+"441008"	2005	"PARCAE"	0
+"441008"	2014	"PARCAE"	0
+"441008"	2015	"PARCAE"	0
+"441008"	2016	"PARCAE"	0
+"441008"	2017	"PARCAE"	0
+"441008"	2018	"PARCAE"	0
+"441032"	2016	"PARCAE"	7
+"441032"	2017	"PARCAE"	8
+"441048"	2002	"PARCAE"	19
+"441048"	2003	"PARCAE"	0
+"441051"	2016	"PARCAE"	3
+"441051"	2017	"PARCAE"	3
+"441053"	2001	"PARCAE"	2
+"441053"	2002	"PARCAE"	4
+"441053"	2003	"PARCAE"	4
+"441053"	2004	"PARCAE"	1
+"441053"	2005	"PARCAE"	5
+"441053"	2006	"PARCAE"	4
+"441053"	2007	"PARCAE"	5
+"441053"	2008	"PARCAE"	5
+"441053"	2009	"PARCAE"	0
+"441053"	2010	"PARCAE"	3
+"441053"	2011	"PARCAE"	3
+"441053"	2012	"PARCAE"	4
+"441053"	2013	"PARCAE"	0
+"441053"	2014	"PARCAE"	2
+"441053"	2015	"PARCAE"	3
+"441053"	2016	"PARCAE"	2
+"441053"	2017	"PARCAE"	2
+"441053"	2018	"PARCAE"	2
+"441061"	2001	"PARCAE"	1
+"441061"	2002	"PARCAE"	2
+"441061"	2003	"PARCAE"	5
+"441061"	2004	"PARCAE"	1
+"441061"	2005	"PARCAE"	1
+"441061"	2006	"PARCAE"	4
+"441061"	2007	"PARCAE"	7
+"441061"	2008	"PARCAE"	7
+"441061"	2009	"PARCAE"	2
+"441061"	2010	"PARCAE"	3
+"441061"	2011	"PARCAE"	9
+"441061"	2012	"PARCAE"	3
+"441077"	2004	"PARCAE"	16
+"441077"	2005	"PARCAE"	15
+"441077"	2006	"PARCAE"	19
+"441077"	2007	"PARCAE"	6
+"441077"	2008	"PARCAE"	16
+"441077"	2009	"PARCAE"	9
+"441077"	2010	"PARCAE"	19
+"441077"	2011	"PARCAE"	16
+"441077"	2012	"PARCAE"	10
+"441077"	2013	"PARCAE"	16
+"441077"	2015	"PARCAE"	8
+"441077"	2016	"PARCAE"	17
+"441077"	2017	"PARCAE"	6
+"441077"	2018	"PARCAE"	7
+"441082"	2001	"PARCAE"	7
+"441082"	2002	"PARCAE"	6
+"441082"	2003	"PARCAE"	6
+"441082"	2004	"PARCAE"	5
+"441082"	2005	"PARCAE"	15
+"441082"	2006	"PARCAE"	16
+"441082"	2007	"PARCAE"	13
+"441082"	2008	"PARCAE"	13
+"441082"	2009	"PARCAE"	12
+"441082"	2010	"PARCAE"	15
+"441082"	2012	"PARCAE"	10
+"441082"	2013	"PARCAE"	5
+"441082"	2014	"PARCAE"	10
+"441082"	2015	"PARCAE"	1
+"441109"	2002	"PARCAE"	11
+"441109"	2003	"PARCAE"	12
+"441109"	2004	"PARCAE"	9
+"441109"	2005	"PARCAE"	12
+"441109"	2006	"PARCAE"	20
+"441109"	2007	"PARCAE"	12
+"441109"	2008	"PARCAE"	12
+"441109"	2009	"PARCAE"	10
+"441109"	2010	"PARCAE"	11
+"441109"	2011	"PARCAE"	8
+"441109"	2012	"PARCAE"	7
+"441109"	2013	"PARCAE"	13
+"441109"	2014	"PARCAE"	10
+"441109"	2016	"PARCAE"	17
+"441109"	2017	"PARCAE"	18
+"441109"	2018	"PARCAE"	18
+"441132"	2002	"PARCAE"	3
+"441132"	2003	"PARCAE"	1
+"441132"	2004	"PARCAE"	4
+"441132"	2005	"PARCAE"	1
+"441132"	2006	"PARCAE"	3
+"441132"	2007	"PARCAE"	2
+"441132"	2008	"PARCAE"	2
+"441132"	2009	"PARCAE"	2
+"441132"	2010	"PARCAE"	5
+"441132"	2011	"PARCAE"	3
+"441132"	2012	"PARCAE"	11
+"441132"	2013	"PARCAE"	3
+"441132"	2014	"PARCAE"	1
+"441132"	2016	"PARCAE"	6
+"441132"	2017	"PARCAE"	20
+"441132"	2018	"PARCAE"	1
+"441153"	2009	"PARCAE"	14
+"441153"	2010	"PARCAE"	38
+"441153"	2011	"PARCAE"	11
+"441153"	2012	"PARCAE"	21
+"441178"	2001	"PARCAE"	4
+"441178"	2002	"PARCAE"	11
+"441178"	2003	"PARCAE"	12
+"441178"	2004	"PARCAE"	8
+"441178"	2005	"PARCAE"	20
+"441178"	2006	"PARCAE"	23
+"441178"	2007	"PARCAE"	18
+"441178"	2008	"PARCAE"	14
+"441178"	2009	"PARCAE"	10
+"441178"	2010	"PARCAE"	15
+"441178"	2011	"PARCAE"	9
+"441178"	2012	"PARCAE"	8
+"441178"	2013	"PARCAE"	15
+"441178"	2014	"PARCAE"	10
+"441178"	2015	"PARCAE"	10
+"441178"	2016	"PARCAE"	4
+"441178"	2017	"PARCAE"	13
+"441178"	2018	"PARCAE"	22
+"441217"	2003	"PARCAE"	13
+"441217"	2004	"PARCAE"	4
+"441217"	2005	"PARCAE"	6
+"441217"	2006	"PARCAE"	3
+"441217"	2007	"PARCAE"	5
+"441217"	2008	"PARCAE"	5
+"441217"	2011	"PARCAE"	2
+"441217"	2014	"PARCAE"	6
+"441217"	2016	"PARCAE"	4
+"441217"	2018	"PARCAE"	8
+"441233"	2001	"PARCAE"	3
+"441233"	2002	"PARCAE"	7
+"441233"	2003	"PARCAE"	5
+"441233"	2004	"PARCAE"	2
+"441233"	2005	"PARCAE"	3
+"441233"	2006	"PARCAE"	2
+"441233"	2007	"PARCAE"	1
+"441233"	2008	"PARCAE"	2
+"441233"	2009	"PARCAE"	7
+"441236"	2004	"PARCAE"	7
+"441236"	2005	"PARCAE"	10
+"441236"	2006	"PARCAE"	4
+"441236"	2007	"PARCAE"	6
+"441236"	2008	"PARCAE"	9
+"441236"	2009	"PARCAE"	14
+"441236"	2010	"PARCAE"	4
+"441236"	2011	"PARCAE"	16
+"441236"	2012	"PARCAE"	10
+"441236"	2013	"PARCAE"	8
+"441242"	2002	"PARCAE"	3
+"441242"	2003	"PARCAE"	5
+"441242"	2004	"PARCAE"	1
+"441242"	2005	"PARCAE"	3
+"441242"	2006	"PARCAE"	6
+"441242"	2007	"PARCAE"	6
+"441242"	2008	"PARCAE"	8
+"441242"	2009	"PARCAE"	7
+"441242"	2010	"PARCAE"	3
+"441242"	2011	"PARCAE"	6
+"441242"	2012	"PARCAE"	9
+"441242"	2013	"PARCAE"	9
+"441242"	2014	"PARCAE"	10
+"441242"	2015	"PARCAE"	9
+"441242"	2016	"PARCAE"	5
+"441242"	2017	"PARCAE"	5
+"441242"	2018	"PARCAE"	4
+"441259"	2018	"PARCAE"	14
+"441265"	2004	"PARCAE"	6
+"441265"	2005	"PARCAE"	3
+"441265"	2006	"PARCAE"	0
+"441265"	2007	"PARCAE"	4
+"441265"	2008	"PARCAE"	7
+"441265"	2009	"PARCAE"	4
+"441265"	2010	"PARCAE"	2
+"441265"	2011	"PARCAE"	13
+"441265"	2012	"PARCAE"	5
+"441265"	2013	"PARCAE"	4
+"441307"	2016	"PARCAE"	10
+"441307"	2017	"PARCAE"	3
+"441307"	2018	"PARCAE"	6
+"441311"	2015	"PARCAE"	12
+"441311"	2016	"PARCAE"	6
+"441311"	2017	"PARCAE"	6
+"441311"	2018	"PARCAE"	15
+"441340"	2004	"PARCAE"	10
+"441340"	2005	"PARCAE"	10
+"441340"	2006	"PARCAE"	8
+"441340"	2007	"PARCAE"	7
+"441340"	2008	"PARCAE"	6
+"441340"	2009	"PARCAE"	7
+"441340"	2010	"PARCAE"	2
+"441340"	2011	"PARCAE"	6
+"441340"	2012	"PARCAE"	6
+"441340"	2013	"PARCAE"	7
+"441340"	2014	"PARCAE"	6
+"441340"	2015	"PARCAE"	5
+"441376"	2014	"PARCAE"	15
+"441376"	2015	"PARCAE"	10
+"441376"	2016	"PARCAE"	7
+"441376"	2017	"PARCAE"	13
+"441376"	2018	"PARCAE"	18
+"441558"	2001	"PARCAE"	6
+"441558"	2002	"PARCAE"	0
+"441558"	2003	"PARCAE"	0
+"441558"	2004	"PARCAE"	3
+"441558"	2005	"PARCAE"	1
+"441558"	2006	"PARCAE"	3
+"441558"	2007	"PARCAE"	4
+"441558"	2008	"PARCAE"	4
+"441558"	2009	"PARCAE"	5
+"441558"	2011	"PARCAE"	0
+"441558"	2012	"PARCAE"	1
+"441594"	2004	"PARCAE"	3
+"441594"	2005	"PARCAE"	3
+"441594"	2006	"PARCAE"	1
+"441594"	2007	"PARCAE"	3
+"441594"	2008	"PARCAE"	6
+"441594"	2009	"PARCAE"	5
+"441640"	2012	"PARCAE"	4
+"441680"	2012	"PARCAE"	4
+"441680"	2013	"PARCAE"	7
+"441680"	2014	"PARCAE"	7
+"441680"	2015	"PARCAE"	5
+"441680"	2016	"PARCAE"	2
+"441680"	2017	"PARCAE"	5
+"441680"	2018	"PARCAE"	7
+"Ile de"	2018	"PARCAE"	7
+"Le Mas"	2018	"PARCAE"	7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Datatransformedforfiltering_trendanalysis.tabular	Thu Apr 02 03:34:37 2020 -0400
@@ -0,0 +1,426 @@
+"carre"	"annee"	"ALAARV"	"PARCAE"
+"440072"	2014	4	5
+"440168"	2014	1	10
+"440168"	2017	2	12
+"440168"	2018	2	20
+"440211"	2014	10	5
+"440211"	2015	11	6
+"440211"	2016	11	2
+"440211"	2017	9	2
+"440211"	2018	10	8
+"440235"	2005	3	15
+"440235"	2006	6	12
+"440235"	2007	1	10
+"440235"	2008	1	12
+"440235"	2009	0	13
+"440278"	2008	7	7
+"440278"	2009	8	14
+"440278"	2010	7	5
+"440278"	2011	8	7
+"440278"	2012	7	8
+"440278"	2013	10	8
+"440278"	2014	6	7
+"440278"	2015	7	7
+"440278"	2016	7	7
+"440278"	2017	6	2
+"440278"	2018	7	7
+"440310"	2011	12	5
+"440310"	2012	15	13
+"440310"	2013	26	12
+"440310"	2014	14	8
+"440310"	2015	11	8
+"440310"	2016	14	10
+"440310"	2017	13	12
+"440310"	2018	12	11
+"440398"	2012	2	2
+"440398"	2013	2	2
+"440398"	2014	4	6
+"440411"	2004	16	5
+"440411"	2005	14	8
+"440411"	2006	18	10
+"440411"	2007	15	7
+"440411"	2008	12	9
+"440411"	2009	11	5
+"440411"	2010	11	2
+"440411"	2011	16	5
+"440411"	2012	18	2
+"440411"	2013	14	11
+"440411"	2014	15	9
+"440411"	2015	16	3
+"440411"	2016	9	3
+"440411"	2017	14	13
+"440411"	2018	12	6
+"440430"	2006	0	5
+"440430"	2007	0	4
+"440430"	2008	0	7
+"440430"	2010	0	3
+"440430"	2012	0	2
+"440430"	2014	0	3
+"440456"	2001	3	10
+"440456"	2002	4	11
+"440456"	2003	4	14
+"440456"	2004	6	16
+"440456"	2005	6	13
+"440456"	2006	4	9
+"440456"	2007	5	11
+"440456"	2008	2	8
+"440456"	2009	4	10
+"440456"	2010	2	15
+"440456"	2011	4	14
+"440456"	2012	0	11
+"440456"	2014	2	12
+"440462"	2001	3	3
+"440462"	2002	6	5
+"440462"	2003	5	8
+"440462"	2004	2	6
+"440462"	2005	0	13
+"440462"	2006	8	11
+"440462"	2007	0	13
+"440462"	2008	0	12
+"440462"	2009	4	11
+"440462"	2010	2	18
+"440462"	2011	2	7
+"440462"	2012	0	14
+"440462"	2013	3	9
+"440462"	2014	0	11
+"440480"	2001	14	3
+"440480"	2002	6	7
+"440480"	2003	5	4
+"440480"	2004	5	3
+"440480"	2005	7	8
+"440480"	2006	6	1
+"440480"	2007	7	2
+"440480"	2008	3	8
+"440480"	2009	3	2
+"440480"	2010	6	8
+"440480"	2011	5	1
+"440480"	2012	7	10
+"440480"	2013	1	5
+"440480"	2014	4	5
+"440480"	2015	0	11
+"440480"	2016	4	5
+"440480"	2017	3	6
+"440637"	2015	1	15
+"440637"	2016	2	15
+"440637"	2017	1	7
+"440637"	2018	2	6
+"440660"	2001	7	10
+"440660"	2002	9	8
+"440660"	2003	10	5
+"440660"	2004	6	3
+"440660"	2005	9	11
+"440660"	2006	8	9
+"440660"	2007	6	4
+"440660"	2008	9	15
+"440660"	2009	5	3
+"440660"	2010	10	4
+"440660"	2011	11	4
+"440660"	2012	10	2
+"440660"	2013	9	7
+"440660"	2014	6	10
+"440665"	2016	0	14
+"440665"	2017	0	12
+"440665"	2018	0	7
+"440817"	2001	1	10
+"440817"	2002	2	15
+"440817"	2003	1	14
+"440817"	2004	2	24
+"440817"	2005	0	12
+"440817"	2006	0	6
+"440817"	2007	1	5
+"440817"	2008	0	11
+"440817"	2009	1	13
+"440817"	2010	0	8
+"440817"	2011	0	6
+"440817"	2012	0	4
+"440817"	2013	0	4
+"440841"	2016	2	13
+"440841"	2017	8	20
+"440877"	2006	1	4
+"440877"	2007	0	8
+"440877"	2008	1	8
+"440877"	2009	0	6
+"440877"	2010	0	3
+"440877"	2011	0	3
+"440877"	2012	1	8
+"440877"	2013	0	1
+"440877"	2014	0	3
+"440877"	2015	0	4
+"440877"	2016	0	4
+"440877"	2017	1	5
+"440877"	2018	0	10
+"440891"	2002	12	1
+"440891"	2003	21	2
+"440891"	2004	14	5
+"440891"	2005	16	4
+"440891"	2006	7	1
+"440891"	2008	10	4
+"440891"	2009	10	4
+"440891"	2011	8	11
+"440891"	2013	5	5
+"440891"	2014	7	8
+"440891"	2015	6	2
+"440891"	2016	7	4
+"440891"	2017	4	3
+"440891"	2018	4	5
+"440932"	2015	3	11
+"440932"	2016	3	14
+"440932"	2017	1	16
+"440932"	2018	2	15
+"440989"	2018	0	8
+"440990"	2010	1	1
+"440990"	2011	2	15
+"440990"	2012	5	7
+"440990"	2013	2	10
+"440990"	2014	1	26
+"440990"	2015	7	12
+"440990"	2016	2	9
+"440990"	2017	4	7
+"440990"	2018	5	7
+"440993"	2001	0	6
+"440993"	2002	1	5
+"440993"	2003	1	7
+"440993"	2004	0	7
+"440993"	2005	2	10
+"440993"	2006	0	10
+"440993"	2007	2	8
+"440993"	2008	0	8
+"440993"	2009	0	8
+"440993"	2010	0	16
+"440993"	2011	1	6
+"440993"	2012	0	2
+"441008"	2002	12	0
+"441008"	2003	14	0
+"441008"	2004	11	0
+"441008"	2005	12	0
+"441008"	2014	7	0
+"441008"	2015	8	0
+"441008"	2016	3	0
+"441008"	2017	7	0
+"441008"	2018	9	0
+"441032"	2016	0	7
+"441032"	2017	0	8
+"441048"	2002	0	19
+"441048"	2003	0	0
+"441051"	2016	0	3
+"441051"	2017	2	3
+"441053"	2001	0	2
+"441053"	2002	0	4
+"441053"	2003	0	4
+"441053"	2004	0	1
+"441053"	2005	1	5
+"441053"	2006	0	4
+"441053"	2007	0	5
+"441053"	2008	0	5
+"441053"	2009	0	0
+"441053"	2010	0	3
+"441053"	2011	2	3
+"441053"	2012	0	4
+"441053"	2013	0	0
+"441053"	2014	0	2
+"441053"	2015	0	3
+"441053"	2016	0	2
+"441053"	2017	0	2
+"441053"	2018	0	2
+"441061"	2001	2	1
+"441061"	2002	0	2
+"441061"	2003	0	5
+"441061"	2004	0	1
+"441061"	2005	0	1
+"441061"	2006	0	4
+"441061"	2007	0	7
+"441061"	2008	0	7
+"441061"	2009	0	2
+"441061"	2010	0	3
+"441061"	2011	0	9
+"441061"	2012	0	3
+"441077"	2004	2	16
+"441077"	2005	2	15
+"441077"	2006	1	19
+"441077"	2007	1	6
+"441077"	2008	3	16
+"441077"	2009	1	9
+"441077"	2010	1	19
+"441077"	2011	0	16
+"441077"	2012	0	10
+"441077"	2013	0	16
+"441077"	2015	0	8
+"441077"	2016	1	17
+"441077"	2017	0	6
+"441077"	2018	0	7
+"441082"	2001	2	7
+"441082"	2002	5	6
+"441082"	2003	0	6
+"441082"	2004	1	5
+"441082"	2005	2	15
+"441082"	2006	0	16
+"441082"	2007	1	13
+"441082"	2008	0	13
+"441082"	2009	0	12
+"441082"	2010	0	15
+"441082"	2012	0	10
+"441082"	2013	0	5
+"441082"	2014	0	10
+"441082"	2015	0	1
+"441109"	2002	0	11
+"441109"	2003	0	12
+"441109"	2004	0	9
+"441109"	2005	1	12
+"441109"	2006	0	20
+"441109"	2007	0	12
+"441109"	2008	0	12
+"441109"	2009	0	10
+"441109"	2010	0	11
+"441109"	2011	0	8
+"441109"	2012	0	7
+"441109"	2013	0	13
+"441109"	2014	0	10
+"441109"	2016	1	17
+"441109"	2017	0	18
+"441109"	2018	0	18
+"441132"	2002	3	3
+"441132"	2003	3	1
+"441132"	2004	3	4
+"441132"	2005	6	1
+"441132"	2006	6	3
+"441132"	2007	3	2
+"441132"	2008	1	2
+"441132"	2009	1	2
+"441132"	2010	0	5
+"441132"	2011	2	3
+"441132"	2012	0	11
+"441132"	2013	0	3
+"441132"	2014	0	1
+"441132"	2016	2	6
+"441132"	2017	2	20
+"441132"	2018	0	1
+"441153"	2009	0	14
+"441153"	2010	0	38
+"441153"	2011	0	11
+"441153"	2012	0	21
+"441178"	2001	4	4
+"441178"	2002	0	11
+"441178"	2003	5	12
+"441178"	2004	0	8
+"441178"	2005	1	20
+"441178"	2006	0	23
+"441178"	2007	2	18
+"441178"	2008	1	14
+"441178"	2009	0	10
+"441178"	2010	1	15
+"441178"	2011	0	9
+"441178"	2012	2	8
+"441178"	2013	0	15
+"441178"	2014	0	10
+"441178"	2015	1	10
+"441178"	2016	0	4
+"441178"	2017	0	13
+"441178"	2018	1	22
+"441217"	2003	4	13
+"441217"	2004	5	4
+"441217"	2005	2	6
+"441217"	2006	3	3
+"441217"	2007	3	5
+"441217"	2008	5	5
+"441217"	2011	6	2
+"441217"	2014	2	6
+"441217"	2016	5	4
+"441217"	2018	4	8
+"441233"	2001	2	3
+"441233"	2002	1	7
+"441233"	2003	1	5
+"441233"	2004	0	2
+"441233"	2005	1	3
+"441233"	2006	0	2
+"441233"	2007	0	1
+"441233"	2008	1	2
+"441233"	2009	0	7
+"441236"	2004	0	7
+"441236"	2005	0	10
+"441236"	2006	0	4
+"441236"	2007	0	6
+"441236"	2008	0	9
+"441236"	2009	0	14
+"441236"	2010	0	4
+"441236"	2011	0	16
+"441236"	2012	0	10
+"441236"	2013	0	8
+"441242"	2002	0	3
+"441242"	2003	0	5
+"441242"	2004	0	1
+"441242"	2005	0	3
+"441242"	2006	0	6
+"441242"	2007	0	6
+"441242"	2008	0	8
+"441242"	2009	0	7
+"441242"	2010	0	3
+"441242"	2011	0	6
+"441242"	2012	0	9
+"441242"	2013	0	9
+"441242"	2014	0	10
+"441242"	2015	0	9
+"441242"	2016	0	5
+"441242"	2017	0	5
+"441242"	2018	0	4
+"441259"	2018	2	14
+"441265"	2004	2	6
+"441265"	2005	2	3
+"441265"	2006	2	0
+"441265"	2007	0	4
+"441265"	2008	1	7
+"441265"	2009	1	4
+"441265"	2010	1	2
+"441265"	2011	2	13
+"441265"	2012	0	5
+"441265"	2013	1	4
+"441307"	2016	2	10
+"441307"	2017	2	3
+"441307"	2018	1	6
+"441311"	2015	0	12
+"441311"	2016	0	6
+"441311"	2017	0	6
+"441311"	2018	0	15
+"441340"	2004	0	10
+"441340"	2005	0	10
+"441340"	2006	0	8
+"441340"	2007	0	7
+"441340"	2008	0	6
+"441340"	2009	0	7
+"441340"	2010	0	2
+"441340"	2011	0	6
+"441340"	2012	0	6
+"441340"	2013	0	7
+"441340"	2014	0	6
+"441340"	2015	0	5
+"441376"	2014	0	15
+"441376"	2015	0	10
+"441376"	2016	0	7
+"441376"	2017	0	13
+"441376"	2018	0	18
+"441558"	2001	2	6
+"441558"	2002	1	0
+"441558"	2003	1	0
+"441558"	2004	2	3
+"441558"	2005	1	1
+"441558"	2006	1	3
+"441558"	2007	2	4
+"441558"	2008	1	4
+"441558"	2009	1	5
+"441558"	2011	1	0
+"441558"	2012	0	1
+"441594"	2004	12	3
+"441594"	2005	9	3
+"441594"	2006	10	1
+"441594"	2007	5	3
+"441594"	2008	6	6
+"441594"	2009	1	5
+"441640"	2012	12	4
+"441680"	2012	2	4
+"441680"	2013	1	7
+"441680"	2014	0	7
+"441680"	2015	1	5
+"441680"	2016	0	2
+"441680"	2017	0	5
+"441680"	2018	0	7
+"Ile de"	2018	3	7
+"Le Mas"	2018	0	7