Files - aechchiki/SIB_LongReadsWorkshop_Zurich18 GitHub Wiki

File organization

Section: Introduction [2/3].

Organization is important to avoid getting lost in your data.

Subfolders

For this tutorial, we suggest you to use a nested organization (e.g. considering data/script/analysis type). A possibility can be:

aechchik@danio:~/Downloads/lr_zh18$ find . -type d -links 2
./data/rna/minion/1_raw/
./data/rna/minion/2_extraction/
./data/rna/minion/3_quality/
./data/rna/minion/4_transcriptome/
(...)
./reference/
./scripts/

To save some typing, you can assign these directories to bash variables, using full-path. For example:

SCRIPTS="/Users/aechchik/Downloads/lr_zh18/scripts/" 
  # make sure you include the last "/" for folders

Doing so, you can:

  • simply move to it from anywhere
    • example: cd $SCRIPTS
  • create new files in it from anywhere
    • example: vim $SCRIPTS"test.sh"
      • this will basically add string "test.sh" to string stored in var $SCRIPTS, thus creating the corresponding filename

Scripts

As previously mentioned, you can use a text editor to keep track of your commands. This text editor can be local (e.g. Atom) or on the Docker machine.

In Docker, we installed embedded editors that might be useful for you:

We will be using bash for script interpretation, unless otherwise mentioned. Make sure to:

  • include suitable extension
    • i.e. .sh (for shell script)
  • specify the interpreter
    • i.e. add #!/usr/bin/env bash to the very top of your script
  • make your script executable
    • i.e. chmod +x <script_name>.sh

Next

Back