principals, practices, and habits

8

Click here to load reader

Upload: jeremy-leipzig

Post on 21-May-2015

486 views

Category:

Documents


5 download

DESCRIPTION

Some ideas I presented to a bioinformatics core about software development, literate programming, and versioning.

TRANSCRIPT

Page 1: Principals, Practices, and Habits

Principles, Practices, and Habits

Jeremy LeipzigDecember 18, 2010

Page 2: Principals, Practices, and Habits

Gearing up for a data deluge

• Technical• Scientific• Cultural– Version control– Documentation– Testing– Literate programming

Page 3: Principals, Practices, and Habits

Principles, Practices, and HabitsPrinciple Practice Habit

Transparency Open data Provide data behind plots

Transparency Open source All source code in SVN

Scalability Queueing Design for the cluster

Reproducibility Literate programming Sweave scripts, noweb

Integrity Documentation Method sections are provided by analysts

Longevity Softcoding Use configuration files. No magic variables

Sustainability Req spec Deliverables are specified in project site

Maintainability Central genomes Dynamic links where possible

Maintainability Documentation READMEs, Makefiles

Maintainability Project wiki/website We don’t email results to investigators

Page 4: Principals, Practices, and Habits

Results belong in reports, not emails

• Answer a question once• Constant improvement• Associate results with a set of stated

parameters

Page 5: Principals, Practices, and Habits

Literate programming

• Dynamic reports• Reproducible output• Marry code to reports• Marry data & configuration to reports• Reinforced sanity

Page 6: Principals, Practices, and Habits

Sweave

• R +• In R:

Sweave(“myReport.Rnw”,output=”myReport.tex”)

• In shell:echo "Sweave(\"myReport.Rnw\",output=\"myReport.tex\");" | R --no-save --quiet

• In shell:pdflatex myReport.tex

svn co http://versioncontrol.chop.edu/svn/cbmi/chipSeq/trunk/ chipSeqScripts

chromosomeBias.Rnw sample:

echo "configFile<-\"bias.config.R\";Sweave(\”chromosomeBias.Rnw\",output=\"chromosomeBias.tex\");" | R --no-save --quiet

Page 7: Principals, Practices, and Habits

bias.config.R

Page 8: Principals, Practices, and Habits

Versioning

• Subversion keyword substitution

svn add chromosomeBias.Rnwsvn propset svn:keywords 'Revision' chromosomeBias.Rnwsvn ci –m “added chromosomeBias sweave script”

http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html

$Rev$