Like in tutorial 1, let's check where we are and what is in our directory;
These commands should show that we are in:
And in this folder we have two files:
These are files that we will be playing with during this tutorial. The fastq file is copied from the fastq example on wikipedia.
Let's read these files! We will be using a program called
cat. This program
concatenates files and prints them onto your screen. Let's give it a go:
You will see that the file contains 5 reads which are suspiciously similar to one another (with the exception of the ID line).
Now let's check out
Let's open the man page for
(remember you can leave the man page by typing
NAME cat - concatenate files and print on the standard output SYNOPSIS cat [OPTION]... [FILE]...
OK, so this is telling us that you can run
cat with any number of optional
arguments followed by any number of filepaths. It also means you can run
with no arguments at all!
Let's give multiple files a go - what do you think will happen?
cat small_file.txt small_file.txt
first line second line third line fourth line fifth line first line second line third line fourth line fifth line
It just prints (or cats) the contents of the two files one after the other.
Now how about running cat on its own?
Hmm, nothing is going? The command isn't ending? How do we stop it?
ctrl + c
This will interrupt this command - what was happening? It was waiting for some input to cat to screen. We will talk about this later in this tutorial so keep this question in your mind!
- Print to screen
sample.fastqtwice in one command.
cat sample.fastq sample.fastq