...
The script can be run, with or without command line arguments, by explicitly invoking bash as follows:
| Code Block |
|---|
username$user$ bash hello.sh ------------------- Hello, Shell World! ------------------- username$user$ bash hello.sh Goddess ------------------- Hello, Goddess! ------------------- |
There is a shortcut, though, since . Since we have the line at the top of this file that names the program that should run it. We , we should be able to run it just execute the script just by typing in its pathname like this (where ./ means current directory), but there's a complication:
| Code Block |
|---|
username$user$ ./hello.sh -bash: ./hello.sh: Permission denied |
But there''s a complication. Welcome to the world of Unix permissions! The script file must be marked executable for this to work. To see what the current permissions are:
| Code Block |
|---|
username$user$ ls -la hello.sh -rw-rw-r-- 1 user group 122 May 18 01:16 hello.sh |
...
| Code Block |
|---|
username$ chmod +r hello.sh username$ ls -la hello.sh -rwxrwxr-x 1 user group 122 May 18 01:16 hello.sh |
Now hello.sh can be invoked directly:
| Code Block |
|---|
username$ ./hello.sh "Expert scripter" ------------------- Hello, Expert scripter! ------------------- |
...
You already generated reference file. Now, you want to do the following task tasks in order.
- Map Align a fastq file on to a reference genome using BWAConvert bwa
- Extract alignments from bwa's proprietary binary .sai file to a .sam file
- Convert the .sam file into a .bam file using Samtools samtools
- Count the number of aligned and unaligned reads, respectively, and calculate the mapping rate.
...