A useful starter skeleton layout for analytics project.
project-dir
├── README.md
├── bin
├── data
│ ├── derived
│ ├── original
│ └── test
├── docs
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "strings" | |
| "syscall" |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "math" | |
| "os" | |
| "os/signal" | |
| "strconv" | |
| "strings" |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "math" | |
| "os" | |
| "os/signal" | |
| "strconv" | |
| "strings" |
| #!/usr/bin/python | |
| from __future__ import print_function | |
| # from https://wiki.python.org/moin/SortingListsOfDictionaries | |
| def multikeysort(items, columns): | |
| from operator import itemgetter | |
| comparers = [ ((itemgetter(col[1:].strip()), -1) if col.startswith('-') else (itemgetter(col.strip()), 1)) for col in columns] | |
| def comparer(left, right): | |
| for fn, mult in comparers: |
| #!/usr/bin/env Rscript | |
| args <- commandArgs(trailingOnly=TRUE) | |
| file <- args[1] | |
| cat(paste("Processing: ", file, "\n")) | |
| library(knitr) | |
| knit(file) |
A useful starter skeleton layout for analytics project.
project-dir
├── README.md
├── bin
├── data
│ ├── derived
│ ├── original
│ └── test
├── docs
| #!/usr/bin/awk -f | |
| # taken from: http://stackoverflow.com/questions/1729824/transpose-a-file-in-bash | |
| { | |
| for (i=1; i<=NF; i++) { | |
| a[NR,i] = $i | |
| } | |
| } | |
| NF>p { p = NF } | |
| END { |
| #!/usr/bin/env python | |
| # This is a script to merge multiple [GATK][0] Report (or [GATKReport][1]) | |
| # files into a single report file. This is useful when one is running multiple | |
| # GATK commands on a partitioned [VCF][2] data set for performance reasons, and then | |
| # afterwards assembling up the overall output. | |
| # | |
| # Currently this script supports the GATKReports for the following | |
| # [VariantEval][3] Evaluation Module [outputs][4]: | |
| # |
| #!/usr/bin/env python | |
| from __future__ import print_function, division | |
| import sys, os, pprint | |
| from glob import glob | |
| import requests | |
| from lxml import html | |
| from toolz.curried import * |
| .PHONY: clean | |
| PRJDIR := /path/to/project | |
| DOCS := $(PRJDIR)/docs | |
| RLIBS := /gscmnt/gc2801/analytics/idas/jira/BIO-1465/rpkgs | |
| REPORTDIR := $(DOCS)/writeups | |
| PDFLATEX := /home/archive/texlive-2015/2015/bin/x86_64-linux/pdflatex | |
| writeup: $(REPORTDIR)/report.pdf |