Skip to content

Commit ca31c8c

Browse files
authored
Merge pull request #9 from datacarpentry/gh-pages
update my fork
2 parents 8cc81b6 + e656384 commit ca31c8c

21 files changed

Lines changed: 149 additions & 4007 deletions

_episodes/01-introduction.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,14 @@ Let's look at how our file system is organized.
196196
At the top is our `dcuser` directory, which holds all the
197197
subdirectories and files.
198198

199-
Inside that directory are several other directories:
200-
`dc_sample_data`
201-
`dc_workshop`
202-
`Desktop`
203-
`Downloads`
204-
`FastQC`
205-
`openrefine-2-6-beta.1`
206-
`R`
207-
and
208-
`Trimmomatic-0.32`
199+
Inside that directory are some other directories:
209200

210-
We'll be working with many of these subdirectories throughout this workshop.
201+
~~~
202+
dc_sample_data FastQC Trimmomatic-0.32
203+
~~~
204+
{: .output}
211205

206+
We'll be working with these subdirectories throughout this workshop.
212207

213208
The command to change locations in our file system is `cd` followed by a
214209
directory name to change our working directory.
@@ -222,7 +217,7 @@ $ cd dc_sample_data
222217
~~~
223218
{: .bash}
224219

225-
We can see files and subdirectores are in this directory by running `ls`,
220+
We can see files and subdirectories are in this directory by running `ls`,
226221
which stands for "listing":
227222

228223
~~~
@@ -231,7 +226,7 @@ $ ls
231226
{: .bash}
232227

233228
~~~
234-
r_genomics sra_metadata untrimmed_fastq variant_calling variant_calling.tar.gz
229+
sra_metadata untrimmed_fastq
235230
~~~
236231
{: .output}
237232

@@ -247,13 +242,12 @@ $ ls -F
247242
{: .bash}
248243

249244
~~~
250-
r_genomics/ sra_metadata/ untrimmed_fastq/ variant_calling/ variant_calling.tar.gz
245+
sra_metadata/ untrimmed_fastq/
251246
~~~
252247
{: .output}
253248

254-
Anything with a "/" after it is a directory.
255-
Things with a "*" after them are programs.
256-
If there are no decorations, it's a file.
249+
Anything with a "/" after it is a directory. Things with a "*" after them are programs. If
250+
there are no decorations, it's a file.
257251

258252
`ls` has lots of other options. To find out what they are, we can type:
259253

@@ -279,10 +273,8 @@ to quit.
279273
> > {: .bash}
280274
> >
281275
> > ~~~
282-
> > drwxrwxr-x 4 dcuser dcuser 4096 May 21 2016 r_genomics
283-
> > drwxr-x--- 2 dcuser dcuser 4096 Jul 30 2015 sra_metadata
284-
> > drwxr-xr-x 2 dcuser dcuser 4096 Jul 30 2015 untrimmed_fastq
285-
> > -rw-rw-r-- 1 dcuser dcuser 64281061 Jul 31 2015 variant_calling.tar.gz
276+
> > drwxr-x--- 2 dcuser dcuser 4096 Jul 30 2015 sra_metadata
277+
> > drwxr-xr-x 2 dcuser dcuser 4096 Jul 30 2015 untrimmed_fastq
286278
> > ~~~
287279
> > {: .output}
288280
> >
@@ -340,9 +332,6 @@ $ cd untrimmed_fastq
340332
~~~
341333
{: .bash}
342334
343-
Notice that we can move two (or more) directory levels at a time by placing a `\`
344-
between directory names.
345-
346335
Using tab complete can be very helpful. However, it will only autocomplete
347336
a file or directory name if you've typed enough characters to provide
348337
a unique identifier for the file or directory you are trying to access.
@@ -351,6 +340,7 @@ If we navigate back to our `untrimmed_fastq` directory and try to access one
351340
of our sample files:
352341
353342
~~~
343+
$ cd
354344
$ cd dc_sample_data
355345
$ cd untrimmed_fastq
356346
$ ls SR<tab>

_episodes/02-the-filesystem.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,16 @@ We've also learned how to use `cd` to change locations and `ls` to list the cont
2424
of a directory. Now we're going to learn some additional commands for moving around
2525
within our file system.
2626

27-
Use the commands we've learned so far to navigate to the `dc_sample_data` directory, if
27+
Use the commands we've learned so far to navigate to the `dc_sample_data/untrimmed_fastq` directory, if
2828
you're not already there.
2929

30+
~~~
31+
$ cd
32+
$ cd dc_sample_data
33+
$ cd untrimmed_fastq
34+
~~~
35+
{: .bash}
36+
3037
What if we want to move back up and out of this directory and to our top level
3138
directory? Can we type `cd dc_sample_data`? Try it and see what happens.
3239

@@ -71,7 +78,7 @@ $ ls
7178
{: .bash}
7279

7380
~~~
74-
r_genomics sra_metadata untrimmed_fastq variant_calling.tar.gz
81+
sra_metadata untrimmed_fastq
7582
~~~
7683
{: .output}
7784

@@ -84,7 +91,7 @@ $ ls ../../
8491
~~~
8592
{: .bash}
8693

87-
prints the contents of `/home`, which is one level up from your home directory.
94+
prints the contents of `/home`, which is one level up from your root directory.
8895

8996
> ## Finding hidden directories
9097
>
@@ -111,7 +118,7 @@ prints the contents of `/home`, which is one level up from your home directory.
111118
> > {: .bash}
112119
> >
113120
> > ~~~
114-
> > . .. .hidden r_genomics sra_metadata untrimmed_fastq variant_calling.tar.gz
121+
> > . .. .hidden sra_metadata untrimmed_fastq
115122
> > ~~~
116123
> > {: .output}
117124
> >
@@ -160,7 +167,7 @@ $ ls dc_sample_data
160167
{: .bash}
161168
162169
~~~
163-
r_genomics sra_metadata untrimmed_fastq variant_calling.tar.gz
170+
sra_metadata untrimmed_fastq
164171
~~~
165172
{: .output}
166173
@@ -315,6 +322,11 @@ $ ls ~
315322
~~~
316323
{: .bash}
317324
325+
~~~
326+
dc_sample_data FastQC Trimmomatic-0.32
327+
~~~
328+
{: .output}
329+
318330
This prints the contents of your home directory, without you needing to
319331
type the full path.
320332

_episodes/03-working-with-files.md

Lines changed: 64 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ $ ls /usr/bin/*.sh
8787
~~~
8888
{: .bash}
8989

90+
~~~
91+
/usr/bin/amuFormat.sh /usr/bin/gettext.sh /usr/bin/gvmap.sh
92+
~~~
93+
{: .output}
94+
9095
Lists every file in `/usr/bin` that ends in the characters `.sh`.
9196

9297
> ## Home vs. Root
@@ -207,7 +212,7 @@ This will print out all of the contents of the `SRR098026.fastq` to the screen.
207212
>
208213
> > ## Solution
209214
> > 1. The last line of the file is `TATTTTAAAATGGAATACCTAACATGTTAATTAACC`.
210-
> > 2. cat ~/dc_sample_data/untrimmed_fastq/*
215+
> > 2. `cat ~/dc_sample_data/untrimmed_fastq/*`
211216
> {: .solution}
212217
{: .challenge}
213218

@@ -253,10 +258,10 @@ return, you will search backwards and move up the file to previous examples of t
253258

254259
> ## Exercise
255260
>
256-
> What are the next three nucleotides (characters) after the sequence quoted above?
261+
> What are the next three nucleotides (characters) after the first instance of the sequence quoted above?
257262
>
258263
> > ## Solution
259-
> > `TCA`
264+
> > `CAC`
260265
> {: .solution}
261266
{: .challenge}
262267

@@ -273,20 +278,65 @@ the beginning and end of a file, respectively.
273278

274279
~~~
275280
$ head SRR098026.fastq
281+
~~~
282+
{: .bash}
283+
284+
~~~
285+
@SRR098026.1 HWUSI-EAS1599_1:2:1:0:968 length=35
286+
NNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNN
287+
+SRR098026.1 HWUSI-EAS1599_1:2:1:0:968 length=35
288+
!!!!!!!!!!!!!!!!#!!!!!!!!!!!!!!!!!!
289+
@SRR098026.2 HWUSI-EAS1599_1:2:1:0:312 length=35
290+
NNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNN
291+
+SRR098026.2 HWUSI-EAS1599_1:2:1:0:312 length=35
292+
!!!!!!!!!!!!!!!!#!!!!!!!!!!!!!!!!!!
293+
@SRR098026.3 HWUSI-EAS1599_1:2:1:0:570 length=35
294+
NNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNN
295+
~~~
296+
{: .output}
297+
298+
~~~
276299
$ tail SRR098026.fastq
277300
~~~
278301
{: .bash}
279302

303+
~~~
304+
+SRR098026.247 HWUSI-EAS1599_1:2:1:2:1311 length=35
305+
#!##!#################!!!!!!!######
306+
@SRR098026.248 HWUSI-EAS1599_1:2:1:2:118 length=35
307+
GNTGNGGTCATCATACGCGCCCNNNNNNNGGCATG
308+
+SRR098026.248 HWUSI-EAS1599_1:2:1:2:118 length=35
309+
B!;?!A=5922:##########!!!!!!!######
310+
@SRR098026.249 HWUSI-EAS1599_1:2:1:2:1057 length=35
311+
CNCTNTATGCGTACGGCAGTGANNNNNNNGGAGAT
312+
+SRR098026.249 HWUSI-EAS1599_1:2:1:2:1057 length=35
313+
A!@B!BBB@ABAB#########!!!!!!!######
314+
~~~
315+
{: .output}
316+
280317
The `-n` option to either of these commands can be used to print the
281-
first or last `n` lines of a file. To print the first/last line of the
282-
file use:
318+
first or last `n` lines of a file.
283319

284320
~~~
285321
$ head -n 1 SRR098026.fastq
322+
~~~
323+
{: .bash}
324+
325+
~~~
326+
@SRR098026.1 HWUSI-EAS1599_1:2:1:0:968 length=35
327+
~~~
328+
{: .output}
329+
330+
~~~
286331
$ tail -n 1 SRR098026.fastq
287332
~~~
288333
{: .bash}
289334

335+
~~~
336+
A!@B!BBB@ABAB#########!!!!!!!######
337+
~~~
338+
{: .output}
339+
290340
## Creating, moving, copying, and removing
291341

292342
Now we can move around in the file structure, look at files, search files, and
@@ -304,7 +354,7 @@ and change the file permissions so that we can read from, but not write to, the
304354

305355
First, let's make a copy of one of our FASTQ files using the `cp` command.
306356

307-
Navigate to the `data` directory and enter:
357+
Navigate to the `dc_sample_data/untrimmed_fastq` directory and enter:
308358

309359
~~~
310360
$ cp SRR098026.fastq SRR098026-copy.fastq
@@ -374,7 +424,7 @@ $ ls -l
374424
{: .bash}
375425

376426
~~~
377-
-rw-r--r-- 1 dcuser dcuser 43421 Jul 30 15:28 SRR098026-backup.fastq
427+
-rw-r--r-- 1 dcuser dcuser 43332 Nov 15 23:02 SRR098026-backup.fastq
378428
~~~
379429
{: .output}
380430

@@ -398,7 +448,7 @@ $ ls -l
398448
{: .bash}
399449

400450
~~~
401-
-r--r--r-- 1 dcuser dcuser 43421 Jul 30 15:28 SRR098026-backup.fastq
451+
-r--r--r-- 1 dcuser dcuser 43332 Nov 15 23:02 SRR098026-backup.fastq
402452
~~~
403453
{: .output}
404454

@@ -407,14 +457,14 @@ $ ls -l
407457
To prove to ourselves that you no longer have the ability to modify this file, try deleting it with the `rm` command.
408458

409459
~~~
410-
$ rm backup/SRR098026-backup.fastq
460+
$ rm SRR098026-backup.fastq
411461
~~~
412462
{: .bash}
413463

414464
You'll be asked if you want to override your file permissions.
415465

416466
~~~
417-
override r--r--r-- dcuser/dcuser backup/SRR098026-backup.fastq?
467+
rm: remove write-protected regular file ‘SRR098026-backup.fastq’?
418468
~~~
419469
{: .output}
420470

@@ -431,7 +481,8 @@ we just made.
431481
Enter the following command:
432482

433483
~~~
434-
rm -r backup
484+
$ cd ..
485+
$ rm -r backup
435486
~~~
436487
{: .bash}
437488

@@ -457,8 +508,8 @@ you will be asked whether you want to override your permission settings.
457508
> > It's always a good idea to check your work with `ls -l backup`. You should see something like:
458509
> >
459510
> > ~~~
460-
> > -r--r--r-- 1 dcuser dcuser 47649 Oct 20 16:59 SRR097977-backup.fastq
461-
> > -r--r--r-- 1 dcuser dcuser 43421 Oct 20 16:59 SRR098026-backup.fastq
511+
> > -r--r--r-- 1 dcuser dcuser 47552 Nov 15 23:06 SRR097977-backup.fastq
512+
> > -r--r--r-- 1 dcuser dcuser 43332 Nov 15 23:06 SRR098026-backup.fastq
462513
> > ~~~
463514
> > {: .output}
464515
> {: .solution}

0 commit comments

Comments
 (0)