-
Notifications
You must be signed in to change notification settings - Fork 19
Coding Guide
General coding/style guide for the main languages we're working with. These currently/will include:
- Python
- MATLAB
We're using Python version 2.7.x (https://www.python.org/downloads/), but you can probably get away with 2.5 or 2.6. To keep our code consistent, we're following the standard PEP-8 style guide (https://www.python.org/dev/peps/pep-0008/). If you're looking for an editor, PyCharm (https://www.jetbrains.com/pycharm/download/) is pretty good and follows PEP-8.
Some quick tips:
- indents are 4 spaces
- lines shouldn't exceed 121 characters
- one newline at EOF (end of file)
- two newlines between top-level functions and classes, one newline between in-class functions
- use all lowercase and underscores for variable names and function names
- use asserts to make sure your code behaves properly
- include a test directory for new modules, or update the test directory if you're adding to a module
- document your code!
Function documentation should include a one-line message and input/output descriptions for all major functions. Example:
def sum_and_square(x, y):
"""Adds and then squares two scalars x and y
Args:
x: scalar (int or float)
y: scalar (int or float)
Returns:
scalar (int or float)
"""
return (x + y) ** 2
add some notes on test directories / maybe unit tests for modules
To be written
Project
Description
Results
Design
Requirements
Lab & Design Documentation
Measurement Interlab Study
sgRNA Swap
Target Plasmid Construction
Gibson Assembly of pCAMBIA
Math Modelling
Cauliflower Mosaic Virus (CaMV)
CaMV Spread within Arabidopsis
CRISPR/Cas9 Targeting
Modelling Viral Assembly
Modelling Viral Spread
Bioinformatics/Coding
Coding Guide
Designing sgRNA Targets for CaMV Immunity
PyMOL/PyRosetta for Windows
PyMOL/PyRosetta for Linux
PyMOL/PyRosetta for Mac
Modelling Resources
Modelling Cas9 in PyRosetta
Building PyRosetta from Source
PyRosetta Fold Tree
ABM Software Comparison
Policy & Practices
Survey Information
[Local Agriculture Outreach and Acquiring Virus Testing Facility]([Local Agriculture Outreach and Acquiring Virus Testing Facility](Local Agriculture Outreach and Acquiring Virus Testing Facility))
Teamwide Documentation
Q & A
What does this paper mean?
Outreach
Collaboration
Sponsors