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

Changeset 0:58ecd15e6836 (2019-06-20)
Commit message:
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/regionalgam commit ffe42225fff8992501b743ebe2c78e50fddc4a4e
added:
ab-index.R
autocorr-res-acf.R
dennis-gam-initial-functions.R
flight-curve.R
glmmpql.R
gls-adjusted.R
gls.R
plot-trend.R
plot-trend.xml
regionalgam_macros.xml
test-data/gatekeeper_CM_200320042005
test-data/s_data_index.tabular
test-data/s_flight_curve_result.tabular
test-data/s_glmmpql.tabular
test-data/s_gls-adju_rda.rda
test-data/s_gls-adju_sum.txt
test-data/s_gls_rda.rda
test-data/s_gls_sum.txt
test-data/s_res.txt
test-data/s_trend.tsv
b
diff -r 000000000000 -r 58ecd15e6836 ab-index.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ab-index.R Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,14 @@
+#!/usr/bin/env Rscript
+
+args = commandArgs(trailingOnly=TRUE)
+source(args[1])
+
+
+tryCatch({input = read.table(args[2], header=TRUE,sep=" ")},finally={input = read.table(args[2], header=TRUE,sep=",")})
+pheno = read.table(args[3], header=TRUE,sep=" ")
+
+if("TREND" %in% colnames(input)){
+    input <- input[input$TREND==1,c("SPECIES","SITE","YEAR","MONTH","DAY","COUNT")]
+}
+data.index <- abundance_index(input, pheno)
+write.table(data.index, file="data.index", row.names=FALSE, sep=" ")
b
diff -r 000000000000 -r 58ecd15e6836 autocorr-res-acf.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/autocorr-res-acf.R Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,10 @@
+#!/usr/bin/env Rscript
+args = commandArgs(trailingOnly=TRUE)
+load(args[1])
+
+png('output-acf.png',width = 480, height = 480, units = "px")
+graph<-acf(residuals(mod,type="normalized"),plot=FALSE)
+plot(graph, main="Acf residuals")
+invisible(dev.off())
+sink("output-acf.txt")
+print(graph)
b
diff -r 000000000000 -r 58ecd15e6836 dennis-gam-initial-functions.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dennis-gam-initial-functions.R Thu Jun 20 04:04:43 2019 -0400
[
b'@@ -0,0 +1,648 @@\n+### R-Script Adapted from script provided by the CEH, UK BY: Reto Schmucki [ reto.schmucki@mail.mcgill.ca]\n+### DATE: 14 July 2014 function to run two stage model in DENNIS et al. 2013\n+\n+\n+.onAttach <- function(libname, pkgname) {\n+  packageStartupMessage(" The regionalGAM package that is no longer maintained, \\n use the new rbms package instead. \\n\n+   devtools::install_github(\\"RetoSchmucki/rbms\\", force=TRUE)")\n+}\n+\n+\n+#\' year_day_func Function\n+#\' This function generate the full sequence of days, months and include the observation to that file.\n+#\' @param sp_data A data.frame with your observation.\n+#\' @keywords year days\n+#\' @export\n+#\' @author Reto Schmucki\n+#\' @examples\n+#\' year_day_func()\n+\n+\n+# FUNCTIONS\n+\n+year_day_func = function(sp_data) {\n+\n+    year <- unique(sp_data$YEAR)\n+\n+    origin.d <- paste(year, "01-01", sep = "-")\n+    if ((year%%4 == 0) & ((year%%100 != 0) | (year%%400 == 0))) {\n+        nday <- 366\n+    } else {\n+        nday <- 365\n+    }\n+\n+    date.serie <- as.POSIXlt(seq(as.Date(origin.d), length = nday, by = "day"), format = "%Y-%m-%d")\n+\n+    dayno <- as.numeric(julian(date.serie, origin = as.Date(origin.d)) + 1)\n+    month <- as.numeric(strftime(date.serie, format = "%m"))\n+    week <- as.numeric(strftime(date.serie, format = "%W"))\n+    week_day <- as.numeric(strftime(date.serie, format = "%u"))\n+    day <- as.numeric(strftime(date.serie, format = "%d"))\n+\n+    site_list <- sp_data[!duplicated(sp_data$SITE), c("SITE")]\n+\n+    all_day_site <- data.frame(SPECIES = sp_data$SPECIES[1], SITE = rep(site_list, rep(nday, length(site_list))),\n+        YEAR = sp_data$YEAR[1], MONTH = month, WEEK = week, DAY = day, DAY_WEEK = week_day, DAYNO = dayno,\n+        COUNT = NA)\n+\n+    count_index <- match(paste(sp_data$SITE, sp_data$DAYNO, sep = "_"), paste(all_day_site$SITE, all_day_site$DAYNO,\n+        sep = "_"))\n+    all_day_site$COUNT[count_index] <- sp_data$COUNT\n+    site_count_length <- aggregate(sp_data$COUNT, by = list(sp_data$SITE), function(x) list(1:length(x)))\n+    names(site_count_length$x) <- as.character(site_count_length$Group.1)\n+    site_countno <- utils::stack(site_count_length$x)\n+    all_day_site$COUNTNO <- NA\n+    all_day_site$COUNTNO[count_index] <- site_countno$values  # add count number to ease extraction of single count\n+\n+    # Add zero to close observation season two weeks before and after the first and last\n+    first_obs <- min(all_day_site$DAYNO[!is.na(all_day_site$COUNT)])\n+    last_obs <- max(all_day_site$DAYNO[!is.na(all_day_site$COUNT)])\n+\n+    closing_season <- c((first_obs - 11):(first_obs - 7), (last_obs + 7):(last_obs + 11))\n+\n+    # If closing season is before day 1 or day 365, simply set the first and last 5 days to 0\n+    if (min(closing_season) < 1)\n+        closing_season[1:5] <- c(1:5)\n+    if (max(closing_season) > nday)\n+        closing_season[6:10] <- c((nday - 4):nday)\n+\n+    all_day_site$COUNT[all_day_site$DAYNO %in% closing_season] <- 0\n+    all_day_site$ANCHOR <- 0\n+    all_day_site$ANCHOR[all_day_site$DAYNO %in% closing_season] <- 1\n+\n+    all_day_site <- all_day_site[order(all_day_site$SITE, all_day_site$DAYNO), ]\n+\n+    return(all_day_site)\n+}\n+\n+\n+#\' trap_area Function\n+#\'\n+#\' This function compute the area under the curve using the trapezoid method.\n+#\' @param x A vector or a two columns matrix.\n+#\' @param y A vector, Default is NULL\n+#\' @keywords trapezoid\n+#\' @export\n+#\' @examples\n+#\' trap_area()\n+\n+\n+trap_area = function(x, y = NULL) {\n+    # If y is null and x has multiple columns then set y to x[,2] and x to x[,1]\n+    if (is.null(y)) {\n+        if (length(dim(x)) == 2) {\n+            y = x[, 2]\n+            x = x[, 1]\n+        } else {\n+            stop("ERROR: need to either specifiy both x and y or supply a two column data.frame/matrix to x")\n+        }\n+    }\n+\n+    # Check x and y are same length\n+    if (length(x) != length(y)) {\n+        stop("ERROR: x and y need to be the same length")\n+    }\n+\n+    # Need to exclude any'..b'u_index) <- c("SITE", "SPECIES", "YEAR", "regional_gam", "prop_pheno_sampled")\n+\n+    cumu_index <- cumu_index[order(cumu_index$SITE), ]\n+\n+    # bind if exist else create\n+    if ("cumullated_indices" %in% ls()) {\n+        cumullated_indices <- rbind(cumullated_indices, cumu_index)\n+    } else {\n+        cumullated_indices <- cumu_index\n+    }\n+\n+}  # end of year loop\n+\n+} else {\n+\n+    y <- unique(dataset$YEAR)\n+    year_pheno <- flight_pheno[flight_pheno$year == y, ]\n+\n+    dataset_y <- dataset[dataset$YEAR == y, ]\n+\n+    sp_data_site <- year_day_func(dataset_y)\n+    sp_data_site$trimDAYNO <- sp_data_site$DAYNO - min(sp_data_site$DAYNO) + 1\n+\n+    sp_data_site <- merge(sp_data_site, year_pheno[, c("DAYNO", "nm")],\n+        by = c("DAYNO"), all.x = TRUE, sort = FALSE)\n+\n+    # compute proportion of the flight curve sampled due to missing visits\n+    pro_missing_count <- data.frame(SITE = sp_data_site$SITE, WEEK = sp_data_site$WEEK,\n+        NM = sp_data_site$nm, COUNT = sp_data_site$COUNT, ANCHOR = sp_data_site$ANCHOR)\n+    pro_missing_count$site_week <- paste(pro_missing_count$SITE, pro_missing_count$WEEK,\n+        sep = "_")\n+    siteweeknocount <- aggregate(pro_missing_count$COUNT, by = list(pro_missing_count$site_week),\n+        function(x) sum(!is.na(x)) == 0)\n+    pro_missing_count <- pro_missing_count[pro_missing_count$site_week %in%\n+        siteweeknocount$Group.1[siteweeknocount$x == TRUE], ]\n+    pro_count_agg <- aggregate(pro_missing_count$NM, by = list(pro_missing_count$SITE),\n+        function(x) 1 - sum(x, na.rm = T))\n+    names(pro_count_agg) <- c("SITE", "PROP_PHENO_SAMPLED")\n+\n+    # remove samples outside the monitoring window\n+    sp_data_site$COUNT[sp_data_site$nm==0] <- NA\n+\n+    # Compute the regional GAM index\n+    if(length(unique(sp_data_site$SITE))>1){\n+        glm_obj_site <- glm(COUNT ~ factor(SITE) + offset(log(nm)) - 1, data = sp_data_site,\n+            family = quasipoisson(link = "log"), control = list(maxit = 100))\n+    } else {\n+       glm_obj_site <- glm(COUNT ~  offset(log(nm)) - 1, data = sp_data_site,\n+           family = quasipoisson(link = "log"), control = list(maxit = 100))\n+    }\n+\n+    sp_data_site[, "FITTED"] <- predict.glm(glm_obj_site, newdata = sp_data_site,\n+        type = "response")\n+    sp_data_site[, "COUNT_IMPUTED"] <- sp_data_site$COUNT\n+    sp_data_site[is.na(sp_data_site$COUNT), "COUNT_IMPUTED"] <- sp_data_site$FITTED[is.na(sp_data_site$COUNT)]\n+\n+    # add fitted value for missing mid-week data\n+    sp_data_site <- sp_data_site[!paste(sp_data_site$DAY_WEEK, sp_data_site$COUNT) %in%\n+        c("1 NA", "2 NA", "3 NA", "5 NA", "6 NA", "7 NA"), ]\n+\n+    # remove all added mid-week values for weeks with real count\n+    # (observation)\n+    sp_data_site$site_week <- paste(sp_data_site$SITE, sp_data_site$WEEK,\n+        sep = "_")\n+    siteweekcount <- aggregate(sp_data_site$COUNT, by = list(sp_data_site$site_week),\n+        function(x) sum(!is.na(x)) > 0)\n+    sp_data_site <- sp_data_site[!(is.na(sp_data_site$COUNT) & (sp_data_site$site_week %in%\n+        siteweekcount$Group.1[siteweekcount$x == TRUE])), names(sp_data_site) !=\n+        "site_week"]\n+\n+    # Compute the regional gam index\n+    print(paste("Compute index for",sp_data_site$SPECIES[1],"at year", y,"for",length(unique(sp_data_site$SITE)),"sites:",Sys.time()))\n+    regional_gam_index <- trap_index(sp_data_site, data_col = "COUNT_IMPUTED",\n+        time_col = "DAYNO", by_col = c("SPECIES", "SITE", "YEAR"))\n+\n+    cumu_index <- merge(regional_gam_index, pro_count_agg, by = c("SITE"),\n+        all.x = TRUE, sort = FALSE)\n+    names(cumu_index) <- c("SITE", "SPECIES", "YEAR", "regional_gam", "prop_pheno_sampled")\n+\n+    cumu_index <- cumu_index[order(cumu_index$SITE), ]\n+\n+    # bind if exist else create\n+    if ("cumullated_indices" %in% ls()) {\n+        cumullated_indices <- rbind(cumullated_indices, cumu_index)\n+    } else {\n+        cumullated_indices <- cumu_index\n+    }\n+\n+}\n+\n+return(cumullated_indices)\n+\n+}\n'
b
diff -r 000000000000 -r 58ecd15e6836 flight-curve.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/flight-curve.R Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,8 @@
+#!/usr/bin/env Rscript
+args = commandArgs(trailingOnly=TRUE)
+source(args[1]) #TODO replace by library(regionalGAM) if available as official package from bioconda
+tryCatch({input = read.table(args[2], header=TRUE,sep=" ")},finally={input = read.table(args[2], header=TRUE,sep=",")})
+dataset1 <- input[,c("SPECIES", "SITE", "YEAR", "MONTH", "DAY", "COUNT")]
+pheno <- flight_curve(dataset1, MinVisit = args[3], MinOccur = args[4])
+
+write.table(pheno, file="pheno", row.names=FALSE, sep=" ")
b
diff -r 000000000000 -r 58ecd15e6836 glmmpql.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glmmpql.R Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,16 @@
+#!/usr/bin/env Rscript
+library(nlme)
+library(MASS)
+
+args = commandArgs(trailingOnly=TRUE)
+input = read.table(args[1], header=TRUE,sep=" ") 
+glmm.mod_fullyear <- glmmPQL(regional_gam~ as.factor(YEAR)-1,data=input,family=quasipoisson,random=~1|SITE, correlation = corAR1(form = ~ YEAR | SITE),verbose = FALSE)
+
+col.index <- as.numeric(glmm.mod_fullyear$coefficients$fixed)
+year <- unique(input$YEAR)
+
+write.table(col.index, file="output-glmmpql", row.names=FALSE, sep=" ")
+
+png('output-plot.png')
+plot(year,col.index,type='o', xlab="year",ylab="collated index")
+invisible(dev.off())
b
diff -r 000000000000 -r 58ecd15e6836 gls-adjusted.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gls-adjusted.R Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,16 @@
+#!/usr/bin/env Rscript
+library(nlme)
+library(MASS)
+
+args = commandArgs(trailingOnly=TRUE)
+input1 = read.table(args[1], header=TRUE) #input1=col.index =glmmpql-output
+input2 = read.table(args[2], header=TRUE,sep=" ") #input2=data.index =abundance_index-output
+
+input1<-as.matrix(input1)
+
+year <- unique(input2$YEAR)
+mod <- gls(input1~year, correlation = corARMA(p=2))
+summary<-summary(mod)
+
+save(mod, file = "mod_adjusted.rda")
+capture.output(summary, file="mod_adjusted-summary.txt")
b
diff -r 000000000000 -r 58ecd15e6836 gls.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gls.R Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,16 @@
+#!/usr/bin/env Rscript
+library(nlme)
+library(MASS)
+
+args = commandArgs(trailingOnly=TRUE)
+input1 = read.table(args[1], header=TRUE) #input1=col.index =glmmpql-output
+input2 = read.table(args[2], header=TRUE,sep=" ") #input2=data.index =abundance_index-output
+
+input1<-as.matrix(input1)
+
+year <- unique(input2$YEAR)
+mod <- gls(input1~year)
+summary<-summary(mod)
+
+save(mod, file = "mod.rda")
+capture.output(summary, file="mod-summary.txt")
b
diff -r 000000000000 -r 58ecd15e6836 plot-trend.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plot-trend.R Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,23 @@
+#!/usr/bin/env Rscript
+library(nlme)
+library(MASS)
+
+args = commandArgs(trailingOnly=TRUE)
+input = read.table(args[1], header=TRUE,sep=" ") #input=data.index =ab_index-output
+load(args[2])
+
+glmm.mod_fullyear <- glmmPQL(regional_gam~ as.factor(YEAR)-1,data=input,family=quasipoisson,random=~1|SITE, correlation = corAR1(form = ~ YEAR | SITE),verbose = FALSE)
+
+col.index <- as.numeric(glmm.mod_fullyear$coefficients$fixed)
+year <- unique(input$YEAR)
+
+png('output-plot-trend.png')
+plot(year,col.index, type='o',xlab="year",ylab="collated index")
+abline(mod,lty=2,col="red")
+invisible(dev.off())
+
+d<-data.frame(year,col.index)
+colnames(d)<-c("year","collated index")
+write.table(d,"s_trend.tsv",sep=" ",row.names=FALSE)
+
+cat("Show trend line on abundance plot")
b
diff -r 000000000000 -r 58ecd15e6836 plot-trend.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plot-trend.xml Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,54 @@
+<tool id="regionalgam_plot_trend" name="Plot abundance" version="@VERSION@">
+    <description>with trend line</description>
+    <macros>
+        <import>regionalgam_macros.xml</import>
+    </macros>
+    <expand macro="rg_nlme_mass_requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+        Rscript '$__tool_directory__/plot-trend.R' 
+            '$ab_indices' '$gls_model'  
+            '$output' 
+            '$output_tsv' 
+    ]]>
+    </command>
+    <inputs>
+        <expand macro="rg_ab_indices"/>
+        <expand macro="rg_gls_model"/>
+    </inputs>
+    <outputs>
+        <data format="png" name="output" from_work_dir="output-plot-trend.png" />
+        <data format="tabular" name="output_tsv" from_work_dir="s_trend.tsv" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="ab_indices" value="s_data_index.tabular"/>
+            <param name="gls_model" value="s_gls-adju_rda.rda"/>
+            <output name="output_tsv" ftype="tabular">
+                <assert_contents>
+                    <has_line_matching expression="2003&#009;5.5699.*"/>
+                    <has_line_matching expression="2004&#009;5.6221.*"/>
+                    <has_line_matching expression="2005&#009;5.6915.*"/>
+                    <has_line line="&quot;year&quot;&#009;&quot;collated index&quot;"/>
+                    <has_n_columns n="2"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+==========================
+Plot abundance trend 
+==========================
+
+This tool is an implementation of the plot_trend function from RegionalGAM package: https://github.com/RetoSchmucki/regionalGAM/
+
+This function plot abundance and add a trend line, it is the year effect estimated in the model.
+
+|
+
+**Outputs**
+
+Trend estimation plotted in an image png file, and raw values in a tabular file.
+
+    ]]></help>
+    <expand macro="rg_citation"/>
+</tool>
b
diff -r 000000000000 -r 58ecd15e6836 regionalgam_macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regionalgam_macros.xml Thu Jun 20 04:04:43 2019 -0400
b
@@ -0,0 +1,31 @@
+<macros>
+    <token name="@VERSION@">1.5</token>  
+    <xml name="rg_r_requirements">
+        <requirements>
+            <requirement type="package" version="3.5.1">r-base</requirement>
+        </requirements>
+    </xml>
+    <xml name="rg_nlme_mass_requirements">
+        <requirements>
+            <requirement type="package" version="3.1_137">r-nlme</requirement>
+            <requirement type="package" version="7.3_50">r-mass</requirement>
+        </requirements>
+    </xml>
+    <xml name="rg_count_file">
+        <param format="tabular,csv" name="count_file" type="data" label="Count file" help="The file must contain the SPECIES, SITE, YEAR, MONTH, DAY and COUNT columns. Csv or tabular file."/>
+    </xml>
+    <xml name="rg_ab_indices">
+        <param format="tabular" name="ab_indices" type="data" label="Computed abundance indices" help="Tabular file generated by the Abundance index tool."/>
+    </xml>
+    <xml name="rg_collated_index">
+        <param name="collated_index" type="data" format="tabular" label="Collated index" help="File generated by the glmmpql/Expected temporal trend tool."/>
+    </xml>
+    <xml name="rg_gls_model">
+        <param format="rdata" name="gls_model" type="data" label="Linear model" help="Linear model saved in a Rdata file."/>
+    </xml>
+    <xml name="rg_citation">
+        <citations>
+            <citation type="doi">10.1111/1365-2664.12561</citation>  
+        </citations>
+    </xml>
+</macros>
b
diff -r 000000000000 -r 58ecd15e6836 test-data/gatekeeper_CM_200320042005
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gatekeeper_CM_200320042005 Thu Jun 20 04:04:43 2019 -0400
b
b'@@ -0,0 +1,29947 @@\n+"SPECIES","SITE","YEAR","MONTH","DAY","COUNT","TREND"\n+"Pyronia tithonus","ESBMS.12",2003,4,4,0,0\n+"Pyronia tithonus","ESBMS.12",2003,4,7,0,0\n+"Pyronia tithonus","ESBMS.12",2003,4,13,0,0\n+"Pyronia tithonus","ESBMS.12",2003,4,23,0,0\n+"Pyronia tithonus","ESBMS.12",2003,5,2,0,0\n+"Pyronia tithonus","ESBMS.12",2003,5,10,0,0\n+"Pyronia tithonus","ESBMS.12",2003,5,23,0,0\n+"Pyronia tithonus","ESBMS.12",2003,5,29,0,0\n+"Pyronia tithonus","ESBMS.12",2003,6,4,0,0\n+"Pyronia tithonus","ESBMS.12",2003,6,10,0,0\n+"Pyronia tithonus","ESBMS.12",2003,6,19,0,0\n+"Pyronia tithonus","ESBMS.12",2003,6,21,0,0\n+"Pyronia tithonus","ESBMS.12",2003,7,2,9,0\n+"Pyronia tithonus","ESBMS.12",2003,7,6,18,0\n+"Pyronia tithonus","ESBMS.12",2003,7,16,38,0\n+"Pyronia tithonus","ESBMS.12",2003,7,23,39,0\n+"Pyronia tithonus","ESBMS.12",2003,7,27,51,0\n+"Pyronia tithonus","ESBMS.12",2003,8,4,42,0\n+"Pyronia tithonus","ESBMS.12",2003,8,18,11,0\n+"Pyronia tithonus","ESBMS.12",2003,8,25,5,0\n+"Pyronia tithonus","ESBMS.12",2003,9,10,0,0\n+"Pyronia tithonus","ESBMS.12",2003,9,16,0,0\n+"Pyronia tithonus","ESBMS.12",2003,9,26,0,0\n+"Pyronia tithonus","ESBMS.28",2003,4,4,0,0\n+"Pyronia tithonus","ESBMS.28",2003,4,6,0,0\n+"Pyronia tithonus","ESBMS.28",2003,4,13,0,0\n+"Pyronia tithonus","ESBMS.28",2003,4,25,0,0\n+"Pyronia tithonus","ESBMS.28",2003,4,27,0,0\n+"Pyronia tithonus","ESBMS.28",2003,5,3,0,0\n+"Pyronia tithonus","ESBMS.28",2003,5,23,0,0\n+"Pyronia tithonus","ESBMS.28",2003,5,29,0,0\n+"Pyronia tithonus","ESBMS.28",2003,6,4,0,0\n+"Pyronia tithonus","ESBMS.28",2003,6,12,0,0\n+"Pyronia tithonus","ESBMS.28",2003,6,14,0,0\n+"Pyronia tithonus","ESBMS.28",2003,6,21,0,0\n+"Pyronia tithonus","ESBMS.28",2003,7,11,23,0\n+"Pyronia tithonus","ESBMS.28",2003,7,18,166,0\n+"Pyronia tithonus","ESBMS.28",2003,7,27,736,0\n+"Pyronia tithonus","ESBMS.28",2003,8,2,658,0\n+"Pyronia tithonus","ESBMS.28",2003,8,9,406,0\n+"Pyronia tithonus","ESBMS.28",2003,8,20,94,0\n+"Pyronia tithonus","ESBMS.28",2003,8,27,23,0\n+"Pyronia tithonus","ESBMS.28",2003,9,10,3,0\n+"Pyronia tithonus","ESBMS.28",2003,9,19,0,0\n+"Pyronia tithonus","ESBMS.28",2003,9,26,0,0\n+"Pyronia tithonus","ESBMS.55",2003,4,4,0,0\n+"Pyronia tithonus","ESBMS.55",2003,4,10,0,0\n+"Pyronia tithonus","ESBMS.55",2003,4,23,0,0\n+"Pyronia tithonus","ESBMS.55",2003,5,2,0,0\n+"Pyronia tithonus","ESBMS.55",2003,5,9,0,0\n+"Pyronia tithonus","ESBMS.55",2003,5,14,0,0\n+"Pyronia tithonus","ESBMS.55",2003,5,23,0,0\n+"Pyronia tithonus","ESBMS.55",2003,5,30,0,0\n+"Pyronia tithonus","ESBMS.55",2003,6,4,0,0\n+"Pyronia tithonus","ESBMS.55",2003,6,9,0,0\n+"Pyronia tithonus","ESBMS.55",2003,6,19,0,0\n+"Pyronia tithonus","ESBMS.55",2003,6,22,0,0\n+"Pyronia tithonus","ESBMS.55",2003,7,1,0,0\n+"Pyronia tithonus","ESBMS.55",2003,7,7,0,0\n+"Pyronia tithonus","ESBMS.55",2003,7,16,0,0\n+"Pyronia tithonus","ESBMS.55",2003,7,19,1,0\n+"Pyronia tithonus","ESBMS.55",2003,8,1,4,0\n+"Pyronia tithonus","ESBMS.55",2003,8,7,6,0\n+"Pyronia tithonus","ESBMS.55",2003,8,12,10,0\n+"Pyronia tithonus","ESBMS.55",2003,8,18,9,0\n+"Pyronia tithonus","ESBMS.55",2003,8,26,3,0\n+"Pyronia tithonus","ESBMS.55",2003,9,5,0,0\n+"Pyronia tithonus","ESBMS.55",2003,9,10,0,0\n+"Pyronia tithonus","ESBMS.55",2003,9,17,0,0\n+"Pyronia tithonus","ESBMS.55",2003,9,25,1,0\n+"Pyronia tithonus","ESBMS.72",2003,4,6,0,0\n+"Pyronia tithonus","ESBMS.72",2003,4,13,0,0\n+"Pyronia tithonus","ESBMS.72",2003,4,19,0,0\n+"Pyronia tithonus","ESBMS.72",2003,4,27,0,0\n+"Pyronia tithonus","ESBMS.72",2003,5,3,0,0\n+"Pyronia tithonus","ESBMS.72",2003,5,15,0,0\n+"Pyronia tithonus","ESBMS.72",2003,5,18,0,0\n+"Pyronia tithonus","ESBMS.72",2003,5,28,0,0\n+"Pyronia tithonus","ESBMS.72",2003,6,1,0,0\n+"Pyronia tithonus","ESBMS.72",2003,6,11,0,0\n+"Pyronia tithonus","ESBMS.72",2003,6,16,0,0\n+"Pyronia tithonus","ESBMS.72",2003,6,23,0,0\n+"Pyronia tithonus","ESBMS.72",2003,7,1,0,0\n+"Pyronia tithonus","ESBMS.72",2003,7,7,4,0\n+"Pyronia tithonus","ESBMS.72",2003,7,13,11,0\n+"Pyronia tithonus","ESBMS.72",2003,7,20,45,0\n+"Pyronia tithonus","ESBMS.72",2003,7,30,40,0\n+"Pyronia tithon'..b'5,8,21,6,0\n+"Pyronia tithonus","UKBMS.2403",2005,8,28,0,0\n+"Pyronia tithonus","UKBMS.2403",2005,9,5,0,0\n+"Pyronia tithonus","UKBMS.2403",2005,9,13,0,0\n+"Pyronia tithonus","UKBMS.2403",2005,9,17,0,0\n+"Pyronia tithonus","UKBMS.2403",2005,9,24,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,4,11,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,4,26,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,5,5,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,5,15,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,5,23,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,5,29,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,6,7,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,6,18,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,6,27,8,0\n+"Pyronia tithonus","UKBMS.2404",2005,7,4,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,7,13,64,0\n+"Pyronia tithonus","UKBMS.2404",2005,7,21,115,0\n+"Pyronia tithonus","UKBMS.2404",2005,8,4,80,0\n+"Pyronia tithonus","UKBMS.2404",2005,8,12,43,0\n+"Pyronia tithonus","UKBMS.2404",2005,8,23,3,0\n+"Pyronia tithonus","UKBMS.2404",2005,8,30,1,0\n+"Pyronia tithonus","UKBMS.2404",2005,9,7,0,0\n+"Pyronia tithonus","UKBMS.2404",2005,9,9,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,4,1,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,4,8,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,4,15,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,4,22,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,4,29,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,5,6,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,5,13,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,5,20,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,5,27,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,6,3,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,6,10,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,6,17,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,6,24,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,7,1,1,0\n+"Pyronia tithonus","UKBMS.2405",2005,7,8,8,0\n+"Pyronia tithonus","UKBMS.2405",2005,7,15,44,0\n+"Pyronia tithonus","UKBMS.2405",2005,7,22,103,0\n+"Pyronia tithonus","UKBMS.2405",2005,7,29,146,0\n+"Pyronia tithonus","UKBMS.2405",2005,8,5,98,0\n+"Pyronia tithonus","UKBMS.2405",2005,8,12,34,0\n+"Pyronia tithonus","UKBMS.2405",2005,8,19,8,0\n+"Pyronia tithonus","UKBMS.2405",2005,8,26,2,0\n+"Pyronia tithonus","UKBMS.2405",2005,9,2,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,9,9,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,9,16,0,0\n+"Pyronia tithonus","UKBMS.2405",2005,9,23,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,4,1,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,4,11,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,4,18,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,4,22,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,4,29,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,5,11,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,5,17,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,5,26,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,5,27,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,6,7,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,6,14,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,6,21,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,6,27,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,7,4,13,0\n+"Pyronia tithonus","UKBMS.2407",2005,7,12,17,0\n+"Pyronia tithonus","UKBMS.2407",2005,7,18,15,0\n+"Pyronia tithonus","UKBMS.2407",2005,7,22,22,0\n+"Pyronia tithonus","UKBMS.2407",2005,8,2,16,0\n+"Pyronia tithonus","UKBMS.2407",2005,8,10,2,0\n+"Pyronia tithonus","UKBMS.2407",2005,8,16,2,0\n+"Pyronia tithonus","UKBMS.2407",2005,8,24,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,8,31,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,9,7,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,9,14,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,9,20,0,0\n+"Pyronia tithonus","UKBMS.2407",2005,9,28,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,5,3,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,5,6,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,5,24,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,6,8,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,6,10,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,6,19,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,7,10,19,0\n+"Pyronia tithonus","UKBMS.2408",2005,8,9,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,8,18,0,0\n+"Pyronia tithonus","UKBMS.2408",2005,9,20,0,0\n'
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_data_index.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/s_data_index.tabular Thu Jun 20 04:04:43 2019 -0400
b
@@ -0,0 +1,97 @@
+"SITE" "SPECIES" "YEAR" "regional_gam" "prop_pheno_sampled"
+"NLBMS.62" "Pyronia tithonus" 2003 1041.6 0.999996693504386
+"UKBMS.1016" "Pyronia tithonus" 2003 499 0.999977681782156
+"UKBMS.1017" "Pyronia tithonus" 2003 241.3 0.736095299768367
+"UKBMS.106" "Pyronia tithonus" 2003 1434.1 0.971211148999253
+"UKBMS.117" "Pyronia tithonus" 2003 108.4 0.948901308422968
+"UKBMS.1309" "Pyronia tithonus" 2003 133.4 0.779391691116407
+"UKBMS.133" "Pyronia tithonus" 2003 346.7 0.999981244602577
+"UKBMS.1404" "Pyronia tithonus" 2003 76.1 0.876998793245793
+"UKBMS.1407" "Pyronia tithonus" 2003 487.3 0.967385690145934
+"UKBMS.1411" "Pyronia tithonus" 2003 164 0.999981245217145
+"UKBMS.1412" "Pyronia tithonus" 2003 125.6 0.999981245217145
+"UKBMS.1427" "Pyronia tithonus" 2003 438.7 0.999982286309376
+"UKBMS.16" "Pyronia tithonus" 2003 234.4 0.999982285694808
+"UKBMS.1614" "Pyronia tithonus" 2003 27.1 0.999982286309376
+"UKBMS.1717" "Pyronia tithonus" 2003 407.9 0.999977734484143
+"UKBMS.1720" "Pyronia tithonus" 2003 184.6 0.774898141980137
+"UKBMS.176" "Pyronia tithonus" 2003 2051.5 0.971577195955518
+"UKBMS.2010" "Pyronia tithonus" 2003 136 0.999977734959092
+"UKBMS.2015" "Pyronia tithonus" 2003 103 0.507450558655163
+"UKBMS.2024" "Pyronia tithonus" 2003 431.6 0.971577195815899
+"UKBMS.2027" "Pyronia tithonus" 2003 566.5 0.998900223688378
+"UKBMS.2045" "Pyronia tithonus" 2003 74.4 0.999896655054516
+"UKBMS.2055" "Pyronia tithonus" 2003 509 0.998885816968317
+"UKBMS.2212" "Pyronia tithonus" 2003 974.6 0.779307336663016
+"UKBMS.2234" "Pyronia tithonus" 2003 101.6 0.999982285694808
+"UKBMS.2238" "Pyronia tithonus" 2003 53.6 0.984688802985178
+"UKBMS.2254" "Pyronia tithonus" 2003 69.6 0.985086486666898
+"UKBMS.2258" "Pyronia tithonus" 2003 307.1 0.999982285555189
+"UKBMS.2266" "Pyronia tithonus" 2003 268.9 0.999977734484143
+"UKBMS.2328" "Pyronia tithonus" 2003 123.9 0.999977735098711
+"NLBMS.62" "Pyronia tithonus" 2004 521.4 0.999971669491225
+"UKBMS.1016" "Pyronia tithonus" 2004 323.6 0.825617206195019
+"UKBMS.1017" "Pyronia tithonus" 2004 310.1 0.81576888539393
+"UKBMS.1040" "Pyronia tithonus" 2004 315.4 0.672491753541291
+"UKBMS.106" "Pyronia tithonus" 2004 1599.9 0.998668830862834
+"UKBMS.117" "Pyronia tithonus" 2004 116.2 0.999302016822444
+"UKBMS.1309" "Pyronia tithonus" 2004 135.9 0.81569135548207
+"UKBMS.133" "Pyronia tithonus" 2004 198.1 0.998542487916362
+"UKBMS.1404" "Pyronia tithonus" 2004 360.4 0.852207021142741
+"UKBMS.1407" "Pyronia tithonus" 2004 247 0.634158394415404
+"UKBMS.1411" "Pyronia tithonus" 2004 169.2 0.986851973794985
+"UKBMS.1412" "Pyronia tithonus" 2004 123.7 0.986800724344064
+"UKBMS.1427" "Pyronia tithonus" 2004 818.1 0.999994600355568
+"UKBMS.16" "Pyronia tithonus" 2004 269.5 0.998696961525244
+"UKBMS.1614" "Pyronia tithonus" 2004 61.4 0.850282194685412
+"UKBMS.1717" "Pyronia tithonus" 2004 644.7 0.999722729847095
+"UKBMS.1720" "Pyronia tithonus" 2004 228.7 0.986156648038205
+"UKBMS.176" "Pyronia tithonus" 2004 2752.1 0.99862271577287
+"UKBMS.2010" "Pyronia tithonus" 2004 114.3 0.987196805717397
+"UKBMS.2015" "Pyronia tithonus" 2004 114.9 0.999992748276108
+"UKBMS.2024" "Pyronia tithonus" 2004 307.6 0.999732522153148
+"UKBMS.2027" "Pyronia tithonus" 2004 635.1 0.969104151858962
+"UKBMS.2045" "Pyronia tithonus" 2004 116.1 0.926635738812239
+"UKBMS.2052" "Pyronia tithonus" 2004 135.7 0.83761870748898
+"UKBMS.2055" "Pyronia tithonus" 2004 173.8 0.95641733695997
+"UKBMS.2212" "Pyronia tithonus" 2004 911.8 0.856245926478372
+"UKBMS.2234" "Pyronia tithonus" 2004 64.5 0.854468034950933
+"UKBMS.2238" "Pyronia tithonus" 2004 76.8 0.998550430379774
+"UKBMS.2254" "Pyronia tithonus" 2004 139.7 0.843291130058462
+"UKBMS.2258" "Pyronia tithonus" 2004 362.1 0.998622781213415
+"UKBMS.2266" "Pyronia tithonus" 2004 251.7 0.877020347115025
+"UKBMS.2310" "Pyronia tithonus" 2004 271.7 0.981882284570638
+"UKBMS.2325" "Pyronia tithonus" 2004 253.6 0.993753793846067
+"UKBMS.2328" "Pyronia tithonus" 2004 143.7 0.986827183102062
+"NLBMS.62" "Pyronia tithonus" 2005 765.7 0.999999993055589
+"UKBMS.1016" "Pyronia tithonus" 2005 344.5 0.667090943735622
+"UKBMS.1017" "Pyronia tithonus" 2005 236.9 0.752776928789364
+"UKBMS.1040" "Pyronia tithonus" 2005 306.5 0.792952096805565
+"UKBMS.106" "Pyronia tithonus" 2005 2462.4 0.775573411762395
+"UKBMS.117" "Pyronia tithonus" 2005 165.8 0.724477514496017
+"UKBMS.1309" "Pyronia tithonus" 2005 83.2 0.945399265672354
+"UKBMS.133" "Pyronia tithonus" 2005 446.6 0.764264935309839
+"UKBMS.1404" "Pyronia tithonus" 2005 302.6 0.999996278634474
+"UKBMS.1407" "Pyronia tithonus" 2005 315.8 0.670162984378064
+"UKBMS.1411" "Pyronia tithonus" 2005 274.5 0.669390989287328
+"UKBMS.1412" "Pyronia tithonus" 2005 240.7 0.755718466847496
+"UKBMS.1427" "Pyronia tithonus" 2005 1130.2 0.999996278634474
+"UKBMS.16" "Pyronia tithonus" 2005 420.3 0.986970508915803
+"UKBMS.1614" "Pyronia tithonus" 2005 26.9 0.589430498820143
+"UKBMS.1717" "Pyronia tithonus" 2005 602.4 0.681113438385617
+"UKBMS.1720" "Pyronia tithonus" 2005 205.7 0.769607730246065
+"UKBMS.176" "Pyronia tithonus" 2005 1589.5 0.564092310036324
+"UKBMS.2010" "Pyronia tithonus" 2005 179.1 0.775549875051183
+"UKBMS.2015" "Pyronia tithonus" 2005 161.8 0.775551920647616
+"UKBMS.2027" "Pyronia tithonus" 2005 609.1 0.948678549946944
+"UKBMS.2045" "Pyronia tithonus" 2005 257.3 0.787958799875157
+"UKBMS.2052" "Pyronia tithonus" 2005 101.9 0.794475020313406
+"UKBMS.2055" "Pyronia tithonus" 2005 369.5 0.948484348317652
+"UKBMS.2212" "Pyronia tithonus" 2005 730.7 0.653520661000762
+"UKBMS.2234" "Pyronia tithonus" 2005 45.2 0.857359266293646
+"UKBMS.2238" "Pyronia tithonus" 2005 118.8 0.7640469757367
+"UKBMS.2254" "Pyronia tithonus" 2005 107.7 0.775985716635106
+"UKBMS.2258" "Pyronia tithonus" 2005 380.5 0.886660787898406
+"UKBMS.2310" "Pyronia tithonus" 2005 201.1 0.591169635610145
+"UKBMS.2325" "Pyronia tithonus" 2005 219 0.866034266422452
+"UKBMS.2328" "Pyronia tithonus" 2005 154.4 0.629823626313576
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_flight_curve_result.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/s_flight_curve_result.tabular Thu Jun 20 04:04:43 2019 -0400
b
b'@@ -0,0 +1,1097 @@\n+"species"\t"year"\t"week"\t"DAYNO"\t"DAYNO_adj"\t"nm"\n+"Pyronia tithonus"\t2003\t0\t1\t1\t0\n+"Pyronia tithonus"\t2003\t0\t2\t2\t0\n+"Pyronia tithonus"\t2003\t0\t3\t3\t0\n+"Pyronia tithonus"\t2003\t0\t4\t4\t0\n+"Pyronia tithonus"\t2003\t0\t5\t5\t0\n+"Pyronia tithonus"\t2003\t1\t6\t6\t0\n+"Pyronia tithonus"\t2003\t1\t7\t7\t0\n+"Pyronia tithonus"\t2003\t1\t8\t8\t0\n+"Pyronia tithonus"\t2003\t1\t9\t9\t0\n+"Pyronia tithonus"\t2003\t1\t10\t10\t0\n+"Pyronia tithonus"\t2003\t1\t11\t11\t0\n+"Pyronia tithonus"\t2003\t1\t12\t12\t0\n+"Pyronia tithonus"\t2003\t2\t13\t13\t0\n+"Pyronia tithonus"\t2003\t2\t14\t14\t0\n+"Pyronia tithonus"\t2003\t2\t15\t15\t0\n+"Pyronia tithonus"\t2003\t2\t16\t16\t0\n+"Pyronia tithonus"\t2003\t2\t17\t17\t0\n+"Pyronia tithonus"\t2003\t2\t18\t18\t0\n+"Pyronia tithonus"\t2003\t2\t19\t19\t0\n+"Pyronia tithonus"\t2003\t3\t20\t20\t0\n+"Pyronia tithonus"\t2003\t3\t21\t21\t0\n+"Pyronia tithonus"\t2003\t3\t22\t22\t0\n+"Pyronia tithonus"\t2003\t3\t23\t23\t0\n+"Pyronia tithonus"\t2003\t3\t24\t24\t0\n+"Pyronia tithonus"\t2003\t3\t25\t25\t0\n+"Pyronia tithonus"\t2003\t3\t26\t26\t0\n+"Pyronia tithonus"\t2003\t4\t27\t27\t0\n+"Pyronia tithonus"\t2003\t4\t28\t28\t0\n+"Pyronia tithonus"\t2003\t4\t29\t29\t0\n+"Pyronia tithonus"\t2003\t4\t30\t30\t0\n+"Pyronia tithonus"\t2003\t4\t31\t31\t0\n+"Pyronia tithonus"\t2003\t4\t32\t32\t0\n+"Pyronia tithonus"\t2003\t4\t33\t33\t0\n+"Pyronia tithonus"\t2003\t5\t34\t34\t0\n+"Pyronia tithonus"\t2003\t5\t35\t35\t0\n+"Pyronia tithonus"\t2003\t5\t36\t36\t0\n+"Pyronia tithonus"\t2003\t5\t37\t37\t0\n+"Pyronia tithonus"\t2003\t5\t38\t38\t0\n+"Pyronia tithonus"\t2003\t5\t39\t39\t0\n+"Pyronia tithonus"\t2003\t5\t40\t40\t0\n+"Pyronia tithonus"\t2003\t6\t41\t41\t0\n+"Pyronia tithonus"\t2003\t6\t42\t42\t0\n+"Pyronia tithonus"\t2003\t6\t43\t43\t0\n+"Pyronia tithonus"\t2003\t6\t44\t44\t0\n+"Pyronia tithonus"\t2003\t6\t45\t45\t0\n+"Pyronia tithonus"\t2003\t6\t46\t46\t0\n+"Pyronia tithonus"\t2003\t6\t47\t47\t0\n+"Pyronia tithonus"\t2003\t7\t48\t48\t0\n+"Pyronia tithonus"\t2003\t7\t49\t49\t0\n+"Pyronia tithonus"\t2003\t7\t50\t50\t0\n+"Pyronia tithonus"\t2003\t7\t51\t51\t0\n+"Pyronia tithonus"\t2003\t7\t52\t52\t0\n+"Pyronia tithonus"\t2003\t7\t53\t53\t0\n+"Pyronia tithonus"\t2003\t7\t54\t54\t0\n+"Pyronia tithonus"\t2003\t8\t55\t55\t0\n+"Pyronia tithonus"\t2003\t8\t56\t56\t0\n+"Pyronia tithonus"\t2003\t8\t57\t57\t0\n+"Pyronia tithonus"\t2003\t8\t58\t58\t0\n+"Pyronia tithonus"\t2003\t8\t59\t59\t0\n+"Pyronia tithonus"\t2003\t8\t60\t60\t1.70640682461776e-14\n+"Pyronia tithonus"\t2003\t8\t61\t61\t2.10804862159075e-14\n+"Pyronia tithonus"\t2003\t9\t62\t62\t2.60422598344102e-14\n+"Pyronia tithonus"\t2003\t9\t63\t63\t3.21719001325099e-14\n+"Pyronia tithonus"\t2003\t9\t64\t64\t3.97442911912198e-14\n+"Pyronia tithonus"\t2003\t9\t65\t65\t4.90990173345798e-14\n+"Pyronia tithonus"\t2003\t9\t66\t66\t6.06555918087152e-14\n+"Pyronia tithonus"\t2003\t9\t67\t67\t7.4932269878126e-14\n+"Pyronia tithonus"\t2003\t9\t68\t68\t9.2569290013612e-14\n+"Pyronia tithonus"\t2003\t10\t69\t69\t1.14357585424297e-13\n+"Pyronia tithonus"\t2003\t10\t70\t70\t1.41274253504076e-13\n+"Pyronia tithonus"\t2003\t10\t71\t71\t1.74526373821928e-13\n+"Pyronia tithonus"\t2003\t10\t72\t72\t2.15605139676444e-13\n+"Pyronia tithonus"\t2003\t10\t73\t73\t2.66352730747323e-13\n+"Pyronia tithonus"\t2003\t10\t74\t74\t3.29044925751862e-13\n+"Pyronia tithonus"\t2003\t10\t75\t75\t4.06493159875881e-13\n+"Pyronia tithonus"\t2003\t11\t76\t76\t5.02170603750585e-13\n+"Pyronia tithonus"\t2003\t11\t77\t77\t6.20367917994551e-13\n+"Pyronia tithonus"\t2003\t11\t78\t78\t7.66385668142462e-13\n+"Pyronia tithonus"\t2003\t11\t79\t79\t9.46772028819394e-13\n+"Pyronia tithonus"\t2003\t11\t80\t80\t1.16961643701845e-12\n+"Pyronia tithonus"\t2003\t11\t81\t81\t1.44491236338025e-12\n+"Pyronia tithonus"\t2003\t11\t82\t82\t1.78500546997371e-12\n+"Pyronia tithonus"\t2003\t12\t83\t83\t2.20514725224033e-12\n+"Pyronia tithonus"\t2003\t12\t84\t84\t2.72418045144827e-12\n+"Pyronia tithonus"\t2003\t12\t85\t85\t3.36539111373247e-12\n+"Pyronia tithonus"\t2003\t12\t86\t86\t4.15755501613034e-12\n+"Pyronia tithonus"\t2003\t12\t87\t87\t5.13623221722738e-12\n+"Pyronia tithonus"\t2003\t12\t88\t88\t6.34536890229914e-12\n+"Pyronia tithonus"\t2003\t12\t89\t89\t7.83927817079679e-12\n+"Pyronia tithonus"\t2003\t13\t90\t90\t9.68508962356466e-12\n+"Pyronia tithonus"\t2003\t13\t91\t91\t1.19657789744766e-11\n+"Pyronia tithonus"\t2003\t13\t92\t92\t1.47839153757994e-11\n+"Pyronia tithonus"\t2003\t13\t93\t93\t1.82662969289432e-11\n+"Pyronia tithonus"\t2003'..b'752179e-07\n+"Pyronia tithonus"\t2005\t40\t276\t276\t1.31452322936385e-07\n+"Pyronia tithonus"\t2005\t40\t277\t277\t9.69015078881119e-08\n+"Pyronia tithonus"\t2005\t40\t278\t278\t7.14319992316454e-08\n+"Pyronia tithonus"\t2005\t40\t279\t279\t5.26568742368948e-08\n+"Pyronia tithonus"\t2005\t40\t280\t280\t3.88165868829802e-08\n+"Pyronia tithonus"\t2005\t40\t281\t281\t2.8614068705739e-08\n+"Pyronia tithonus"\t2005\t40\t282\t282\t2.10931715960774e-08\n+"Pyronia tithonus"\t2005\t41\t283\t283\t1.55490605882389e-08\n+"Pyronia tithonus"\t2005\t41\t284\t284\t1.14621589302239e-08\n+"Pyronia tithonus"\t2005\t41\t285\t285\t8.44945497486109e-09\n+"Pyronia tithonus"\t2005\t41\t286\t286\t6.22860752558159e-09\n+"Pyronia tithonus"\t2005\t41\t287\t287\t4.59148570211413e-09\n+"Pyronia tithonus"\t2005\t41\t288\t288\t3.38466356503173e-09\n+"Pyronia tithonus"\t2005\t41\t289\t289\t2.49504151633934e-09\n+"Pyronia tithonus"\t2005\t42\t290\t290\t1.83924695871466e-09\n+"Pyronia tithonus"\t2005\t42\t291\t291\t1.35582087632126e-09\n+"Pyronia tithonus"\t2005\t42\t292\t292\t9.99458087973781e-10\n+"Pyronia tithonus"\t2005\t42\t293\t293\t7.36761387187486e-10\n+"Pyronia tithonus"\t2005\t42\t294\t294\t5.43111660390778e-10\n+"Pyronia tithonus"\t2005\t42\t295\t295\t4.00360660563996e-10\n+"Pyronia tithonus"\t2005\t42\t296\t296\t2.95130210262672e-10\n+"Pyronia tithonus"\t2005\t43\t297\t297\t2.17558440649454e-10\n+"Pyronia tithonus"\t2005\t43\t298\t298\t1.60375567976237e-10\n+"Pyronia tithonus"\t2005\t43\t299\t299\t1.18222592177625e-10\n+"Pyronia tithonus"\t2005\t43\t300\t300\t8.71490681377852e-11\n+"Pyronia tithonus"\t2005\t43\t301\t301\t6.42428823238221e-11\n+"Pyronia tithonus"\t2005\t43\t302\t302\t4.73573386091436e-11\n+"Pyronia tithonus"\t2005\t43\t303\t303\t3.49099766233473e-11\n+"Pyronia tithonus"\t2005\t44\t304\t304\t2.57342685132937e-11\n+"Pyronia tithonus"\t2005\t44\t305\t305\t1.8970295599436e-11\n+"Pyronia tithonus"\t2005\t44\t306\t306\t0\n+"Pyronia tithonus"\t2005\t44\t307\t307\t0\n+"Pyronia tithonus"\t2005\t44\t308\t308\t0\n+"Pyronia tithonus"\t2005\t44\t309\t309\t0\n+"Pyronia tithonus"\t2005\t44\t310\t310\t0\n+"Pyronia tithonus"\t2005\t45\t311\t311\t0\n+"Pyronia tithonus"\t2005\t45\t312\t312\t0\n+"Pyronia tithonus"\t2005\t45\t313\t313\t0\n+"Pyronia tithonus"\t2005\t45\t314\t314\t0\n+"Pyronia tithonus"\t2005\t45\t315\t315\t0\n+"Pyronia tithonus"\t2005\t45\t316\t316\t0\n+"Pyronia tithonus"\t2005\t45\t317\t317\t0\n+"Pyronia tithonus"\t2005\t46\t318\t318\t0\n+"Pyronia tithonus"\t2005\t46\t319\t319\t0\n+"Pyronia tithonus"\t2005\t46\t320\t320\t0\n+"Pyronia tithonus"\t2005\t46\t321\t321\t0\n+"Pyronia tithonus"\t2005\t46\t322\t322\t0\n+"Pyronia tithonus"\t2005\t46\t323\t323\t0\n+"Pyronia tithonus"\t2005\t46\t324\t324\t0\n+"Pyronia tithonus"\t2005\t47\t325\t325\t0\n+"Pyronia tithonus"\t2005\t47\t326\t326\t0\n+"Pyronia tithonus"\t2005\t47\t327\t327\t0\n+"Pyronia tithonus"\t2005\t47\t328\t328\t0\n+"Pyronia tithonus"\t2005\t47\t329\t329\t0\n+"Pyronia tithonus"\t2005\t47\t330\t330\t0\n+"Pyronia tithonus"\t2005\t47\t331\t331\t0\n+"Pyronia tithonus"\t2005\t48\t332\t332\t0\n+"Pyronia tithonus"\t2005\t48\t333\t333\t0\n+"Pyronia tithonus"\t2005\t48\t334\t334\t0\n+"Pyronia tithonus"\t2005\t48\t335\t335\t0\n+"Pyronia tithonus"\t2005\t48\t336\t336\t0\n+"Pyronia tithonus"\t2005\t48\t337\t337\t0\n+"Pyronia tithonus"\t2005\t48\t338\t338\t0\n+"Pyronia tithonus"\t2005\t49\t339\t339\t0\n+"Pyronia tithonus"\t2005\t49\t340\t340\t0\n+"Pyronia tithonus"\t2005\t49\t341\t341\t0\n+"Pyronia tithonus"\t2005\t49\t342\t342\t0\n+"Pyronia tithonus"\t2005\t49\t343\t343\t0\n+"Pyronia tithonus"\t2005\t49\t344\t344\t0\n+"Pyronia tithonus"\t2005\t49\t345\t345\t0\n+"Pyronia tithonus"\t2005\t50\t346\t346\t0\n+"Pyronia tithonus"\t2005\t50\t347\t347\t0\n+"Pyronia tithonus"\t2005\t50\t348\t348\t0\n+"Pyronia tithonus"\t2005\t50\t349\t349\t0\n+"Pyronia tithonus"\t2005\t50\t350\t350\t0\n+"Pyronia tithonus"\t2005\t50\t351\t351\t0\n+"Pyronia tithonus"\t2005\t50\t352\t352\t0\n+"Pyronia tithonus"\t2005\t51\t353\t353\t0\n+"Pyronia tithonus"\t2005\t51\t354\t354\t0\n+"Pyronia tithonus"\t2005\t51\t355\t355\t0\n+"Pyronia tithonus"\t2005\t51\t356\t356\t0\n+"Pyronia tithonus"\t2005\t51\t357\t357\t0\n+"Pyronia tithonus"\t2005\t51\t358\t358\t0\n+"Pyronia tithonus"\t2005\t51\t359\t359\t0\n+"Pyronia tithonus"\t2005\t52\t360\t360\t0\n+"Pyronia tithonus"\t2005\t52\t361\t361\t0\n+"Pyronia tithonus"\t2005\t52\t362\t362\t0\n+"Pyronia tithonus"\t2005\t52\t363\t363\t0\n+"Pyronia tithonus"\t2005\t52\t364\t364\t0\n+"Pyronia tithonus"\t2005\t52\t365\t365\t0\n'
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_glmmpql.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/s_glmmpql.tabular Thu Jun 20 04:04:43 2019 -0400
b
@@ -0,0 +1,4 @@
+"x"
+5.56997612228159
+5.62214955758101
+5.69157371643271
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_gls-adju_rda.rda
b
Binary file test-data/s_gls-adju_rda.rda has changed
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_gls-adju_sum.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/s_gls-adju_sum.txt Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,33 @@
+Generalized least squares fit by REML
+  Model: input1 ~ year 
+  Data: NULL 
+       AIC       BIC   logLik
+  4.718075 -5.281925 2.640963
+
+Correlation Structure: ARMA(2,0)
+ Formula: ~1 
+ Parameter estimate(s):
+         Phi1          Phi2 
+-1.026385e-06  1.342554e-06 
+
+Coefficients:
+                Value Std.Error   t-value p-value
+(Intercept) -116.2129  9.979614 -11.64503  0.0545
+year           0.0608  0.004980  12.20897  0.0520
+
+ Correlation: 
+     (Intr)
+year -1    
+
+Standardized residuals:
+              x
+[1,]  0.4082493
+[2,] -0.8164967
+[3,]  0.4082493
+attr(,"std")
+[1] 0.007042572 0.007042572 0.007042572
+attr(,"label")
+[1] "Standardized residuals"
+
+Residual standard error: 0.007042572 
+Degrees of freedom: 3 total; 1 residual
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_gls_rda.rda
b
Binary file test-data/s_gls_rda.rda has changed
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_gls_sum.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/s_gls_sum.txt Thu Jun 20 04:04:43 2019 -0400
[
@@ -0,0 +1,27 @@
+Generalized least squares fit by REML
+  Model: input1 ~ year 
+  Data: NULL 
+        AIC       BIC   logLik
+  0.7180747 -5.281925 2.640963
+
+Coefficients:
+                Value Std.Error   t-value p-value
+(Intercept) -116.2129   9.97963 -11.64501  0.0545
+year           0.0608   0.00498  12.20895  0.0520
+
+ Correlation: 
+     (Intr)
+year -1    
+
+Standardized residuals:
+              x
+[1,]  0.4082483
+[2,] -0.8164966
+[3,]  0.4082483
+attr(,"std")
+[1] 0.007042578 0.007042578 0.007042578
+attr(,"label")
+[1] "Standardized residuals"
+
+Residual standard error: 0.007042578 
+Degrees of freedom: 3 total; 1 residual
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_res.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/s_res.txt Thu Jun 20 04:04:43 2019 -0400
b
@@ -0,0 +1,5 @@
+
+Autocorrelations of series ‘residuals(mod, type = "normalized")’, by lag
+
+     0      1      2 
+ 1.000 -0.667  0.167 
b
diff -r 000000000000 -r 58ecd15e6836 test-data/s_trend.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/s_trend.tsv Thu Jun 20 04:04:43 2019 -0400
b
@@ -0,0 +1,4 @@
+"year" "collated index"
+2003 5.56997612228159
+2004 5.62214955758101
+2005 5.69157371643271