File tree 1 file changed +55
-0
lines changed
1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Answers
2
+ ## Exercise 1
3
+ QN 1. creating project directory
4
+ ```
5
+ mkdir Exercise
6
+ ```
7
+ QN 2. creating directories for a bioinformatics project
8
+ ```
9
+ cd Exercise
10
+ mkdir Bioinfo_project
11
+ cd Bioinfo_project/
12
+ mkdir Documents Data Scripts
13
+ cd Data/
14
+ mkdir Raw_data Processed_data
15
+ ```
16
+ QN 3. downloading a fasta file
17
+ ```
18
+ cd Raw_data
19
+ wget https://raw.githubusercontent.com/kipkurui/IntroductoryLinux/master/Data/nrf1_seq.fa
20
+ cp nrf1_seq.fa ../Processed_data/nrfi_seq_copy.fa
21
+ ```
22
+ QN 4.
23
+ ```
24
+ cd ../Processed_data
25
+ grep '^>' nrfi_seq_copy.fa >sequence_names.txt
26
+ ```
27
+ QN 5 Script file for QN 4.
28
+ ```
29
+ cd ../../../Bioinfo_project/Scripts/
30
+ nano extract_seq.sh
31
+ ```
32
+ - type into the editor the following
33
+ ```
34
+ #!/usr/bin/env bash
35
+
36
+ #Ascript for extracting the sequence headers in a fasta file
37
+
38
+
39
+ grep "^>" ../../Bioinfo_project/Data/Processed_data/nrfi_seq_copy.fa > sequence_names.txt
40
+
41
+ #move the file to processed data
42
+ mv sequence_names.txt ../Data/Processed_data
43
+ ```
44
+ - add execution rights to the file by running the following command
45
+ ```
46
+ chmod +x extract_seq.sh
47
+ ```
48
+ - Run extract_seq.sh file using the command bellow
49
+ ```
50
+ ./extract_seq.sh
51
+ ```
52
+
53
+
54
+
55
+ - Click [ here] ( https://github.com/ndugwa/intro_github/blob/main/henry.sh ) to go extract_seq.sh
You can’t perform that action at this time.
0 commit comments