ngs-docs / 2021-august-remote-computing

Remote computing workshops in August 2021
https://ngs-docs.github.io/2021-august-remote-computing
4 stars 2 forks source link

workshop 7: Automating your analyses and executing long-running analyses on remote computers #7

Open ctb opened 3 years ago

ctb commented 3 years ago

Thursday August 19 from 9 am - 11:30 PDT

Instructors: Titus, Marisa Moderator: Abhijna Helpers: Saranya Canchi

Zoom link:

Description:

This two hour workshop will show attendees how to automate their analyses using shell scripts, as well as run and manage software that takes minutes, hours, or days to execute. We’ll also show you how to disconnect from and resume running processes using the ‘screen’ command.

no draft lesson

owner: ???

CTB: maybe switch this with Structuring your projects for current and future you?

potential topics:

forward links:

ctb commented 3 years ago
marisalim commented 3 years ago

interested in co-teaching this one

marisalim commented 3 years ago

we have a section on using screen in the AWS lesson - https://training.nih-cfde.org/en/latest/Cloud-Platforms/Introduction_to_Amazon_Web_Services/introtoaws5_Screen.html

or maybe we want to teach tmux instead of screen?

ctb commented 3 years ago

will probably start where workshop #1 and #6 leave off.

ctb commented 3 years ago

maybe with salt from https://github.com/ngs-docs/2021-july-remote-computing/issues/4.

ctb commented 3 years ago

pamela and nick cannot attend.

marisalim commented 3 years ago

idea for an exercise to demo set -e - run bash script that loops through a command 3 times and has an error (i.e., wrong input file path) with (will fail/exit after 1st iteration) & without (will fail 3 times for each iteration) set -e in script.

marisalim commented 3 years ago

notes and lesson development - https://hackmd.io/VpMBdsq8T1WhvkEiU32OHQ

marisalim commented 3 years ago

talk about the for loop material from workshop 1 notes (we saved it for later)

https://ngs-docs.github.io/2021-august-remote-computing/introduction-to-the-unix-command-line.html#renaming-a-bunch-of-files

marisalim commented 3 years ago

add some material from https://github.com/ngs-docs/2021-GGG298/tree/latest/Week8-project_organization_and_UNIX_shell#file-manipulation

if statements, explanation of $, [ ]; script parameters

marisalim commented 3 years ago

possible assessment questions - feel free to edit!

marisalim commented 3 years ago

lesson layout:

marisa

titus

marisa

marisalim commented 3 years ago

slides for Thursday - @ctb feel free to edit! 2021-remote-computing-7.pptx

jeremywalter commented 3 years ago

Pre-Survey: https://forms.gle/8DrR4RfwUDNiu5T48 Post-Survey: https://forms.gle/zhwW9zTP3uwxqLt56

marisalim commented 3 years ago

reminder to fix subset example extension

for i in *.fq; do echo "head -400 $i > subset/$i"; newname=$(basename $i .fq)subset.fq; echo mv subset/$i subset/$newname; done

marisalim commented 3 years ago

lessons always need xkcd :D

add - https://xkcd.com/1205/

jeremywalter commented 3 years ago

7.4.2 : As a 'student' I found the variables section confusing and without context 7.5.1 : needs explicit instructions on where conda instructions are (could refer to specific lesson and section) --> add ANSWERS to QUESTIONS?

marisalim commented 3 years ago

add note that you don't actually have to use indentation for the bash for loops! the indentations are for us, not the computer

to if statement section, add putting it in a script

cd ~/
nano if-for.sh

# copy in
for i in *
do
   if [ -f $i ]; then
      echo $i is a file
   elif [ -d $i ]; then
      echo $i is a directory
   fi
done

# run
bash if-for.sh

to if.sh

echo running $0
echo a will be $1
echo b will be $2
a=$1
b=$2
ctb commented 3 years ago

from saranya:

My suggestion here would be to try and connect workshop 6 and
workshop 7 with the same examples. In particular, the commands from 4.8 amd 4.9 can be updated to work with files from MISeq folder only.