Corresponding lecture

Lecture slides - Ultra-fast read mapping with Kallisto

If you’re new to R

Please take time to work through this Learn R! module on basic R

Description

In our lecture, we covered the basics for running Kallisto with a single sample. However, you will rarely, if ever, be dealing with a single sample. In this lab, we’ll work through how to automate alignments and other command-line work using shell scripts and ‘for loops’. To keep the lab moving along, we’ll work with very small fastq files (see below)

Files you’ll need for this lab

subsampled fastq files - This is the course dataset, but each file has been subsampled to retrieve only 10,000 reads per sample.

shell script – To carry out read mapping and QC analysis for multiple samples.

Follow along

Bash basics tutorial - this is the code I’ll be running and discussing in lab today. You can copy/paste lines from this page to follow along.

Task 1 - Create a conditional for-loop to generate a shell script

During lab, we’ll work together through the bash tutorial to create a functional for-loop that iterates through a folder of fastq files to carry out read mapping, then carries out QC analysis and multiQC summarization. Rather than actually run this loop to carry out these commands, we’ll use the echo program to print the output to a file.

Task 2 - Run shell script to automate read mapping

Using the output from Task 1, we’ll create a shell script and you’ll learn to run the script from the terminal.

Submit your work

Before submitting your work, be sure to take advantage of the lab ‘critic’ tab on the sidebar to your right. Paste in any code from this lab and get instant feedback to help you improve your work.

When you’re ready to submit, navigate to the ‘submit’ tab and paste in the contents of your final shell script, complete with comments. This is due by the start of lab next week.

If you’re following along virtually, you can still crtique and submit your work…the only difference is that due dates do not apply to you.

Extended learning

Often times, you can squeeze more juice out of dataset simply by aligning your raw reads to other types of reference files. To practice read mapping and explore another aspect of your data, try mapping reads to the Ensembl reference file for non-coding RNAs, rather than the cDNA fasta file we used in the last lecture. As you move through the course, you can easily switch between these two complementary datasets to examine both coding and non-coding RNA.