morinlab / guidelines Goto Github PK
View Code? Open in Web Editor NEWA collection of curated guidelines to enable reproducibility in computational biology
A collection of curated guidelines to enable reproducibility in computational biology
Don't rely on bash history
TTD
Add new tests when edge cases or bugs are found
Don't rely on bash history
Set and report the seed for random number generators.
Obviously, random number generators can hinder reproducibility, but their usage is sometimes necessary (e.g. in simulations and sub-sampling). An easy workaround is to set the seed for random number generators such that their output is "predictably random". This aids with the reproducibility of analyses, but also with debugging. Hence, whenever you're using a program that allows you to set the seed for a random number generator, set it to some value (see below for an example of how to generate such a value). If you're writing your own script that relies on a random number generator, provide a parameter for setting the seed and set it to some value when you run the script. It's also important to report the seed you use in the methods such that others can reproduce your analysis.
In Python, use random.seed()
whenever you import the random
module. In R, use set.seed()
whenever you rely on simulations or other computations involving random numbers. Karl Broman suggests to obtain a large random integer using runif(1, 0, 10^8)
and use that as your seed, so that your seed incorporates some element of randomness as well. In other words, don't always set your seed to 42.
http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003285#s7
https://biowize.wordpress.com/2015/08/05/reproducible-software-behavior-with-random-seeds/
Implement consistency checks wherever possible.
http://stats.stackexchange.com/questions/2768/what-is-a-consistency-check/2785#2785
Track the versions of software you install and use, and report software versions in methods.
A major difficulty in reproducing published results is that authors don't often report the versions of software they used in their analyses (source). Therefore, you should report software versions when you write the methods of any manuscript involving computation. However, it isn't trivial to collect the versions of every software used.
You can organize your software installation directory by software and then by version number. This way, any absolute paths to software binaries or scripts will include the version number. It allows easily allows multiple versions of the software to co-exist.
.
├── anaconda
│ ├── 2.3.0
│ └── 4.1.0
├── aspera_connect
│ └── 3.6.0.106805
├── bamhash
│ └── 1.0
├── bamUtil
│ └── 1.0.13
├── bcftools
│ └── 1.2
├── bedops
│ └── 2.4.19
├── bedtools
│ └── 2.25.0
[...]
Parameterize (semi-)arbitrarily chosen numbers, and explain how the default value was chosen and the use case they're intended for.
Scripts commonly use thresholds, cut-offs or other (semi-)arbitrarily chosen numbers. The value of these variables typically have a significant effect on the script's output and thus they should be discoverable by the user. Parameterizing these variables is a straightforward way for exposing them to the user. Otherwise, they are concealed within the script. This also allows the user to easily edit the values according to their needs. The default value for these variables should be explained whenever possible; it's important to describe how they were obtained and the use case they're intended for. This helps the user determine whether the default is appropriate for their specific use case.
If your code consists of modular functions, every (semi-)arbitrarily chosen number should become a parameter for the function that contains it. In the case of a script, these parameters should all be made user-adjustable as command-line arguments. If default values are provided, explain how they were obtained and what use case they're intended for in the script's self-documentation (e.g. docstrings in Python) and/or associated README.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.