Mercurial > repos > mnhn65mo > regionalgam
annotate flight_curve.R @ 1:b8fa05dbcff4 draft
Uploaded
author | mnhn65mo |
---|---|
date | Fri, 03 Aug 2018 10:07:25 -0400 |
parents | 5b126f770671 |
children |
rev | line source |
---|---|
0 | 1 #!/usr/bin/env Rscript |
2 #library('getopt') | |
3 #library(devtools) | |
4 | |
5 args = commandArgs(trailingOnly=TRUE) | |
6 source(args[1]) #TODO replace by library(regionalGAM) if available as official package from bioconda | |
7 | |
8 tryCatch({input = read.table(args[2], header=TRUE,sep=" ")},finally={input = read.table(args[2], header=TRUE,sep=",")}) | |
9 dataset1 <- input[,c("SPECIES","SITE","YEAR","MONTH","DAY","COUNT")] | |
10 pheno <- flight_curve(dataset1) | |
11 | |
12 write.table(pheno, file="pheno", row.names=FALSE, sep=" ") |