General Directory Organization
The protocol for maintaining consistency when creating directories
For each new project you’ll want to have a dedicated folder to contain all major data files and code script related to that project. Even if you are re-using scripts that are already located in another project’s folder, consider copying that code over into your new projects’ folder, instead of reading it from another location.
The guiding principle should be that you want to be able to run your whole project’s code (barring any software you have to download) using the scripts that are located within that projects’ folder. That way, if you ever have to move your project files to another computer, you won’t be missing any scripts on which you’re dependent.
So once you’ve made a new project folder, for example by using the mkdir
command in the terminal
> mkdir NewProject
you’ll want to navigate into that folder (cd NewProject
) and create subdirectories to house specific file types.
Two good startig folders to have are a src
folder and a results
folder. An src
folder (derived from “source”), should house all the core scripts necessary for your project. So all novel R scripts, Python code, Perl pipelines you’ve dredged up, etc. would be housed here. The results
folder would house all output files generated by scripts in src
.
Depending on the project, you’ll want to have a data
folder to keep the raw data sets that you yourself did not generate with the scripts in src
.
Finally, you’ll want to create a simple text README file that explicitly states what subdirectories you have in your project folder, and what they should contain. Ideally you should have a README file in each directory that states what files it contains.
A README file written in markdown could look like this:
# Files for New Project by Student McGee and PI ForFree, Year Month(s)
Short description of New Project
## Description of each folder or file and the data contained within:
src - What scripts are here?
results - What kind of result files are here?
data - What sort of data?
Once you’ve set up your project folder, it should look something like this:
Quick notes: simfiles folder results folder src folder