bb_project_setup - ampinzonv/BB3 GitHub Wiki

Function: bb_project_setup

Set up a standardized directory structure for a bioinformatics project.


πŸ” Description

This function creates a well-organized template of folders and documentation files for a new bioinformatics project. The structure follows community best practices and is inspired by resources like:

β€œSomeone unfamiliar with your project should be able to look at your computer files and understand in detail what you did and why.” β€” Noble, 2009.


πŸ“ Created Structure

20240605-ProjectName/
β”œβ”€β”€ about.md
β”œβ”€β”€ analysis/
β”‚   β”œβ”€β”€ 01/
β”‚   β”œβ”€β”€ 02/
β”‚   β”œβ”€β”€ 03/
β”‚   β”œβ”€β”€ 04/
β”‚   └── README.analysis.md
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ raw_data/
β”‚   β”œβ”€β”€ other_data/
β”‚   └── README.data.md
β”œβ”€β”€ docs/
β”‚   └── README.docs.md
β”œβ”€β”€ manuscript/
β”œβ”€β”€ notebook.md
β”œβ”€β”€ results/
β”‚   └── README.results.md
β”œβ”€β”€ sandbox/
β”‚   └── README.sandbox.md
β”œβ”€β”€ tmp/
β”‚   └── README.tmp.md
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ soft/
β”‚   └── README.tools.md

Each directory includes a pre-filled README and/or placeholder content to help you document your process from the start.


πŸ“₯ Input

  • The user must specify a project name via --project_name.
  • No positional arguments are allowed.

πŸ“€ Output

  • A fully initialized project folder in the current directory.

πŸ§ͺ Examples

Create a project folder named "my_project":

bb_project_setup --project_name my_project

Force overwrite if the folder already exists:

bb_project_setup --project_name my_project --force

Run silently:

bb_project_setup --project_name test_project --quiet

βš™οΈ Usage

bb_project_setup --project_name NAME [--quiet] [--force]

🧡 Options

Option Description
--project_name Name of the project (required)
--quiet Suppress informational messages
--force Overwrite project directory if it already exists

πŸ“Œ Notes

  • Automatically adds the current date (YYYYMMDD) as a prefix to the project directory name.
  • Creates markdown-formatted README files to help organize and document project activities.
  • Protects raw_data by recommending chmod -R -w after setup.