Skip to content

Commit f878407

Browse files
update supplementary
1 parent 8b3817d commit f878407

File tree

2 files changed

+31
-44
lines changed

2 files changed

+31
-44
lines changed

docs/04-redirection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ efficiently.
448448

449449
## File manipulation and more practices with pipes
450450

451-
To practice a bit more with the tools we've added to our tool kit so far and learn a few extra ones you can follow [this extra lesson](Extra_lesson.md) which uses the SRA metadata file.
451+
To practice a bit more with the tools we've added to our tool kit so far and learn a few extra ones you can follow [this extra lesson](./Supplementary/1-supplementary.md) which uses the SRA metadata file.
452452

453453

454454

docs/Supplementary/1-supplementary.md

Lines changed: 30 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
---
2-
title: File manipulation
3-
---
1+
# 1. Supplementary - File manipulation
42

53
## File manipulation and more practice with pipes
64

75
Let's use the tools we've added to our tool kit so far, along with a few new ones, to example our SRA metadata file. First, let's navigate to the correct directory.
86

97
```bash
108
$ cd
11-
$ cd shell_data/sra_metadata
9+
$ cd ~/shell_data/sra_metadata
1210
```
1311

1412
This file contains a lot of information about the samples that we submitted for sequencing. We
@@ -103,9 +101,6 @@ $ cut -f3 SraRunTable.txt | grep SINGLE | wc -l
103101
35
104102
```
105103

106-
:::::::::::::::::::::::::
107-
108-
::::::::::::::::::::::::::::::::::::::::::::::::::
109104

110105
#### How many of each class of library layout are there?
111106

@@ -155,42 +150,38 @@ $ cut -f3 SraRunTable.txt | grep -v LibraryLayout_s | sort | uniq -c
155150
35 SINGLE
156151
```
157152

158-
::::::::::::::::::::::::::::::::::::::: challenge
159153

160-
## Exercise
154+
!!! dumbbell "Exercise"
161155

162-
1. How many different sample load dates are there?
163-
2. How many samples were loaded on each date?
156+
1. How many different sample load dates are there?
157+
2. How many samples were loaded on each date?
164158

165-
::::::::::::::: solution
166159

167-
## Solution
168160

169-
1. There are two different sample load dates.
170-
171-
```bash
172-
cut -f5 SraRunTable.txt | grep -v LoadDate_s | sort | uniq
173-
```
174-
175-
```output
176-
25-Jul-12
177-
29-May-14
178-
```
179-
180-
2. Six samples were loaded on one date and 31 were loaded on the other.
181-
182-
```bash
183-
cut -f5 SraRunTable.txt | grep -v LoadDate_s | sort | uniq -c
184-
```
185-
186-
```output
187-
6 25-Jul-12
188-
31 29-May-14
189-
```
190-
191-
:::::::::::::::::::::::::
192-
193-
::::::::::::::::::::::::::::::::::::::::::::::::::
161+
??? success "Solution"
162+
163+
1. There are two different sample load dates.
164+
165+
```bash
166+
cut -f5 SraRunTable.txt | grep -v LoadDate_s | sort | uniq
167+
```
168+
169+
```output
170+
25-Jul-12
171+
29-May-14
172+
```
173+
174+
2. Six samples were loaded on one date and 31 were loaded on the other.
175+
176+
```bash
177+
cut -f5 SraRunTable.txt | grep -v LoadDate_s | sort | uniq -c
178+
```
179+
180+
```output
181+
6 25-Jul-12
182+
31 29-May-14
183+
```
184+
194185

195186
#### Can we sort the file by library layout and save that sorted information to a new file?
196187

@@ -227,14 +218,13 @@ samples to a new file.
227218
$ grep PAIRED SraRunTable.txt > SraRunTable_only_paired_end.txt
228219
```
229220

230-
::::::::::::::::::::::::::::::::::::::: challenge
221+
231222

232223
## Exercise
233224

234225
Sort samples by load date and export each of those sets to a new file (one new file per
235226
unique load date).
236227

237-
::::::::::::::: solution
238228

239229
## Solution
240230

@@ -243,9 +233,6 @@ $ grep 25-Jul-12 SraRunTable.txt > SraRunTable_25-Jul-12.txt
243233
$ grep 29-May-14 SraRunTable.txt > SraRunTable_29-May-14.txt
244234
```
245235

246-
:::::::::::::::::::::::::
247-
248-
::::::::::::::::::::::::::::::::::::::::::::::::::
249236

250237
## Making code more customizeable using command line arguments
251238

0 commit comments

Comments
 (0)